diff --git a/dist/atf/AUTHORS b/dist/atf/AUTHORS deleted file mode 100644 index 43ab30e37152..000000000000 --- a/dist/atf/AUTHORS +++ /dev/null @@ -1,21 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -Authors -======= - -* Julio M. Merino Vidal - - Main developer. He started the work on this project when he took part - in the Google Summer of Code 2007 program as a student. - -* Martin Husemann - - Mentored this project during its development as part of the Google - Summer of Code 2007 program. - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/COPYING b/dist/atf/COPYING deleted file mode 100644 index fa3da86b6caa..000000000000 --- a/dist/atf/COPYING +++ /dev/null @@ -1,67 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -License -======= - -Copyright (c) 2007, 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. - - -Relicensed code -=============== - -The following code snippets have been taken from other projects. -Even though they were not originally licensed under the terms above, -the original authors have agreed to relicense their work so that -this project can be distributed under a single license. This section -is put here just to clarify this fact. - -* configure.ac, Makefile.am: The original versions were derived from - the ones in the XML Catalog Manager project, version 2.2. - Author: Julio M. Merino Vidal - -* atf/ui.cpp: The format_paragraph and format_text functions were - derived form the ones in the Monotone project, - revision 3a0982da308228d796df35f98d787c5cff2bb5b6. - Author: Julio M. Merino Vidal - -* atf/io.hpp, atf/io.cpp, tests/units/t_io.cpp: These files were derived - from the file_handle, systembuf, pipe, pistream and postream classes - and tests found in the Boost.Process library. - Author: Julio M. Merino Vidal - -* admin/check-style.sh, admin/check-style-common.awk, - admin/check-style-cpp.awk, admin/check-style-shell.awk: These files, - except the first one, were first implemented in the Buildtool project. - They were later adapted to be part of Boost.Process and, during that - process, the shell script was created. - Author: Julio M. Merino Vidal - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/ChangeLog b/dist/atf/ChangeLog deleted file mode 100644 index 4126074def79..000000000000 --- a/dist/atf/ChangeLog +++ /dev/null @@ -1,31 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -Detailed list of changes -======================== - -ATF does not use this file because the detailed list of changes is -available where it was meant to be: in the source code repository. -The repository's history contains a much more detailed list of changes -than what could be represented here, including ancestry graphs, patches -between revisions and digital signatures of every change. - -In order to access the repository, please visit ATF's web site for more -instructions. At the time of this writing, the site was located at: - - http://www.NetBSD.org/~jmmv/atf/ - -Also, at the time of this writing, the version control system used to -manage the ATF source code tree was Monotone, whose last known address -was: - - http://www.monotone.ca/ - -Additionally you can find the list of the most important changes between -formal releases in the NEWS file. - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/INSTALL b/dist/atf/INSTALL deleted file mode 100644 index 543191d2be12..000000000000 --- a/dist/atf/INSTALL +++ /dev/null @@ -1,175 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -Introduction -============ - -ATF uses the GNU Automake, GNU Autoconf and GNU Libtool utilities as its -build system. These are used only when compiling the application from the -source code package. If you want to install ATF from a binary package, you -do not need to read this document. - -For the impatient: - -$ ./configure -$ make -$ make check -Gain root privileges -# make install -Drop root privileges -$ make installcheck - -Or alternatively, install as a regular user into your home directory: - -$ ./configure --prefix ~/local -$ make -$ make check -$ make install -$ make installcheck - - -Dependencies -============ - -To build and use ATF successfully you need: - -* A standards-compliant C/C++ complier. For example, GNU GCC 2.95 will not - work. -* A POSIX shell interpreter. -* A make(1) utility. - -If you are building ATF from the code on the repository, you will also need -the following tools. The versions listed here are the ones used to build -the files bundled in the last formal release, but these are not strictly -required. Newer ones will most likely work and, maybe, some slightly older -ones: - -* GNU autoconf 2.61 -* GNU automake 1.10.1 -* GNU libtool 1.5.24 (1.1220.2.455 2007/06/24 02:13:29) - - -Regenerating the build system -============================= - -If you are building ATF from code extracted from the repository, you must -first regenerate the files used by the build system. You will also need to -do this if you modify one of configure.ac or Makefile.am. To do this, -simply run: - -$ autoreconf -is - -For formal releases, no extra steps are needed. - - -General build procedure -======================= - -To build and install the source package, you must follow these steps: - -1. Configure the sources to adapt to your operating system. This is done - using the 'configure' script located on the sources' top directory, and - it is usually invoked without arguments unless you want to change the - installation prefix. More details on this procedure are given on a - later section. - -2. Build the sources to generate the binaries and scripts. Simply run - 'make' on the sources' top directory after configuring them. No - problems should arise. - -3. Check that the programs built in the previous step work before - installing them. Run 'make check' for this. Any serious problems will - pop up here. (Be aware that on, some systems, GNU Libtool will break - these checks. If you get some failures, try reconfiguring the project - providing the '--disable-fast-install' flag to 'configure' and then - rebuild and recheck. - -4. Install the program by running 'make install'. You may need to become - root to issue this step. - -5. Issue any manual installation steps that may be required. These are - described later in their own section. - -6. Check that the installed programs work by running 'make installcheck'. - You do not need to be root to do this, even though some checks will not - be run otherwise. - - -Configuration flags -=================== - -The most common, standard flags given to 'configure' are: - -* Flag: --prefix=directory - Possible values: Any path - Default: /usr/local - - Specifies where the program (binaries and all associated files) will be - installed. - -* Flag: --sysconfdir=directory - Possible values: Any path - Default: /usr/local/etc - - Specifies where the installed programs will look for configuration files. - '/atf' will be appended to the given path unless ATF_CONFSUBDIR is - redefined as explained later on. - -* Flag: --help - - Shows information about all available flags and exits immediately, - without running any configuration tasks. - -The following flags are specific to ATF's 'configure' script: - -* Variable: ATF_CONFSUBDIR - Possible values: empty, a relative path. - Default: atf. - - Specifies the subdirectory of the configuration directory (given by the - --sysconfdir argument) under which ATF will search for its configuration - files. - -* Variable: ATF_WORKDIR - Possible values: empty, an absolute path. - Default: /tmp or /var/tmp, depending on availability. - - Specifies the directory that ATF will use to place its temporary files - and work directories for test cases. This is just a default and can - be overriden at run time. - -* Flag: --enable-developer - Possible values: yes, no - Default: Depends on the version number. Stable versions define this - to 'no' while all others have it set to 'yes'. - - Enables several features useful for development, such as the inclusion - of debugging symbols in all objects or the enabling of warnings during - compilation. - -* Flag: --enable-unstable-shared - Possible values: yes, no - Default: no. - - Forces the building of shared libraries in addition to static ones. - The build of shared libraries is currently disabled because their ABIs - and APIs are unstable and subject to change. This flag is provided for - development purposes only and will be removed once the libraries are - stable enough. - - -Post-installation steps -======================= - -After installing ATF, you have to register the DTDs it provides into the -system-wide XML catalog. See the comments at the top of the files in -${datadir}/share/xml/atf to see the correct public identifiers. This -directory will typically be /usr/local/share/xml/atf or /usr/share/xml/atf. -Failure to do so will lead to further errors when processing the XML -files generated by atf-report. - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/Makefile.am b/dist/atf/Makefile.am deleted file mode 100644 index 6a4f51a1275c..000000000000 --- a/dist/atf/Makefile.am +++ /dev/null @@ -1,1154 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# ------------------------------------------------------------------------- -# Top directory. -# ------------------------------------------------------------------------- - -doc_DATA = AUTHORS COPYING NEWS README ROADMAP -EXTRA_DIST = $(doc_DATA) - -dist-hook: $(srcdir)/admin/revision-dist.h check-install check-style - -AM_CPPFLAGS = -DATF_ARCH=\"$(atf_arch)\" \ - -DATF_CONFDIR=\"$(atf_confdir)\" \ - -DATF_LIBEXECDIR=\"$(libexecdir)\" \ - -DATF_MACHINE=\"$(atf_machine)\" \ - -DATF_PKGDATADIR=\"$(pkgdatadir)\" \ - -DATF_SHELL=\"$(ATF_SHELL)\" \ - -DATF_WORKDIR=\"$(ATF_WORKDIR)\" - -ATF_COMPILE_DEPS = $(srcdir)/atf-sh/atf.init.subr -ATF_COMPILE_DEPS += tools/atf-host-compile -ATF_COMPILE_SH = ./tools/atf-host-compile - -# ------------------------------------------------------------------------- -# `admin' directory. -# ------------------------------------------------------------------------- - -.PHONY: check-install -check-install: - $(srcdir)/admin/check-install.sh $(srcdir)/INSTALL - -.PHONY: check-style -check-style: - $(srcdir)/admin/check-style.sh - -EXTRA_DIST += admin/check-install.sh \ - 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 - -.PHONY: admin/revision.h -admin/revision.h: - @if [ -n "$(MTN)" -a -d $(top_srcdir)/_MTN ]; then \ - test -d admin || mkdir -p admin; \ - MTN="$(MTN)" ROOT="$(top_srcdir)" \ - $(top_srcdir)/admin/generate-revision.sh >admin/revision.h; \ - else \ - rm -f admin/revision.h; \ - fi -CLEANFILES = admin/revision.h - -$(srcdir)/admin/revision-dist.h: admin/revision.h - @if [ -f admin/revision.h ]; then \ - cp admin/revision.h $(srcdir)/admin/revision-dist.h; \ - echo '#define PACKAGE_REVISION_CACHED 1' \ - >>$(srcdir)/admin/revision-dist.h; \ - else \ - [ -f $(srcdir)/admin/revision-dist.h ]; \ - fi -EXTRA_DIST += admin/revision-dist.h - -# ------------------------------------------------------------------------- -# `atf-c' directory. -# ------------------------------------------------------------------------- - -lib_LTLIBRARIES = libatf-c.la -libatf_c_la_SOURCES = atf-c/config.c \ - atf-c/config.h \ - atf-c/dynstr.c \ - atf-c/dynstr.h \ - atf-c/env.c \ - atf-c/env.h \ - atf-c/error.c \ - atf-c/error.h \ - atf-c/expand.c \ - atf-c/expand.h \ - atf-c/fs.c \ - atf-c/fs.h \ - atf-c/io.c \ - atf-c/io.h \ - atf-c/list.c \ - atf-c/list.h \ - atf-c/macros.h \ - atf-c/map.c \ - atf-c/map.h \ - atf-c/object.c \ - atf-c/object.h \ - atf-c/sanity.c \ - atf-c/sanity.h \ - atf-c/signals.c \ - atf-c/signals.h \ - atf-c/text.c \ - atf-c/text.h \ - atf-c/ui.c \ - atf-c/ui.h \ - atf-c/user.c \ - atf-c/user.h \ - atf-c/tc.c \ - atf-c/tc.h \ - atf-c/tcr.c \ - atf-c/tcr.h \ - atf-c/tp.c \ - atf-c/tp.h \ - atf-c/tp_main.c -nodist_libatf_c_la_SOURCES = \ - atf-c/defs.h - -# 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 - -include_HEADERS = atf-c.h -atf_c_HEADERS = atf-c/config.h \ - atf-c/defs.h \ - atf-c/dynstr.h \ - atf-c/env.h \ - atf-c/error.h \ - atf-c/expand.h \ - atf-c/fs.h \ - atf-c/io.h \ - atf-c/list.h \ - atf-c/macros.h \ - atf-c/map.h \ - atf-c/object.h \ - atf-c/sanity.h \ - atf-c/signals.h \ - atf-c/tc.h \ - atf-c/tcr.h \ - atf-c/text.h \ - atf-c/tp.h \ - atf-c/ui.h \ - atf-c/user.h -atf_cdir = $(includedir)/atf-c - -dist_man_MANS = atf-c/atf-c-api.3 - -# ------------------------------------------------------------------------- -# `atf-c++' directory. -# ------------------------------------------------------------------------- - -lib_LTLIBRARIES += libatf-c++.la -libatf_c___la_LDFLAGS = -L. -libatf_c___la_LIBADD = -latf-c -libatf_c___la_SOURCES = atf-c++/application.cpp \ - atf-c++/application.hpp \ - atf-c++/atffile.cpp \ - atf-c++/atffile.hpp \ - atf-c++/config.cpp \ - atf-c++/config.hpp \ - atf-c++/env.cpp \ - atf-c++/env.hpp \ - atf-c++/exceptions.cpp \ - atf-c++/exceptions.hpp \ - atf-c++/expand.cpp \ - atf-c++/expand.hpp \ - atf-c++/formats.cpp \ - atf-c++/formats.hpp \ - atf-c++/fs.cpp \ - atf-c++/fs.hpp \ - atf-c++/io.cpp \ - atf-c++/io.hpp \ - atf-c++/macros.hpp \ - atf-c++/parser.cpp \ - atf-c++/parser.hpp \ - atf-c++/sanity.hpp \ - atf-c++/signals.cpp \ - atf-c++/signals.hpp \ - atf-c++/tests.cpp \ - atf-c++/tests.hpp \ - atf-c++/text.cpp \ - atf-c++/text.hpp \ - atf-c++/ui.cpp \ - atf-c++/ui.hpp \ - atf-c++/user.cpp \ - atf-c++/user.hpp \ - atf-c++/utils.hpp - -include_HEADERS += atf-c++.hpp -atf_c___HEADERS = atf-c++/application.hpp \ - atf-c++/atffile.hpp \ - atf-c++/config.hpp \ - atf-c++/env.hpp \ - atf-c++/exceptions.hpp \ - atf-c++/expand.hpp \ - atf-c++/formats.hpp \ - atf-c++/fs.hpp \ - atf-c++/io.hpp \ - atf-c++/macros.hpp \ - atf-c++/parser.hpp \ - atf-c++/sanity.hpp \ - atf-c++/tests.hpp \ - atf-c++/text.hpp \ - atf-c++/ui.hpp \ - atf-c++/user.hpp \ - atf-c++/utils.hpp -atf_c__dir = $(includedir)/atf-c++ - -dist_man_MANS += atf-c++/atf-c++-api.3 - -# ------------------------------------------------------------------------- -# `atf-sh' directory. -# ------------------------------------------------------------------------- - -atf_sh_DATA = atf-sh/atf.footer.subr \ - atf-sh/atf.header.subr \ - atf-sh/atf.init.subr -atf_shdir = $(pkgdatadir) -EXTRA_DIST += $(atf_sh_DATA) - -dist_man_MANS += atf-sh/atf-sh-api.3 - -# ------------------------------------------------------------------------- -# `data' directory. -# ------------------------------------------------------------------------- - -cssdir = $(atf_cssdir) -css_DATA = data/tests-results.css -EXTRA_DIST += $(css_DATA) - -dtddir = $(atf_dtddir) -dtd_DATA = data/tests-results.dtd -EXTRA_DIST += $(dtd_DATA) - -egdir = $(atf_egdir) -eg_DATA = data/atf-run.hooks -EXTRA_DIST += $(eg_DATA) - -pkgconfigdir = $(atf_pkgconfigdir) -pkgconfig_DATA = data/atf-c.pc data/atf-c++.pc -CLEANFILES += data/atf-c.pc data/atf-c++.pc -EXTRA_DIST += data/atf-c.pc.in data/atf-c++.pc.in -data/atf-c.pc: $(srcdir)/data/atf-c.pc.in - test -d data || mkdir -p data - sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \ - -e 's,__CC__,$(CC),g' \ - -e 's,__INCLUDEDIR__,$(includedir),g' \ - -e 's,__LIBDIR__,$(libdir),g' \ - <$(srcdir)/data/atf-c.pc.in >data/atf-c.pc.tmp - mv data/atf-c.pc.tmp data/atf-c.pc -data/atf-c++.pc: $(srcdir)/data/atf-c++.pc.in - test -d data || mkdir -p data - sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \ - -e 's,__CXX__,$(CXX),g' \ - -e 's,__INCLUDEDIR__,$(includedir),g' \ - -e 's,__LIBDIR__,$(libdir),g' \ - <$(srcdir)/data/atf-c++.pc.in >data/atf-c++.pc.tmp - mv data/atf-c++.pc.tmp data/atf-c++.pc - -xsldir = $(atf_xsldir) -xsl_DATA = data/tests-results.xsl -EXTRA_DIST += $(xsl_DATA) - -# ------------------------------------------------------------------------- -# `doc' directory. -# ------------------------------------------------------------------------- - -man_MANS = doc/atf.7 -CLEANFILES += doc/atf.7 -EXTRA_DIST += doc/atf.7.in - -dist_man_MANS += doc/atf-formats.5 \ - doc/atf-test-case.4 \ - doc/atf-test-program.1 - -doc/atf.7: $(srcdir)/doc/atf.7.in - test -d doc || mkdir -p doc - sed -e 's,__DOCDIR__,$(docdir),g' \ - <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp - mv doc/atf.7.tmp doc/atf.7 - -# ------------------------------------------------------------------------- -# `m4' directory. -# ------------------------------------------------------------------------- - -ACLOCAL_AMFLAGS = -I m4 - -# ------------------------------------------------------------------------- -# `tests/bootstrap' directory. -# ------------------------------------------------------------------------- - -check_PROGRAMS = tests/bootstrap/h_app_empty -tests_bootstrap_h_app_empty_SOURCES = tests/bootstrap/h_app_empty.cpp -tests_bootstrap_h_app_empty_LDADD = -latf-c++ -tests_bootstrap_h_app_empty_LDFLAGS = -L. - -check_PROGRAMS += tests/bootstrap/h_app_opts_args -tests_bootstrap_h_app_opts_args_SOURCES = tests/bootstrap/h_app_opts_args.cpp -tests_bootstrap_h_app_opts_args_LDADD = -latf-c++ -tests_bootstrap_h_app_opts_args_LDFLAGS = -L. - -check_PROGRAMS += tests/bootstrap/h_tp_basic_c -tests_bootstrap_h_tp_basic_c_SOURCES = tests/bootstrap/h_tp_basic_c.c -tests_bootstrap_h_tp_basic_c_LDADD = -latf-c -tests_bootstrap_h_tp_basic_c_LDFLAGS = -L. - -check_PROGRAMS += tests/bootstrap/h_tp_basic_cpp -tests_bootstrap_h_tp_basic_cpp_SOURCES = tests/bootstrap/h_tp_basic_cpp.cpp -tests_bootstrap_h_tp_basic_cpp_LDADD = -latf-c++ -tests_bootstrap_h_tp_basic_cpp_LDFLAGS = -L. - -check_SCRIPTS = tests/bootstrap/h_tp_basic_sh -CLEANFILES += tests/bootstrap/h_tp_basic_sh -EXTRA_DIST += tests/bootstrap/h_tp_basic_sh.sh -tests/bootstrap/h_tp_basic_sh: $(srcdir)/tests/bootstrap/h_tp_basic_sh.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/bootstrap || mkdir -p tests/bootstrap - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/bootstrap/h_tp_basic_sh.sh - -check_SCRIPTS += tests/bootstrap/h_tp_atf_check_sh -CLEANFILES += tests/bootstrap/h_tp_atf_check_sh -EXTRA_DIST += tests/bootstrap/h_tp_atf_check_sh.sh -tests/bootstrap/h_tp_atf_check_sh: \ - $(srcdir)/tests/bootstrap/h_tp_atf_check_sh.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/bootstrap || mkdir -p tests/bootstrap - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/bootstrap/h_tp_atf_check_sh.sh - -TESTS= $(srcdir)/tests/bootstrap/testsuite - -DISTCLEANFILES = \ - tests/bootstrap/atconfig \ - testsuite.lineno \ - testsuite.log - -distclean-local: - -rm -rf testsuite.dir - -EXTRA_DIST += tests/bootstrap/testsuite \ - tests/bootstrap/package.m4 \ - tests/bootstrap/testsuite.at \ - $(testsuite_incs) - -testsuite_incs= $(srcdir)/tests/bootstrap/t_application_help.at \ - $(srcdir)/tests/bootstrap/t_application_opts_args.at \ - $(srcdir)/tests/bootstrap/t_atf_config.at \ - $(srcdir)/tests/bootstrap/t_atf_format.at \ - $(srcdir)/tests/bootstrap/t_atf_run.at \ - $(srcdir)/tests/bootstrap/t_subr_atf_check.at \ - $(srcdir)/tests/bootstrap/t_test_program_compare.at \ - $(srcdir)/tests/bootstrap/t_test_program_filter.at \ - $(srcdir)/tests/bootstrap/t_test_program_list.at \ - $(srcdir)/tests/bootstrap/t_test_program_run.at - -$(srcdir)/tests/bootstrap/package.m4: $(top_srcdir)/configure.ac - { \ - echo '# Signature of the current package.'; \ - echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ - echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ - echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ - echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ - echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ - } >$(srcdir)/tests/bootstrap/package.m4 - -$(srcdir)/tests/bootstrap/testsuite: $(srcdir)/tests/bootstrap/testsuite.at \ - $(testsuite_incs) \ - $(srcdir)/tests/bootstrap/package.m4 - autom4te --language=Autotest -I $(srcdir) \ - -I $(srcdir)/tests/bootstrap \ - $(srcdir)/tests/bootstrap/testsuite.at -o $@.tmp - mv $@.tmp $@ - -# ------------------------------------------------------------------------- -# `tests/atf' directory. -# ------------------------------------------------------------------------- - -testsdir = $(exec_prefix)/tests -pkgtestsdir = $(exec_prefix)/tests/atf - -installcheck-local: - logfile=$$(pwd)/installcheck.log; \ - cd $(pkgtestsdir); \ - $(TESTS_ENVIRONMENT) atf-run | tee $${logfile} | atf-report; \ - res=$${?}; \ - echo; \ - echo "The verbatim output of atf-run has been saved to" \ - "installcheck.log"; \ - exit $${res} -CLEANFILES += installcheck.log - -pkgtests_DATA = tests/atf/Atffile -EXTRA_DIST += $(pkgtests_DATA) - -atf_atf_c_DATA = tests/atf/atf-c/Atffile -atf_atf_cdir = $(pkgtestsdir)/atf-c -EXTRA_DIST += $(atf_atf_c_DATA) - -atf_atf_c_PROGRAMS = tests/atf/atf-c/t_config -tests_atf_atf_c_t_config_SOURCES = tests/atf/atf-c/t_config.c -tests_atf_atf_c_t_config_LDADD = -latf-c -tests_atf_atf_c_t_config_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_dynstr -tests_atf_atf_c_t_dynstr_SOURCES = tests/atf/atf-c/t_dynstr.c -tests_atf_atf_c_t_dynstr_LDADD = -latf-c -tests_atf_atf_c_t_dynstr_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_env -tests_atf_atf_c_t_env_SOURCES = tests/atf/atf-c/t_env.c -tests_atf_atf_c_t_env_LDADD = -latf-c -tests_atf_atf_c_t_env_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_error -tests_atf_atf_c_t_error_SOURCES = tests/atf/atf-c/t_error.c -tests_atf_atf_c_t_error_LDADD = -latf-c -tests_atf_atf_c_t_error_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_expand -tests_atf_atf_c_t_expand_SOURCES = tests/atf/atf-c/t_expand.c -tests_atf_atf_c_t_expand_LDADD = -latf-c -tests_atf_atf_c_t_expand_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_fs -tests_atf_atf_c_t_fs_SOURCES = tests/atf/atf-c/t_fs.c -tests_atf_atf_c_t_fs_LDADD = -latf-c -tests_atf_atf_c_t_fs_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_io -tests_atf_atf_c_t_io_SOURCES = tests/atf/atf-c/t_io.c -tests_atf_atf_c_t_io_LDADD = -latf-c -tests_atf_atf_c_t_io_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_list -tests_atf_atf_c_t_list_SOURCES = tests/atf/atf-c/t_list.c -tests_atf_atf_c_t_list_LDADD = -latf-c -tests_atf_atf_c_t_list_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_macros -tests_atf_atf_c_t_macros_SOURCES = tests/atf/atf-c/t_macros.c -tests_atf_atf_c_t_macros_LDADD = -latf-c -tests_atf_atf_c_t_macros_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_map -tests_atf_atf_c_t_map_SOURCES = tests/atf/atf-c/t_map.c -tests_atf_atf_c_t_map_LDADD = -latf-c -tests_atf_atf_c_t_map_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_signals -tests_atf_atf_c_t_signals_SOURCES = tests/atf/atf-c/t_signals.c -tests_atf_atf_c_t_signals_LDADD = -latf-c -tests_atf_atf_c_t_signals_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_tc -tests_atf_atf_c_t_tc_SOURCES = tests/atf/atf-c/t_tc.c -tests_atf_atf_c_t_tc_LDADD = -latf-c -tests_atf_atf_c_t_tc_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_tcr -tests_atf_atf_c_t_tcr_SOURCES = tests/atf/atf-c/t_tcr.c -tests_atf_atf_c_t_tcr_LDADD = -latf-c -tests_atf_atf_c_t_tcr_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_sanity -tests_atf_atf_c_t_sanity_SOURCES = tests/atf/atf-c/t_sanity.c -tests_atf_atf_c_t_sanity_LDADD = -latf-c -tests_atf_atf_c_t_sanity_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_text -tests_atf_atf_c_t_text_SOURCES = tests/atf/atf-c/t_text.c -tests_atf_atf_c_t_text_LDADD = -latf-c -tests_atf_atf_c_t_text_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_ui -tests_atf_atf_c_t_ui_SOURCES = tests/atf/atf-c/t_ui.c -tests_atf_atf_c_t_ui_LDADD = -latf-c -tests_atf_atf_c_t_ui_LDFLAGS = -L. - -atf_atf_c_PROGRAMS += tests/atf/atf-c/t_user -tests_atf_atf_c_t_user_SOURCES = tests/atf/atf-c/t_user.c -tests_atf_atf_c_t_user_LDADD = -latf-c -tests_atf_atf_c_t_user_LDFLAGS = -L. - -atf_atf_c___DATA = tests/atf/atf-c++/Atffile -atf_atf_c__dir = $(pkgtestsdir)/atf-c++ -EXTRA_DIST += $(atf_atf_c___DATA) - -atf_atf_c___PROGRAMS = tests/atf/atf-c++/t_config -tests_atf_atf_c___t_config_SOURCES = tests/atf/atf-c++/t_config.cpp -tests_atf_atf_c___t_config_LDADD = -latf-c++ -tests_atf_atf_c___t_config_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_env -tests_atf_atf_c___t_env_SOURCES = tests/atf/atf-c++/t_env.cpp -tests_atf_atf_c___t_env_LDADD = -latf-c++ -tests_atf_atf_c___t_env_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_expand -tests_atf_atf_c___t_expand_SOURCES = tests/atf/atf-c++/t_expand.cpp -tests_atf_atf_c___t_expand_LDADD = -latf-c++ -tests_atf_atf_c___t_expand_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_fs -tests_atf_atf_c___t_fs_SOURCES = tests/atf/atf-c++/t_fs.cpp -tests_atf_atf_c___t_fs_LDADD = -latf-c++ -tests_atf_atf_c___t_fs_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_io -tests_atf_atf_c___t_io_SOURCES = tests/atf/atf-c++/t_io.cpp -tests_atf_atf_c___t_io_LDADD = -latf-c++ -tests_atf_atf_c___t_io_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_macros -tests_atf_atf_c___t_macros_SOURCES = tests/atf/atf-c++/t_macros.cpp -tests_atf_atf_c___t_macros_LDADD = -latf-c++ -tests_atf_atf_c___t_macros_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_parser -tests_atf_atf_c___t_parser_SOURCES = tests/atf/atf-c++/t_parser.cpp -tests_atf_atf_c___t_parser_LDADD = -latf-c++ -tests_atf_atf_c___t_parser_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_signals -tests_atf_atf_c___t_signals_SOURCES = tests/atf/atf-c++/t_signals.cpp -tests_atf_atf_c___t_signals_LDADD = -latf-c++ -tests_atf_atf_c___t_signals_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_tests -tests_atf_atf_c___t_tests_SOURCES = tests/atf/atf-c++/t_tests.cpp -tests_atf_atf_c___t_tests_LDADD = -latf-c++ -tests_atf_atf_c___t_tests_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_text -tests_atf_atf_c___t_text_SOURCES = tests/atf/atf-c++/t_text.cpp -tests_atf_atf_c___t_text_LDADD = -latf-c++ -tests_atf_atf_c___t_text_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_user -tests_atf_atf_c___t_user_SOURCES = tests/atf/atf-c++/t_user.cpp -tests_atf_atf_c___t_user_LDADD = -latf-c++ -tests_atf_atf_c___t_user_LDFLAGS = -L. - -atf_atf_c___PROGRAMS += tests/atf/atf-c++/t_utils -tests_atf_atf_c___t_utils_SOURCES = tests/atf/atf-c++/t_utils.cpp -tests_atf_atf_c___t_utils_LDADD = -latf-c++ -tests_atf_atf_c___t_utils_LDFLAGS = -L. - -atf_atf_sh_DATA = tests/atf/atf-sh/Atffile -atf_atf_shdir = $(pkgtestsdir)/atf-sh -EXTRA_DIST += $(atf_atf_sh_DATA) - -atf_atf_sh_SCRIPTS = tests/atf/atf-sh/h_misc -CLEANFILES += tests/atf/atf-sh/h_misc -EXTRA_DIST += tests/atf/atf-sh/h_misc.sh -tests/atf/atf-sh/h_misc: \ - $(srcdir)/tests/atf/atf-sh/h_misc.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/h_misc.sh - -atf_atf_sh_SCRIPTS += tests/atf/atf-sh/t_atf_check -CLEANFILES += tests/atf/atf-sh/t_atf_check -EXTRA_DIST += tests/atf/atf-sh/t_atf_check.sh -tests/atf/atf-sh/t_atf_check: \ - $(srcdir)/tests/atf/atf-sh/t_atf_check.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_atf_check.sh - -atf_atf_sh_SCRIPTS += tests/atf/atf-sh/t_config -CLEANFILES += tests/atf/atf-sh/t_config -EXTRA_DIST += tests/atf/atf-sh/t_config.sh -tests/atf/atf-sh/t_config: \ - $(srcdir)/tests/atf/atf-sh/t_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_config.sh - -atf_atf_sh_SCRIPTS += tests/atf/atf-sh/t_normalize -CLEANFILES += tests/atf/atf-sh/t_normalize -EXTRA_DIST += tests/atf/atf-sh/t_normalize.sh -tests/atf/atf-sh/t_normalize: \ - $(srcdir)/tests/atf/atf-sh/t_normalize.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_normalize.sh - -atf_atf_sh_SCRIPTS += tests/atf/atf-sh/t_tc -CLEANFILES += tests/atf/atf-sh/t_tc -EXTRA_DIST += tests/atf/atf-sh/t_tc.sh -tests/atf/atf-sh/t_tc: \ - $(srcdir)/tests/atf/atf-sh/t_tc.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_tc.sh - -atf_atf_sh_SCRIPTS += tests/atf/atf-sh/t_tp -CLEANFILES += tests/atf/atf-sh/t_tp -EXTRA_DIST += tests/atf/atf-sh/t_tp.sh -tests/atf/atf-sh/t_tp: \ - $(srcdir)/tests/atf/atf-sh/t_tp.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_tp.sh - -atf_data_DATA = tests/atf/data/Atffile -atf_datadir = $(pkgtestsdir)/data -EXTRA_DIST += $(atf_data_DATA) - -atf_data_SCRIPTS = tests/atf/data/t_pkg_config -CLEANFILES += tests/atf/data/t_pkg_config -EXTRA_DIST += tests/atf/data/t_pkg_config.sh -tests/atf/data/t_pkg_config: \ - $(srcdir)/tests/atf/data/t_pkg_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/data || mkdir -p tests/atf/data - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/data/t_pkg_config.sh - -atf_formats_DATA = tests/atf/formats/Atffile \ - tests/atf/formats/d_atffile_1 \ - tests/atf/formats/d_atffile_1.expout \ - tests/atf/formats/d_atffile_2 \ - tests/atf/formats/d_atffile_2.expout \ - tests/atf/formats/d_atffile_3 \ - tests/atf/formats/d_atffile_3.expout \ - tests/atf/formats/d_atffile_4 \ - tests/atf/formats/d_atffile_4.expout \ - tests/atf/formats/d_atffile_5 \ - tests/atf/formats/d_atffile_5.expout \ - tests/atf/formats/d_atffile_50 \ - tests/atf/formats/d_atffile_50.experr \ - tests/atf/formats/d_atffile_51 \ - tests/atf/formats/d_atffile_51.experr \ - tests/atf/formats/d_atffile_52 \ - tests/atf/formats/d_atffile_52.experr \ - tests/atf/formats/d_atffile_53 \ - tests/atf/formats/d_atffile_53.experr \ - tests/atf/formats/d_atffile_53.expout \ - tests/atf/formats/d_atffile_54 \ - tests/atf/formats/d_atffile_54.experr \ - tests/atf/formats/d_atffile_6 \ - tests/atf/formats/d_atffile_6.expout \ - tests/atf/formats/d_config_1 \ - tests/atf/formats/d_config_1.expout \ - tests/atf/formats/d_config_2 \ - tests/atf/formats/d_config_2.expout \ - tests/atf/formats/d_config_3 \ - tests/atf/formats/d_config_3.expout \ - tests/atf/formats/d_config_4 \ - tests/atf/formats/d_config_4.expout \ - tests/atf/formats/d_config_50 \ - tests/atf/formats/d_config_50.experr \ - tests/atf/formats/d_config_51 \ - tests/atf/formats/d_config_51.experr \ - tests/atf/formats/d_config_52 \ - tests/atf/formats/d_config_52.experr \ - tests/atf/formats/d_config_53 \ - tests/atf/formats/d_config_53.experr \ - tests/atf/formats/d_config_53.expout \ - tests/atf/formats/d_config_54 \ - tests/atf/formats/d_config_54.experr \ - tests/atf/formats/d_headers_1 \ - tests/atf/formats/d_headers_1.experr \ - tests/atf/formats/d_headers_10 \ - tests/atf/formats/d_headers_10.experr \ - tests/atf/formats/d_headers_11 \ - tests/atf/formats/d_headers_11.experr \ - tests/atf/formats/d_headers_12 \ - tests/atf/formats/d_headers_12.experr \ - tests/atf/formats/d_headers_2 \ - tests/atf/formats/d_headers_2.experr \ - tests/atf/formats/d_headers_3 \ - tests/atf/formats/d_headers_3.experr \ - tests/atf/formats/d_headers_4 \ - tests/atf/formats/d_headers_4.experr \ - tests/atf/formats/d_headers_5 \ - tests/atf/formats/d_headers_5.experr \ - tests/atf/formats/d_headers_6 \ - tests/atf/formats/d_headers_6.experr \ - tests/atf/formats/d_headers_7 \ - tests/atf/formats/d_headers_7.experr \ - tests/atf/formats/d_headers_8 \ - tests/atf/formats/d_headers_8.experr \ - tests/atf/formats/d_headers_9 \ - tests/atf/formats/d_headers_9.experr \ - tests/atf/formats/d_tcs_1 \ - tests/atf/formats/d_tcs_1.errin \ - tests/atf/formats/d_tcs_1.expout \ - tests/atf/formats/d_tcs_1.outin \ - tests/atf/formats/d_tcs_2 \ - tests/atf/formats/d_tcs_2.errin \ - tests/atf/formats/d_tcs_2.expout \ - tests/atf/formats/d_tcs_2.outin \ - tests/atf/formats/d_tcs_3 \ - tests/atf/formats/d_tcs_3.errin \ - tests/atf/formats/d_tcs_3.expout \ - tests/atf/formats/d_tcs_3.outin \ - tests/atf/formats/d_tcs_4 \ - tests/atf/formats/d_tcs_4.errin \ - tests/atf/formats/d_tcs_4.expout \ - tests/atf/formats/d_tcs_4.outin \ - tests/atf/formats/d_tcs_5 \ - tests/atf/formats/d_tcs_5.errin \ - tests/atf/formats/d_tcs_5.expout \ - tests/atf/formats/d_tcs_5.outin \ - tests/atf/formats/d_tcs_50 \ - tests/atf/formats/d_tcs_50.experr \ - tests/atf/formats/d_tcs_51 \ - tests/atf/formats/d_tcs_51.experr \ - tests/atf/formats/d_tcs_52 \ - tests/atf/formats/d_tcs_52.experr \ - tests/atf/formats/d_tcs_53 \ - tests/atf/formats/d_tcs_53.experr \ - tests/atf/formats/d_tcs_53.expout \ - tests/atf/formats/d_tcs_54 \ - tests/atf/formats/d_tcs_54.experr \ - tests/atf/formats/d_tcs_54.expout \ - tests/atf/formats/d_tcs_55 \ - tests/atf/formats/d_tcs_55.experr \ - tests/atf/formats/d_tcs_55.expout \ - tests/atf/formats/d_tcs_56 \ - tests/atf/formats/d_tcs_56.errin \ - tests/atf/formats/d_tcs_56.experr \ - tests/atf/formats/d_tcs_56.expout \ - tests/atf/formats/d_tcs_56.outin \ - tests/atf/formats/d_tcs_57 \ - tests/atf/formats/d_tcs_57.errin \ - tests/atf/formats/d_tcs_57.experr \ - tests/atf/formats/d_tcs_57.expout \ - tests/atf/formats/d_tcs_57.outin \ - tests/atf/formats/d_tps_1 \ - tests/atf/formats/d_tps_1.expout \ - tests/atf/formats/d_tps_2 \ - tests/atf/formats/d_tps_2.expout \ - tests/atf/formats/d_tps_3 \ - tests/atf/formats/d_tps_3.expout \ - tests/atf/formats/d_tps_4 \ - tests/atf/formats/d_tps_4.expout \ - tests/atf/formats/d_tps_5 \ - tests/atf/formats/d_tps_5.expout \ - tests/atf/formats/d_tps_50 \ - tests/atf/formats/d_tps_50.experr \ - tests/atf/formats/d_tps_51 \ - tests/atf/formats/d_tps_51.experr \ - tests/atf/formats/d_tps_52 \ - tests/atf/formats/d_tps_52.experr \ - tests/atf/formats/d_tps_53 \ - tests/atf/formats/d_tps_53.experr \ - tests/atf/formats/d_tps_53.expout \ - tests/atf/formats/d_tps_54 \ - tests/atf/formats/d_tps_54.experr \ - tests/atf/formats/d_tps_54.expout \ - tests/atf/formats/d_tps_55 \ - tests/atf/formats/d_tps_55.experr \ - tests/atf/formats/d_tps_55.expout \ - tests/atf/formats/d_tps_56 \ - tests/atf/formats/d_tps_56.experr \ - tests/atf/formats/d_tps_56.expout \ - tests/atf/formats/d_tps_57 \ - tests/atf/formats/d_tps_57.experr \ - tests/atf/formats/d_tps_57.expout \ - tests/atf/formats/d_tps_58 \ - tests/atf/formats/d_tps_58.experr \ - tests/atf/formats/d_tps_58.expout \ - tests/atf/formats/d_tps_59 \ - tests/atf/formats/d_tps_59.experr \ - tests/atf/formats/d_tps_60 \ - tests/atf/formats/d_tps_60.experr \ - tests/atf/formats/d_tps_61 \ - tests/atf/formats/d_tps_61.experr \ - tests/atf/formats/d_tps_62 \ - tests/atf/formats/d_tps_62.experr \ - tests/atf/formats/d_tps_62.expout \ - tests/atf/formats/d_tps_63 \ - tests/atf/formats/d_tps_63.experr \ - tests/atf/formats/d_tps_63.expout \ - tests/atf/formats/d_tps_64 \ - tests/atf/formats/d_tps_64.experr \ - tests/atf/formats/d_tps_64.expout \ - tests/atf/formats/d_tps_65 \ - tests/atf/formats/d_tps_65.experr \ - tests/atf/formats/d_tps_65.expout \ - tests/atf/formats/d_tps_66 \ - tests/atf/formats/d_tps_66.experr \ - tests/atf/formats/d_tps_66.expout -atf_formatsdir = $(pkgtestsdir)/formats -EXTRA_DIST += $(atf_formats_DATA) - -atf_formats_PROGRAMS = tests/atf/formats/h_parser -tests_atf_formats_h_parser_SOURCES = tests/atf/formats/h_parser.cpp -tests_atf_formats_h_parser_LDADD = -latf-c++ -tests_atf_formats_h_parser_LDFLAGS = -L. - -atf_formats_PROGRAMS += tests/atf/formats/t_writers -tests_atf_formats_t_writers_SOURCES = tests/atf/formats/t_writers.cpp -tests_atf_formats_t_writers_LDADD = -latf-c++ -tests_atf_formats_t_writers_LDFLAGS = -L. - -atf_formats_SCRIPTS = tests/atf/formats/t_parsers -CLEANFILES += tests/atf/formats/t_parsers -EXTRA_DIST += tests/atf/formats/t_parsers.sh -tests/atf/formats/t_parsers: \ - $(srcdir)/tests/atf/formats/t_parsers.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/formats || mkdir -p tests/atf/formats - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/formats/t_parsers.sh - -atf_test_programs_DATA = tests/atf/test_programs/Atffile -atf_test_programsdir = $(pkgtestsdir)/test_programs -EXTRA_DIST += $(atf_test_programs_DATA) - -EXTRA_DIST += tests/atf/test_programs/common.sh - -atf_test_programs_SCRIPTS = tests/atf/test_programs/h_sh -CLEANFILES += tests/atf/test_programs/h_sh -EXTRA_DIST += tests/atf/test_programs/h_sh.sh -tests/atf/test_programs/h_sh: \ - $(srcdir)/tests/atf/test_programs/h_sh.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/h_sh.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_cleanup -CLEANFILES += tests/atf/test_programs/t_cleanup -EXTRA_DIST += tests/atf/test_programs/t_cleanup.sh -tests/atf/test_programs/t_cleanup: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_cleanup.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_cleanup.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_config -CLEANFILES += tests/atf/test_programs/t_config -EXTRA_DIST += tests/atf/test_programs/t_config.sh -tests/atf/test_programs/t_config: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_config.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_env -CLEANFILES += tests/atf/test_programs/t_env -EXTRA_DIST += tests/atf/test_programs/t_env.sh -tests/atf/test_programs/t_env: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_env.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_env.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_fork -CLEANFILES += tests/atf/test_programs/t_fork -EXTRA_DIST += tests/atf/test_programs/t_fork.sh -tests/atf/test_programs/t_fork: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_fork.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_fork.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_meta_data -CLEANFILES += tests/atf/test_programs/t_meta_data -EXTRA_DIST += tests/atf/test_programs/t_meta_data.sh -tests/atf/test_programs/t_meta_data: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_meta_data.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_meta_data.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_srcdir -CLEANFILES += tests/atf/test_programs/t_srcdir -EXTRA_DIST += tests/atf/test_programs/t_srcdir.sh -tests/atf/test_programs/t_srcdir: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_srcdir.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_srcdir.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_status -CLEANFILES += tests/atf/test_programs/t_status -EXTRA_DIST += tests/atf/test_programs/t_status.sh -tests/atf/test_programs/t_status: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_status.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_status.sh - -atf_test_programs_SCRIPTS += tests/atf/test_programs/t_workdir -CLEANFILES += tests/atf/test_programs/t_workdir -EXTRA_DIST += tests/atf/test_programs/t_workdir.sh -tests/atf/test_programs/t_workdir: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_workdir.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_workdir.sh - -atf_test_programs_PROGRAMS = tests/atf/test_programs/h_c -tests_atf_test_programs_h_c_SOURCES = tests/atf/test_programs/h_c.c -tests_atf_test_programs_h_c_LDADD = -latf-c -tests_atf_test_programs_h_c_LDFLAGS = -L. - -atf_test_programs_PROGRAMS += tests/atf/test_programs/h_cpp -tests_atf_test_programs_h_cpp_SOURCES = tests/atf/test_programs/h_cpp.cpp -tests_atf_test_programs_h_cpp_LDADD = -latf-c++ -tests_atf_test_programs_h_cpp_LDFLAGS = -L. - -atf_tools_DATA = tests/atf/tools/Atffile -atf_toolsdir = $(pkgtestsdir)/tools -EXTRA_DIST += $(atf_tools_DATA) - -atf_tools_PROGRAMS = tests/atf/tools/h_fail -tests_atf_tools_h_fail_SOURCES = tests/atf/tools/h_fail.cpp -tests_atf_tools_h_fail_LDADD = -latf-c++ -tests_atf_tools_h_fail_LDFLAGS = -L. - -atf_tools_PROGRAMS += tests/atf/tools/h_misc -tests_atf_tools_h_misc_SOURCES = tests/atf/tools/h_misc.cpp -tests_atf_tools_h_misc_LDADD = -latf-c++ -tests_atf_tools_h_misc_LDFLAGS = -L. - -atf_tools_PROGRAMS += tests/atf/tools/h_mode -tests_atf_tools_h_mode_SOURCES = tests/atf/tools/h_mode.cpp -tests_atf_tools_h_mode_LDADD = -latf-c++ -tests_atf_tools_h_mode_LDFLAGS = -L. - -atf_tools_PROGRAMS += tests/atf/tools/h_pass -tests_atf_tools_h_pass_SOURCES = tests/atf/tools/h_pass.cpp -tests_atf_tools_h_pass_LDADD = -latf-c++ -tests_atf_tools_h_pass_LDFLAGS = -L. - -atf_tools_SCRIPTS = tests/atf/tools/t_atf_cleanup -CLEANFILES += tests/atf/tools/t_atf_cleanup -EXTRA_DIST += tests/atf/tools/t_atf_cleanup.sh -tests/atf/tools/t_atf_cleanup: \ - $(srcdir)/tests/atf/tools/t_atf_cleanup.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_cleanup.sh - -atf_tools_SCRIPTS += tests/atf/tools/t_atf_compile -CLEANFILES += tests/atf/tools/t_atf_compile -EXTRA_DIST += tests/atf/tools/t_atf_compile.sh -tests/atf/tools/t_atf_compile: $(srcdir)/tests/atf/tools/t_atf_compile.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_compile.sh - -atf_tools_SCRIPTS += tests/atf/tools/t_atf_config -CLEANFILES += tests/atf/tools/t_atf_config -EXTRA_DIST += tests/atf/tools/t_atf_config.sh -tests/atf/tools/t_atf_config: $(srcdir)/tests/atf/tools/t_atf_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_config.sh - -atf_tools_SCRIPTS += tests/atf/tools/t_atf_exec -CLEANFILES += tests/atf/tools/t_atf_exec -EXTRA_DIST += tests/atf/tools/t_atf_exec.sh -tests/atf/tools/t_atf_exec: $(srcdir)/tests/atf/tools/t_atf_exec.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_exec.sh - -atf_tools_SCRIPTS += tests/atf/tools/t_atf_killpg -CLEANFILES += tests/atf/tools/t_atf_killpg -EXTRA_DIST += tests/atf/tools/t_atf_killpg.sh -tests/atf/tools/t_atf_killpg: $(srcdir)/tests/atf/tools/t_atf_killpg.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_killpg.sh - -atf_tools_SCRIPTS += tests/atf/tools/t_atf_report -CLEANFILES += tests/atf/tools/t_atf_report -EXTRA_DIST += tests/atf/tools/t_atf_report.sh -tests/atf/tools/t_atf_report: $(srcdir)/tests/atf/tools/t_atf_report.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_report.sh - -atf_tools_SCRIPTS += tests/atf/tools/t_atf_run -CLEANFILES += tests/atf/tools/t_atf_run -EXTRA_DIST += tests/atf/tools/t_atf_run.sh -tests/atf/tools/t_atf_run: $(srcdir)/tests/atf/tools/t_atf_run.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_run.sh - -# ------------------------------------------------------------------------- -# `tests/build' directory. -# ------------------------------------------------------------------------- - -check_LIBRARIES = tests/build/libuseless.a - -tests_build_libuseless_a_SOURCES = \ - tests/build/t_include_atf_c_h.cpp \ - tests/build/t_include_atf_c++_hpp.cpp \ - tests/build/atf-c/t_include_config_h.c \ - tests/build/atf-c/t_include_dynstr_h.c \ - tests/build/atf-c/t_include_env_h.c \ - tests/build/atf-c/t_include_error_h.c \ - tests/build/atf-c/t_include_expand_h.c \ - tests/build/atf-c/t_include_fs_h.c \ - tests/build/atf-c/t_include_io_h.c \ - tests/build/atf-c/t_include_list_h.c \ - tests/build/atf-c/t_include_macros_h.c \ - tests/build/atf-c/t_include_map_h.c \ - tests/build/atf-c/t_include_object_h.c \ - tests/build/atf-c/t_include_sanity_h.c \ - tests/build/atf-c/t_include_signals_h.c \ - tests/build/atf-c/t_include_tc_h.c \ - tests/build/atf-c/t_include_tcr_h.c \ - tests/build/atf-c/t_include_text_h.c \ - tests/build/atf-c/t_include_tp_h.c \ - tests/build/atf-c/t_include_ui_h.c \ - tests/build/atf-c/t_use_macros_h.c \ - tests/build/atf-c++/t_include_application_hpp.cpp \ - tests/build/atf-c++/t_include_atffile_hpp.cpp \ - tests/build/atf-c++/t_include_config_hpp.cpp \ - tests/build/atf-c++/t_include_env_hpp.cpp \ - tests/build/atf-c++/t_include_exceptions_hpp.cpp \ - tests/build/atf-c++/t_include_expand_hpp.cpp \ - tests/build/atf-c++/t_include_formats_hpp.cpp \ - tests/build/atf-c++/t_include_fs_hpp.cpp \ - tests/build/atf-c++/t_include_io_hpp.cpp \ - tests/build/atf-c++/t_include_macros_hpp.cpp \ - tests/build/atf-c++/t_include_parser_hpp.cpp \ - tests/build/atf-c++/t_include_sanity_hpp.cpp \ - tests/build/atf-c++/t_include_signals_hpp.cpp \ - tests/build/atf-c++/t_include_tests_hpp.cpp \ - tests/build/atf-c++/t_include_text_hpp.cpp \ - tests/build/atf-c++/t_include_ui_hpp.cpp \ - tests/build/atf-c++/t_include_user_hpp.cpp \ - tests/build/atf-c++/t_include_utils_hpp.cpp \ - tests/build/atf-c++/t_use_macros_hpp.cpp - -# ------------------------------------------------------------------------- -# `tools' directory. -# ------------------------------------------------------------------------- - -bin_PROGRAMS = tools/atf-config -tools_atf_config_SOURCES = tools/atf-config.cpp -tools_atf_config_LDADD = -latf-c++ -tools_atf_config_LDFLAGS = -L. -dist_man_MANS += tools/atf-config.1 - -tools/atf-host-compile: $(srcdir)/tools/atf-host-compile.sh - sed -e 's,__ATF_PKGDATADIR__,$(srcdir)/atf-sh,g' \ - -e 's,__ATF_SHELL__,$(ATF_SHELL),g' \ - <$(srcdir)/tools/atf-host-compile.sh \ - >tools/atf-host-compile.tmp - chmod +x tools/atf-host-compile.tmp - mv tools/atf-host-compile.tmp tools/atf-host-compile -CLEANFILES += tools/atf-host-compile -CLEANFILES += tools/atf-host-compile.tmp -EXTRA_DIST += tools/atf-host-compile.sh - -libexec_PROGRAMS = tools/atf-cleanup -tools_atf_cleanup_SOURCES = tools/atf-cleanup.cpp -tools_atf_cleanup_LDADD = -latf-c++ -tools_atf_cleanup_LDFLAGS = -L. -dist_man_MANS += tools/atf-cleanup.1 - -bin_PROGRAMS += tools/atf-compile -tools_atf_compile_SOURCES = tools/atf-compile.cpp -tools_atf_compile_LDADD = -latf-c++ -tools_atf_compile_LDFLAGS = -L. -dist_man_MANS += tools/atf-compile.1 - -libexec_PROGRAMS += tools/atf-exec -tools_atf_exec_SOURCES = tools/atf-exec.cpp -tools_atf_exec_LDADD = -latf-c++ -tools_atf_exec_LDFLAGS = -L. -dist_man_MANS += tools/atf-exec.1 - -libexec_PROGRAMS += tools/atf-format -tools_atf_format_SOURCES = tools/atf-format.cpp -tools_atf_format_LDADD = -latf-c++ -tools_atf_format_LDFLAGS = -L. -dist_man_MANS += tools/atf-format.1 - -libexec_PROGRAMS += tools/atf-killpg -tools_atf_killpg_SOURCES = tools/atf-killpg.cpp -tools_atf_killpg_LDADD = -latf-c++ -tools_atf_killpg_LDFLAGS = -L. -dist_man_MANS += tools/atf-killpg.1 - -bin_PROGRAMS += tools/atf-report -tools_atf_report_SOURCES = tools/atf-report.cpp -tools_atf_report_LDADD = -latf-c++ -tools_atf_report_LDFLAGS = -L. -dist_man_MANS += tools/atf-report.1 - -bin_PROGRAMS += tools/atf-run -tools_atf_run_SOURCES = tools/atf-run.cpp -tools_atf_run_LDADD = -latf-c++ -tools_atf_run_LDFLAGS = -L. -dist_man_MANS += tools/atf-run.1 - -bin_PROGRAMS += tools/atf-version -tools_atf_version_SOURCES = tools/atf-version.cpp revision.h -tools_atf_version_LDADD = -latf-c++ -tools_atf_version_LDFLAGS = -L. -dist_man_MANS += tools/atf-version.1 - -BUILT_SOURCES = revision.h -revision.h: admin/revision.h $(srcdir)/admin/revision-dist.h - @if [ -f admin/revision.h ]; then \ - cmp -s admin/revision.h revision.h || \ - cp admin/revision.h revision.h; \ - else \ - cmp -s $(srcdir)/admin/revision-dist.h revision.h || \ - cp $(srcdir)/admin/revision-dist.h revision.h; \ - fi -CLEANFILES += revision.h - -hooksdir = $(pkgdatadir) -hooks_DATA = tools/atf-run.hooks -EXTRA_DIST += $(hooks_DATA) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/dist/atf/Makefile.in b/dist/atf/Makefile.in deleted file mode 100644 index afc2967bbd5f..000000000000 --- a/dist/atf/Makefile.in +++ /dev/null @@ -1,4097 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# ------------------------------------------------------------------------- -# Top directory. -# ------------------------------------------------------------------------- - - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -check_PROGRAMS = tests/bootstrap/h_app_empty$(EXEEXT) \ - tests/bootstrap/h_app_opts_args$(EXEEXT) \ - tests/bootstrap/h_tp_basic_c$(EXEEXT) \ - tests/bootstrap/h_tp_basic_cpp$(EXEEXT) -atf_atf_c_PROGRAMS = tests/atf/atf-c/t_config$(EXEEXT) \ - tests/atf/atf-c/t_dynstr$(EXEEXT) \ - tests/atf/atf-c/t_env$(EXEEXT) \ - tests/atf/atf-c/t_error$(EXEEXT) \ - tests/atf/atf-c/t_expand$(EXEEXT) \ - tests/atf/atf-c/t_fs$(EXEEXT) tests/atf/atf-c/t_io$(EXEEXT) \ - tests/atf/atf-c/t_list$(EXEEXT) \ - tests/atf/atf-c/t_macros$(EXEEXT) \ - tests/atf/atf-c/t_map$(EXEEXT) \ - tests/atf/atf-c/t_signals$(EXEEXT) \ - tests/atf/atf-c/t_tc$(EXEEXT) tests/atf/atf-c/t_tcr$(EXEEXT) \ - tests/atf/atf-c/t_sanity$(EXEEXT) \ - tests/atf/atf-c/t_text$(EXEEXT) tests/atf/atf-c/t_ui$(EXEEXT) \ - tests/atf/atf-c/t_user$(EXEEXT) -atf_atf_c___PROGRAMS = tests/atf/atf-c++/t_config$(EXEEXT) \ - tests/atf/atf-c++/t_env$(EXEEXT) \ - tests/atf/atf-c++/t_expand$(EXEEXT) \ - tests/atf/atf-c++/t_fs$(EXEEXT) \ - tests/atf/atf-c++/t_io$(EXEEXT) \ - tests/atf/atf-c++/t_macros$(EXEEXT) \ - tests/atf/atf-c++/t_parser$(EXEEXT) \ - tests/atf/atf-c++/t_signals$(EXEEXT) \ - tests/atf/atf-c++/t_tests$(EXEEXT) \ - tests/atf/atf-c++/t_text$(EXEEXT) \ - tests/atf/atf-c++/t_user$(EXEEXT) \ - tests/atf/atf-c++/t_utils$(EXEEXT) -atf_formats_PROGRAMS = tests/atf/formats/h_parser$(EXEEXT) \ - tests/atf/formats/t_writers$(EXEEXT) -atf_test_programs_PROGRAMS = tests/atf/test_programs/h_c$(EXEEXT) \ - tests/atf/test_programs/h_cpp$(EXEEXT) -atf_tools_PROGRAMS = tests/atf/tools/h_fail$(EXEEXT) \ - tests/atf/tools/h_misc$(EXEEXT) \ - tests/atf/tools/h_mode$(EXEEXT) \ - tests/atf/tools/h_pass$(EXEEXT) -bin_PROGRAMS = tools/atf-config$(EXEEXT) tools/atf-compile$(EXEEXT) \ - tools/atf-report$(EXEEXT) tools/atf-run$(EXEEXT) \ - tools/atf-version$(EXEEXT) -libexec_PROGRAMS = tools/atf-cleanup$(EXEEXT) tools/atf-exec$(EXEEXT) \ - tools/atf-format$(EXEEXT) tools/atf-killpg$(EXEEXT) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(atf_c_HEADERS) \ - $(atf_c___HEADERS) $(dist_man_MANS) $(include_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/bconfig.h.in $(top_srcdir)/atf-c/defs.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - admin/compile admin/config.guess admin/config.sub \ - admin/depcomp admin/install-sh admin/ltmain.sh admin/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/cxx-std-funcs.m4 \ - $(top_srcdir)/m4/developer-mode.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)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -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 -ARFLAGS = cru -tests_build_libuseless_a_AR = $(AR) $(ARFLAGS) -tests_build_libuseless_a_LIBADD = -am__dirstamp = $(am__leading_dot)dirstamp -am_tests_build_libuseless_a_OBJECTS = \ - tests/build/t_include_atf_c_h.$(OBJEXT) \ - tests/build/t_include_atf_c++_hpp.$(OBJEXT) \ - tests/build/atf-c/t_include_config_h.$(OBJEXT) \ - tests/build/atf-c/t_include_dynstr_h.$(OBJEXT) \ - tests/build/atf-c/t_include_env_h.$(OBJEXT) \ - tests/build/atf-c/t_include_error_h.$(OBJEXT) \ - tests/build/atf-c/t_include_expand_h.$(OBJEXT) \ - tests/build/atf-c/t_include_fs_h.$(OBJEXT) \ - tests/build/atf-c/t_include_io_h.$(OBJEXT) \ - tests/build/atf-c/t_include_list_h.$(OBJEXT) \ - tests/build/atf-c/t_include_macros_h.$(OBJEXT) \ - tests/build/atf-c/t_include_map_h.$(OBJEXT) \ - tests/build/atf-c/t_include_object_h.$(OBJEXT) \ - tests/build/atf-c/t_include_sanity_h.$(OBJEXT) \ - tests/build/atf-c/t_include_signals_h.$(OBJEXT) \ - tests/build/atf-c/t_include_tc_h.$(OBJEXT) \ - tests/build/atf-c/t_include_tcr_h.$(OBJEXT) \ - tests/build/atf-c/t_include_text_h.$(OBJEXT) \ - tests/build/atf-c/t_include_tp_h.$(OBJEXT) \ - tests/build/atf-c/t_include_ui_h.$(OBJEXT) \ - tests/build/atf-c/t_use_macros_h.$(OBJEXT) \ - tests/build/atf-c++/t_include_application_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_atffile_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_config_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_env_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_exceptions_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_expand_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_formats_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_fs_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_io_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_macros_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_parser_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_sanity_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_signals_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_tests_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_text_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_ui_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_user_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_include_utils_hpp.$(OBJEXT) \ - tests/build/atf-c++/t_use_macros_hpp.$(OBJEXT) -tests_build_libuseless_a_OBJECTS = \ - $(am_tests_build_libuseless_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/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(atf_atf_cdir)" \ - "$(DESTDIR)$(atf_atf_c__dir)" "$(DESTDIR)$(atf_formatsdir)" \ - "$(DESTDIR)$(atf_test_programsdir)" \ - "$(DESTDIR)$(atf_toolsdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(atf_atf_shdir)" \ - "$(DESTDIR)$(atf_datadir)" "$(DESTDIR)$(atf_formatsdir)" \ - "$(DESTDIR)$(atf_test_programsdir)" \ - "$(DESTDIR)$(atf_toolsdir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" \ - "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \ - "$(DESTDIR)$(atf_atf_cdir)" "$(DESTDIR)$(atf_atf_c__dir)" \ - "$(DESTDIR)$(atf_atf_shdir)" "$(DESTDIR)$(atf_datadir)" \ - "$(DESTDIR)$(atf_formatsdir)" "$(DESTDIR)$(atf_shdir)" \ - "$(DESTDIR)$(atf_test_programsdir)" \ - "$(DESTDIR)$(atf_toolsdir)" "$(DESTDIR)$(cssdir)" \ - "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" \ - "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgtestsdir)" \ - "$(DESTDIR)$(xsldir)" "$(DESTDIR)$(atf_cdir)" \ - "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libatf_c___la_DEPENDENCIES = -am_libatf_c___la_OBJECTS = atf-c++/application.lo atf-c++/atffile.lo \ - atf-c++/config.lo atf-c++/env.lo atf-c++/exceptions.lo \ - atf-c++/expand.lo atf-c++/formats.lo atf-c++/fs.lo \ - atf-c++/io.lo atf-c++/parser.lo atf-c++/signals.lo \ - atf-c++/tests.lo atf-c++/text.lo atf-c++/ui.lo atf-c++/user.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_LIBADD = -am_libatf_c_la_OBJECTS = atf-c/config.lo atf-c/dynstr.lo atf-c/env.lo \ - atf-c/error.lo atf-c/expand.lo atf-c/fs.lo atf-c/io.lo \ - atf-c/list.lo atf-c/map.lo atf-c/object.lo atf-c/sanity.lo \ - atf-c/signals.lo atf-c/text.lo atf-c/ui.lo atf-c/user.lo \ - atf-c/tc.lo atf-c/tcr.lo atf-c/tp.lo atf-c/tp_main.lo -nodist_libatf_c_la_OBJECTS = -libatf_c_la_OBJECTS = $(am_libatf_c_la_OBJECTS) \ - $(nodist_libatf_c_la_OBJECTS) -atf_atf_cPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -atf_atf_c__PROGRAMS_INSTALL = $(INSTALL_PROGRAM) -atf_formatsPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -atf_test_programsPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -atf_toolsPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(atf_atf_c_PROGRAMS) $(atf_atf_c___PROGRAMS) \ - $(atf_formats_PROGRAMS) $(atf_test_programs_PROGRAMS) \ - $(atf_tools_PROGRAMS) $(bin_PROGRAMS) $(libexec_PROGRAMS) -am_tests_atf_atf_c___t_config_OBJECTS = \ - tests/atf/atf-c++/t_config.$(OBJEXT) -tests_atf_atf_c___t_config_OBJECTS = \ - $(am_tests_atf_atf_c___t_config_OBJECTS) -tests_atf_atf_c___t_config_DEPENDENCIES = -tests_atf_atf_c___t_config_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_config_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_env_OBJECTS = \ - tests/atf/atf-c++/t_env.$(OBJEXT) -tests_atf_atf_c___t_env_OBJECTS = \ - $(am_tests_atf_atf_c___t_env_OBJECTS) -tests_atf_atf_c___t_env_DEPENDENCIES = -tests_atf_atf_c___t_env_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_atf_c___t_env_LDFLAGS) $(LDFLAGS) -o \ - $@ -am_tests_atf_atf_c___t_expand_OBJECTS = \ - tests/atf/atf-c++/t_expand.$(OBJEXT) -tests_atf_atf_c___t_expand_OBJECTS = \ - $(am_tests_atf_atf_c___t_expand_OBJECTS) -tests_atf_atf_c___t_expand_DEPENDENCIES = -tests_atf_atf_c___t_expand_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_expand_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_fs_OBJECTS = tests/atf/atf-c++/t_fs.$(OBJEXT) -tests_atf_atf_c___t_fs_OBJECTS = $(am_tests_atf_atf_c___t_fs_OBJECTS) -tests_atf_atf_c___t_fs_DEPENDENCIES = -tests_atf_atf_c___t_fs_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_atf_c___t_fs_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_io_OBJECTS = tests/atf/atf-c++/t_io.$(OBJEXT) -tests_atf_atf_c___t_io_OBJECTS = $(am_tests_atf_atf_c___t_io_OBJECTS) -tests_atf_atf_c___t_io_DEPENDENCIES = -tests_atf_atf_c___t_io_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_atf_c___t_io_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_macros_OBJECTS = \ - tests/atf/atf-c++/t_macros.$(OBJEXT) -tests_atf_atf_c___t_macros_OBJECTS = \ - $(am_tests_atf_atf_c___t_macros_OBJECTS) -tests_atf_atf_c___t_macros_DEPENDENCIES = -tests_atf_atf_c___t_macros_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_macros_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_parser_OBJECTS = \ - tests/atf/atf-c++/t_parser.$(OBJEXT) -tests_atf_atf_c___t_parser_OBJECTS = \ - $(am_tests_atf_atf_c___t_parser_OBJECTS) -tests_atf_atf_c___t_parser_DEPENDENCIES = -tests_atf_atf_c___t_parser_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_parser_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_signals_OBJECTS = \ - tests/atf/atf-c++/t_signals.$(OBJEXT) -tests_atf_atf_c___t_signals_OBJECTS = \ - $(am_tests_atf_atf_c___t_signals_OBJECTS) -tests_atf_atf_c___t_signals_DEPENDENCIES = -tests_atf_atf_c___t_signals_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_signals_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_tests_OBJECTS = \ - tests/atf/atf-c++/t_tests.$(OBJEXT) -tests_atf_atf_c___t_tests_OBJECTS = \ - $(am_tests_atf_atf_c___t_tests_OBJECTS) -tests_atf_atf_c___t_tests_DEPENDENCIES = -tests_atf_atf_c___t_tests_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_tests_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_text_OBJECTS = \ - tests/atf/atf-c++/t_text.$(OBJEXT) -tests_atf_atf_c___t_text_OBJECTS = \ - $(am_tests_atf_atf_c___t_text_OBJECTS) -tests_atf_atf_c___t_text_DEPENDENCIES = -tests_atf_atf_c___t_text_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) $(tests_atf_atf_c___t_text_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_user_OBJECTS = \ - tests/atf/atf-c++/t_user.$(OBJEXT) -tests_atf_atf_c___t_user_OBJECTS = \ - $(am_tests_atf_atf_c___t_user_OBJECTS) -tests_atf_atf_c___t_user_DEPENDENCIES = -tests_atf_atf_c___t_user_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) $(tests_atf_atf_c___t_user_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_tests_atf_atf_c___t_utils_OBJECTS = \ - tests/atf/atf-c++/t_utils.$(OBJEXT) -tests_atf_atf_c___t_utils_OBJECTS = \ - $(am_tests_atf_atf_c___t_utils_OBJECTS) -tests_atf_atf_c___t_utils_DEPENDENCIES = -tests_atf_atf_c___t_utils_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_atf_c___t_utils_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_config_OBJECTS = \ - tests/atf/atf-c/t_config.$(OBJEXT) -tests_atf_atf_c_t_config_OBJECTS = \ - $(am_tests_atf_atf_c_t_config_OBJECTS) -tests_atf_atf_c_t_config_DEPENDENCIES = -tests_atf_atf_c_t_config_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_config_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_dynstr_OBJECTS = \ - tests/atf/atf-c/t_dynstr.$(OBJEXT) -tests_atf_atf_c_t_dynstr_OBJECTS = \ - $(am_tests_atf_atf_c_t_dynstr_OBJECTS) -tests_atf_atf_c_t_dynstr_DEPENDENCIES = -tests_atf_atf_c_t_dynstr_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_dynstr_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_env_OBJECTS = tests/atf/atf-c/t_env.$(OBJEXT) -tests_atf_atf_c_t_env_OBJECTS = $(am_tests_atf_atf_c_t_env_OBJECTS) -tests_atf_atf_c_t_env_DEPENDENCIES = -tests_atf_atf_c_t_env_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_env_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_error_OBJECTS = \ - tests/atf/atf-c/t_error.$(OBJEXT) -tests_atf_atf_c_t_error_OBJECTS = \ - $(am_tests_atf_atf_c_t_error_OBJECTS) -tests_atf_atf_c_t_error_DEPENDENCIES = -tests_atf_atf_c_t_error_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_error_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_expand_OBJECTS = \ - tests/atf/atf-c/t_expand.$(OBJEXT) -tests_atf_atf_c_t_expand_OBJECTS = \ - $(am_tests_atf_atf_c_t_expand_OBJECTS) -tests_atf_atf_c_t_expand_DEPENDENCIES = -tests_atf_atf_c_t_expand_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_expand_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_fs_OBJECTS = tests/atf/atf-c/t_fs.$(OBJEXT) -tests_atf_atf_c_t_fs_OBJECTS = $(am_tests_atf_atf_c_t_fs_OBJECTS) -tests_atf_atf_c_t_fs_DEPENDENCIES = -tests_atf_atf_c_t_fs_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_fs_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_io_OBJECTS = tests/atf/atf-c/t_io.$(OBJEXT) -tests_atf_atf_c_t_io_OBJECTS = $(am_tests_atf_atf_c_t_io_OBJECTS) -tests_atf_atf_c_t_io_DEPENDENCIES = -tests_atf_atf_c_t_io_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_io_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_list_OBJECTS = tests/atf/atf-c/t_list.$(OBJEXT) -tests_atf_atf_c_t_list_OBJECTS = $(am_tests_atf_atf_c_t_list_OBJECTS) -tests_atf_atf_c_t_list_DEPENDENCIES = -tests_atf_atf_c_t_list_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_list_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_macros_OBJECTS = \ - tests/atf/atf-c/t_macros.$(OBJEXT) -tests_atf_atf_c_t_macros_OBJECTS = \ - $(am_tests_atf_atf_c_t_macros_OBJECTS) -tests_atf_atf_c_t_macros_DEPENDENCIES = -tests_atf_atf_c_t_macros_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_macros_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_map_OBJECTS = tests/atf/atf-c/t_map.$(OBJEXT) -tests_atf_atf_c_t_map_OBJECTS = $(am_tests_atf_atf_c_t_map_OBJECTS) -tests_atf_atf_c_t_map_DEPENDENCIES = -tests_atf_atf_c_t_map_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_map_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_sanity_OBJECTS = \ - tests/atf/atf-c/t_sanity.$(OBJEXT) -tests_atf_atf_c_t_sanity_OBJECTS = \ - $(am_tests_atf_atf_c_t_sanity_OBJECTS) -tests_atf_atf_c_t_sanity_DEPENDENCIES = -tests_atf_atf_c_t_sanity_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_sanity_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_signals_OBJECTS = \ - tests/atf/atf-c/t_signals.$(OBJEXT) -tests_atf_atf_c_t_signals_OBJECTS = \ - $(am_tests_atf_atf_c_t_signals_OBJECTS) -tests_atf_atf_c_t_signals_DEPENDENCIES = -tests_atf_atf_c_t_signals_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(tests_atf_atf_c_t_signals_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_tc_OBJECTS = tests/atf/atf-c/t_tc.$(OBJEXT) -tests_atf_atf_c_t_tc_OBJECTS = $(am_tests_atf_atf_c_t_tc_OBJECTS) -tests_atf_atf_c_t_tc_DEPENDENCIES = -tests_atf_atf_c_t_tc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_tc_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_tcr_OBJECTS = tests/atf/atf-c/t_tcr.$(OBJEXT) -tests_atf_atf_c_t_tcr_OBJECTS = $(am_tests_atf_atf_c_t_tcr_OBJECTS) -tests_atf_atf_c_t_tcr_DEPENDENCIES = -tests_atf_atf_c_t_tcr_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_tcr_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_text_OBJECTS = tests/atf/atf-c/t_text.$(OBJEXT) -tests_atf_atf_c_t_text_OBJECTS = $(am_tests_atf_atf_c_t_text_OBJECTS) -tests_atf_atf_c_t_text_DEPENDENCIES = -tests_atf_atf_c_t_text_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_text_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_ui_OBJECTS = tests/atf/atf-c/t_ui.$(OBJEXT) -tests_atf_atf_c_t_ui_OBJECTS = $(am_tests_atf_atf_c_t_ui_OBJECTS) -tests_atf_atf_c_t_ui_DEPENDENCIES = -tests_atf_atf_c_t_ui_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_ui_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_atf_c_t_user_OBJECTS = tests/atf/atf-c/t_user.$(OBJEXT) -tests_atf_atf_c_t_user_OBJECTS = $(am_tests_atf_atf_c_t_user_OBJECTS) -tests_atf_atf_c_t_user_DEPENDENCIES = -tests_atf_atf_c_t_user_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(tests_atf_atf_c_t_user_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_formats_h_parser_OBJECTS = \ - tests/atf/formats/h_parser.$(OBJEXT) -tests_atf_formats_h_parser_OBJECTS = \ - $(am_tests_atf_formats_h_parser_OBJECTS) -tests_atf_formats_h_parser_DEPENDENCIES = -tests_atf_formats_h_parser_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_formats_h_parser_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_formats_t_writers_OBJECTS = \ - tests/atf/formats/t_writers.$(OBJEXT) -tests_atf_formats_t_writers_OBJECTS = \ - $(am_tests_atf_formats_t_writers_OBJECTS) -tests_atf_formats_t_writers_DEPENDENCIES = -tests_atf_formats_t_writers_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_formats_t_writers_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_test_programs_h_c_OBJECTS = \ - tests/atf/test_programs/h_c.$(OBJEXT) -tests_atf_test_programs_h_c_OBJECTS = \ - $(am_tests_atf_test_programs_h_c_OBJECTS) -tests_atf_test_programs_h_c_DEPENDENCIES = -tests_atf_test_programs_h_c_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(tests_atf_test_programs_h_c_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_tests_atf_test_programs_h_cpp_OBJECTS = \ - tests/atf/test_programs/h_cpp.$(OBJEXT) -tests_atf_test_programs_h_cpp_OBJECTS = \ - $(am_tests_atf_test_programs_h_cpp_OBJECTS) -tests_atf_test_programs_h_cpp_DEPENDENCIES = -tests_atf_test_programs_h_cpp_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_atf_test_programs_h_cpp_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_tools_h_fail_OBJECTS = tests/atf/tools/h_fail.$(OBJEXT) -tests_atf_tools_h_fail_OBJECTS = $(am_tests_atf_tools_h_fail_OBJECTS) -tests_atf_tools_h_fail_DEPENDENCIES = -tests_atf_tools_h_fail_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_tools_h_fail_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_tools_h_misc_OBJECTS = tests/atf/tools/h_misc.$(OBJEXT) -tests_atf_tools_h_misc_OBJECTS = $(am_tests_atf_tools_h_misc_OBJECTS) -tests_atf_tools_h_misc_DEPENDENCIES = -tests_atf_tools_h_misc_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_tools_h_misc_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_tools_h_mode_OBJECTS = tests/atf/tools/h_mode.$(OBJEXT) -tests_atf_tools_h_mode_OBJECTS = $(am_tests_atf_tools_h_mode_OBJECTS) -tests_atf_tools_h_mode_DEPENDENCIES = -tests_atf_tools_h_mode_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_tools_h_mode_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_atf_tools_h_pass_OBJECTS = tests/atf/tools/h_pass.$(OBJEXT) -tests_atf_tools_h_pass_OBJECTS = $(am_tests_atf_tools_h_pass_OBJECTS) -tests_atf_tools_h_pass_DEPENDENCIES = -tests_atf_tools_h_pass_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tests_atf_tools_h_pass_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_bootstrap_h_app_empty_OBJECTS = \ - tests/bootstrap/h_app_empty.$(OBJEXT) -tests_bootstrap_h_app_empty_OBJECTS = \ - $(am_tests_bootstrap_h_app_empty_OBJECTS) -tests_bootstrap_h_app_empty_DEPENDENCIES = -tests_bootstrap_h_app_empty_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_bootstrap_h_app_empty_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_bootstrap_h_app_opts_args_OBJECTS = \ - tests/bootstrap/h_app_opts_args.$(OBJEXT) -tests_bootstrap_h_app_opts_args_OBJECTS = \ - $(am_tests_bootstrap_h_app_opts_args_OBJECTS) -tests_bootstrap_h_app_opts_args_DEPENDENCIES = -tests_bootstrap_h_app_opts_args_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_bootstrap_h_app_opts_args_LDFLAGS) $(LDFLAGS) -o $@ -am_tests_bootstrap_h_tp_basic_c_OBJECTS = \ - tests/bootstrap/h_tp_basic_c.$(OBJEXT) -tests_bootstrap_h_tp_basic_c_OBJECTS = \ - $(am_tests_bootstrap_h_tp_basic_c_OBJECTS) -tests_bootstrap_h_tp_basic_c_DEPENDENCIES = -tests_bootstrap_h_tp_basic_c_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(tests_bootstrap_h_tp_basic_c_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_tests_bootstrap_h_tp_basic_cpp_OBJECTS = \ - tests/bootstrap/h_tp_basic_cpp.$(OBJEXT) -tests_bootstrap_h_tp_basic_cpp_OBJECTS = \ - $(am_tests_bootstrap_h_tp_basic_cpp_OBJECTS) -tests_bootstrap_h_tp_basic_cpp_DEPENDENCIES = -tests_bootstrap_h_tp_basic_cpp_LINK = $(LIBTOOL) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(tests_bootstrap_h_tp_basic_cpp_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_cleanup_OBJECTS = tools/atf-cleanup.$(OBJEXT) -tools_atf_cleanup_OBJECTS = $(am_tools_atf_cleanup_OBJECTS) -tools_atf_cleanup_DEPENDENCIES = -tools_atf_cleanup_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_cleanup_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_compile_OBJECTS = tools/atf-compile.$(OBJEXT) -tools_atf_compile_OBJECTS = $(am_tools_atf_compile_OBJECTS) -tools_atf_compile_DEPENDENCIES = -tools_atf_compile_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_compile_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_config_OBJECTS = tools/atf-config.$(OBJEXT) -tools_atf_config_OBJECTS = $(am_tools_atf_config_OBJECTS) -tools_atf_config_DEPENDENCIES = -tools_atf_config_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_config_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_exec_OBJECTS = tools/atf-exec.$(OBJEXT) -tools_atf_exec_OBJECTS = $(am_tools_atf_exec_OBJECTS) -tools_atf_exec_DEPENDENCIES = -tools_atf_exec_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_exec_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_format_OBJECTS = tools/atf-format.$(OBJEXT) -tools_atf_format_OBJECTS = $(am_tools_atf_format_OBJECTS) -tools_atf_format_DEPENDENCIES = -tools_atf_format_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_format_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_killpg_OBJECTS = tools/atf-killpg.$(OBJEXT) -tools_atf_killpg_OBJECTS = $(am_tools_atf_killpg_OBJECTS) -tools_atf_killpg_DEPENDENCIES = -tools_atf_killpg_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_killpg_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_report_OBJECTS = tools/atf-report.$(OBJEXT) -tools_atf_report_OBJECTS = $(am_tools_atf_report_OBJECTS) -tools_atf_report_DEPENDENCIES = -tools_atf_report_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_report_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_run_OBJECTS = tools/atf-run.$(OBJEXT) -tools_atf_run_OBJECTS = $(am_tools_atf_run_OBJECTS) -tools_atf_run_DEPENDENCIES = -tools_atf_run_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_run_LDFLAGS) $(LDFLAGS) -o $@ -am_tools_atf_version_OBJECTS = tools/atf-version.$(OBJEXT) -tools_atf_version_OBJECTS = $(am_tools_atf_version_OBJECTS) -tools_atf_version_DEPENDENCIES = -tools_atf_version_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(tools_atf_version_LDFLAGS) $(LDFLAGS) -o $@ -atf_atf_shSCRIPT_INSTALL = $(INSTALL_SCRIPT) -atf_dataSCRIPT_INSTALL = $(INSTALL_SCRIPT) -atf_formatsSCRIPT_INSTALL = $(INSTALL_SCRIPT) -atf_test_programsSCRIPT_INSTALL = $(INSTALL_SCRIPT) -atf_toolsSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(atf_atf_sh_SCRIPTS) $(atf_data_SCRIPTS) \ - $(atf_formats_SCRIPTS) $(atf_test_programs_SCRIPTS) \ - $(atf_tools_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/admin/depcomp -am__depfiles_maybe = depfiles -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) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -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) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(tests_build_libuseless_a_SOURCES) $(libatf_c___la_SOURCES) \ - $(libatf_c_la_SOURCES) $(nodist_libatf_c_la_SOURCES) \ - $(tests_atf_atf_c___t_config_SOURCES) \ - $(tests_atf_atf_c___t_env_SOURCES) \ - $(tests_atf_atf_c___t_expand_SOURCES) \ - $(tests_atf_atf_c___t_fs_SOURCES) \ - $(tests_atf_atf_c___t_io_SOURCES) \ - $(tests_atf_atf_c___t_macros_SOURCES) \ - $(tests_atf_atf_c___t_parser_SOURCES) \ - $(tests_atf_atf_c___t_signals_SOURCES) \ - $(tests_atf_atf_c___t_tests_SOURCES) \ - $(tests_atf_atf_c___t_text_SOURCES) \ - $(tests_atf_atf_c___t_user_SOURCES) \ - $(tests_atf_atf_c___t_utils_SOURCES) \ - $(tests_atf_atf_c_t_config_SOURCES) \ - $(tests_atf_atf_c_t_dynstr_SOURCES) \ - $(tests_atf_atf_c_t_env_SOURCES) \ - $(tests_atf_atf_c_t_error_SOURCES) \ - $(tests_atf_atf_c_t_expand_SOURCES) \ - $(tests_atf_atf_c_t_fs_SOURCES) \ - $(tests_atf_atf_c_t_io_SOURCES) \ - $(tests_atf_atf_c_t_list_SOURCES) \ - $(tests_atf_atf_c_t_macros_SOURCES) \ - $(tests_atf_atf_c_t_map_SOURCES) \ - $(tests_atf_atf_c_t_sanity_SOURCES) \ - $(tests_atf_atf_c_t_signals_SOURCES) \ - $(tests_atf_atf_c_t_tc_SOURCES) \ - $(tests_atf_atf_c_t_tcr_SOURCES) \ - $(tests_atf_atf_c_t_text_SOURCES) \ - $(tests_atf_atf_c_t_ui_SOURCES) \ - $(tests_atf_atf_c_t_user_SOURCES) \ - $(tests_atf_formats_h_parser_SOURCES) \ - $(tests_atf_formats_t_writers_SOURCES) \ - $(tests_atf_test_programs_h_c_SOURCES) \ - $(tests_atf_test_programs_h_cpp_SOURCES) \ - $(tests_atf_tools_h_fail_SOURCES) \ - $(tests_atf_tools_h_misc_SOURCES) \ - $(tests_atf_tools_h_mode_SOURCES) \ - $(tests_atf_tools_h_pass_SOURCES) \ - $(tests_bootstrap_h_app_empty_SOURCES) \ - $(tests_bootstrap_h_app_opts_args_SOURCES) \ - $(tests_bootstrap_h_tp_basic_c_SOURCES) \ - $(tests_bootstrap_h_tp_basic_cpp_SOURCES) \ - $(tools_atf_cleanup_SOURCES) $(tools_atf_compile_SOURCES) \ - $(tools_atf_config_SOURCES) $(tools_atf_exec_SOURCES) \ - $(tools_atf_format_SOURCES) $(tools_atf_killpg_SOURCES) \ - $(tools_atf_report_SOURCES) $(tools_atf_run_SOURCES) \ - $(tools_atf_version_SOURCES) -DIST_SOURCES = $(tests_build_libuseless_a_SOURCES) \ - $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ - $(tests_atf_atf_c___t_config_SOURCES) \ - $(tests_atf_atf_c___t_env_SOURCES) \ - $(tests_atf_atf_c___t_expand_SOURCES) \ - $(tests_atf_atf_c___t_fs_SOURCES) \ - $(tests_atf_atf_c___t_io_SOURCES) \ - $(tests_atf_atf_c___t_macros_SOURCES) \ - $(tests_atf_atf_c___t_parser_SOURCES) \ - $(tests_atf_atf_c___t_signals_SOURCES) \ - $(tests_atf_atf_c___t_tests_SOURCES) \ - $(tests_atf_atf_c___t_text_SOURCES) \ - $(tests_atf_atf_c___t_user_SOURCES) \ - $(tests_atf_atf_c___t_utils_SOURCES) \ - $(tests_atf_atf_c_t_config_SOURCES) \ - $(tests_atf_atf_c_t_dynstr_SOURCES) \ - $(tests_atf_atf_c_t_env_SOURCES) \ - $(tests_atf_atf_c_t_error_SOURCES) \ - $(tests_atf_atf_c_t_expand_SOURCES) \ - $(tests_atf_atf_c_t_fs_SOURCES) \ - $(tests_atf_atf_c_t_io_SOURCES) \ - $(tests_atf_atf_c_t_list_SOURCES) \ - $(tests_atf_atf_c_t_macros_SOURCES) \ - $(tests_atf_atf_c_t_map_SOURCES) \ - $(tests_atf_atf_c_t_sanity_SOURCES) \ - $(tests_atf_atf_c_t_signals_SOURCES) \ - $(tests_atf_atf_c_t_tc_SOURCES) \ - $(tests_atf_atf_c_t_tcr_SOURCES) \ - $(tests_atf_atf_c_t_text_SOURCES) \ - $(tests_atf_atf_c_t_ui_SOURCES) \ - $(tests_atf_atf_c_t_user_SOURCES) \ - $(tests_atf_formats_h_parser_SOURCES) \ - $(tests_atf_formats_t_writers_SOURCES) \ - $(tests_atf_test_programs_h_c_SOURCES) \ - $(tests_atf_test_programs_h_cpp_SOURCES) \ - $(tests_atf_tools_h_fail_SOURCES) \ - $(tests_atf_tools_h_misc_SOURCES) \ - $(tests_atf_tools_h_mode_SOURCES) \ - $(tests_atf_tools_h_pass_SOURCES) \ - $(tests_bootstrap_h_app_empty_SOURCES) \ - $(tests_bootstrap_h_app_opts_args_SOURCES) \ - $(tests_bootstrap_h_tp_basic_c_SOURCES) \ - $(tests_bootstrap_h_tp_basic_cpp_SOURCES) \ - $(tools_atf_cleanup_SOURCES) $(tools_atf_compile_SOURCES) \ - $(tools_atf_config_SOURCES) $(tools_atf_exec_SOURCES) \ - $(tools_atf_format_SOURCES) $(tools_atf_killpg_SOURCES) \ - $(tools_atf_report_SOURCES) $(tools_atf_run_SOURCES) \ - $(tools_atf_version_SOURCES) -man1dir = $(mandir)/man1 -man3dir = $(mandir)/man3 -man4dir = $(mandir)/man4 -man5dir = $(mandir)/man5 -man7dir = $(mandir)/man7 -NROFF = nroff -MANS = $(dist_man_MANS) $(man_MANS) -atf_atf_cDATA_INSTALL = $(INSTALL_DATA) -atf_atf_c__DATA_INSTALL = $(INSTALL_DATA) -atf_atf_shDATA_INSTALL = $(INSTALL_DATA) -atf_dataDATA_INSTALL = $(INSTALL_DATA) -atf_formatsDATA_INSTALL = $(INSTALL_DATA) -atf_shDATA_INSTALL = $(INSTALL_DATA) -atf_test_programsDATA_INSTALL = $(INSTALL_DATA) -atf_toolsDATA_INSTALL = $(INSTALL_DATA) -cssDATA_INSTALL = $(INSTALL_DATA) -docDATA_INSTALL = $(INSTALL_DATA) -dtdDATA_INSTALL = $(INSTALL_DATA) -egDATA_INSTALL = $(INSTALL_DATA) -hooksDATA_INSTALL = $(INSTALL_DATA) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -pkgtestsDATA_INSTALL = $(INSTALL_DATA) -xslDATA_INSTALL = $(INSTALL_DATA) -DATA = $(atf_atf_c_DATA) $(atf_atf_c___DATA) $(atf_atf_sh_DATA) \ - $(atf_data_DATA) $(atf_formats_DATA) $(atf_sh_DATA) \ - $(atf_test_programs_DATA) $(atf_tools_DATA) $(css_DATA) \ - $(doc_DATA) $(dtd_DATA) $(eg_DATA) $(hooks_DATA) \ - $(pkgconfig_DATA) $(pkgtests_DATA) $(xsl_DATA) -atf_cHEADERS_INSTALL = $(INSTALL_HEADER) -atf_c__HEADERS_INSTALL = $(INSTALL_HEADER) -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(atf_c_HEADERS) $(atf_c___HEADERS) $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -ATF_CONFSUBDIR = @ATF_CONFSUBDIR@ -ATF_SHELL = @ATF_SHELL@ -ATF_WORKDIR = @ATF_WORKDIR@ -ATTRIBUTE_NORETURN = @ATTRIBUTE_NORETURN@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MTN = @MTN@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -atf_arch = @atf_arch@ -atf_confdir = @atf_confdir@ -atf_cssdir = @atf_cssdir@ -atf_dtddir = @atf_dtddir@ -atf_egdir = @atf_egdir@ -atf_machine = @atf_machine@ -atf_pkgconfigdir = @atf_pkgconfigdir@ -atf_xsldir = @atf_xsldir@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -doc_DATA = AUTHORS COPYING NEWS README ROADMAP -EXTRA_DIST = $(doc_DATA) admin/check-install.sh \ - 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 \ - admin/revision-dist.h $(atf_sh_DATA) $(css_DATA) $(dtd_DATA) \ - $(eg_DATA) data/atf-c.pc.in data/atf-c++.pc.in $(xsl_DATA) \ - doc/atf.7.in tests/bootstrap/h_tp_basic_sh.sh \ - tests/bootstrap/h_tp_atf_check_sh.sh tests/bootstrap/testsuite \ - tests/bootstrap/package.m4 tests/bootstrap/testsuite.at \ - $(testsuite_incs) $(pkgtests_DATA) $(atf_atf_c_DATA) \ - $(atf_atf_c___DATA) $(atf_atf_sh_DATA) \ - tests/atf/atf-sh/h_misc.sh tests/atf/atf-sh/t_atf_check.sh \ - tests/atf/atf-sh/t_config.sh tests/atf/atf-sh/t_normalize.sh \ - tests/atf/atf-sh/t_tc.sh tests/atf/atf-sh/t_tp.sh \ - $(atf_data_DATA) tests/atf/data/t_pkg_config.sh \ - $(atf_formats_DATA) tests/atf/formats/t_parsers.sh \ - $(atf_test_programs_DATA) tests/atf/test_programs/common.sh \ - tests/atf/test_programs/h_sh.sh \ - tests/atf/test_programs/t_cleanup.sh \ - tests/atf/test_programs/t_config.sh \ - tests/atf/test_programs/t_env.sh \ - tests/atf/test_programs/t_fork.sh \ - tests/atf/test_programs/t_meta_data.sh \ - tests/atf/test_programs/t_srcdir.sh \ - tests/atf/test_programs/t_status.sh \ - tests/atf/test_programs/t_workdir.sh $(atf_tools_DATA) \ - tests/atf/tools/t_atf_cleanup.sh \ - tests/atf/tools/t_atf_compile.sh \ - tests/atf/tools/t_atf_config.sh tests/atf/tools/t_atf_exec.sh \ - tests/atf/tools/t_atf_killpg.sh \ - tests/atf/tools/t_atf_report.sh tests/atf/tools/t_atf_run.sh \ - tools/atf-host-compile.sh $(hooks_DATA) -AM_CPPFLAGS = -DATF_ARCH=\"$(atf_arch)\" \ - -DATF_CONFDIR=\"$(atf_confdir)\" \ - -DATF_LIBEXECDIR=\"$(libexecdir)\" \ - -DATF_MACHINE=\"$(atf_machine)\" \ - -DATF_PKGDATADIR=\"$(pkgdatadir)\" \ - -DATF_SHELL=\"$(ATF_SHELL)\" \ - -DATF_WORKDIR=\"$(ATF_WORKDIR)\" - -ATF_COMPILE_DEPS = $(srcdir)/atf-sh/atf.init.subr \ - tools/atf-host-compile -ATF_COMPILE_SH = ./tools/atf-host-compile -CLEANFILES = admin/revision.h data/atf-c.pc data/atf-c++.pc doc/atf.7 \ - tests/bootstrap/h_tp_basic_sh \ - tests/bootstrap/h_tp_atf_check_sh installcheck.log \ - tests/atf/atf-sh/h_misc tests/atf/atf-sh/t_atf_check \ - tests/atf/atf-sh/t_config tests/atf/atf-sh/t_normalize \ - tests/atf/atf-sh/t_tc tests/atf/atf-sh/t_tp \ - tests/atf/data/t_pkg_config tests/atf/formats/t_parsers \ - tests/atf/test_programs/h_sh tests/atf/test_programs/t_cleanup \ - tests/atf/test_programs/t_config tests/atf/test_programs/t_env \ - tests/atf/test_programs/t_fork \ - tests/atf/test_programs/t_meta_data \ - tests/atf/test_programs/t_srcdir \ - tests/atf/test_programs/t_status \ - tests/atf/test_programs/t_workdir \ - tests/atf/tools/t_atf_cleanup tests/atf/tools/t_atf_compile \ - tests/atf/tools/t_atf_config tests/atf/tools/t_atf_exec \ - tests/atf/tools/t_atf_killpg tests/atf/tools/t_atf_report \ - tests/atf/tools/t_atf_run tools/atf-host-compile \ - tools/atf-host-compile.tmp revision.h - -# ------------------------------------------------------------------------- -# `atf-c' directory. -# ------------------------------------------------------------------------- - -# ------------------------------------------------------------------------- -# `atf-c++' directory. -# ------------------------------------------------------------------------- -lib_LTLIBRARIES = libatf-c.la libatf-c++.la -libatf_c_la_SOURCES = atf-c/config.c \ - atf-c/config.h \ - atf-c/dynstr.c \ - atf-c/dynstr.h \ - atf-c/env.c \ - atf-c/env.h \ - atf-c/error.c \ - atf-c/error.h \ - atf-c/expand.c \ - atf-c/expand.h \ - atf-c/fs.c \ - atf-c/fs.h \ - atf-c/io.c \ - atf-c/io.h \ - atf-c/list.c \ - atf-c/list.h \ - atf-c/macros.h \ - atf-c/map.c \ - atf-c/map.h \ - atf-c/object.c \ - atf-c/object.h \ - atf-c/sanity.c \ - atf-c/sanity.h \ - atf-c/signals.c \ - atf-c/signals.h \ - atf-c/text.c \ - atf-c/text.h \ - atf-c/ui.c \ - atf-c/ui.h \ - atf-c/user.c \ - atf-c/user.h \ - atf-c/tc.c \ - atf-c/tc.h \ - atf-c/tcr.c \ - atf-c/tcr.h \ - atf-c/tp.c \ - atf-c/tp.h \ - atf-c/tp_main.c - -nodist_libatf_c_la_SOURCES = \ - atf-c/defs.h - -include_HEADERS = atf-c.h atf-c++.hpp -atf_c_HEADERS = atf-c/config.h \ - atf-c/defs.h \ - atf-c/dynstr.h \ - atf-c/env.h \ - atf-c/error.h \ - atf-c/expand.h \ - atf-c/fs.h \ - atf-c/io.h \ - atf-c/list.h \ - atf-c/macros.h \ - atf-c/map.h \ - atf-c/object.h \ - atf-c/sanity.h \ - atf-c/signals.h \ - atf-c/tc.h \ - atf-c/tcr.h \ - atf-c/text.h \ - atf-c/tp.h \ - atf-c/ui.h \ - atf-c/user.h - -atf_cdir = $(includedir)/atf-c -dist_man_MANS = atf-c/atf-c-api.3 atf-c++/atf-c++-api.3 \ - atf-sh/atf-sh-api.3 doc/atf-formats.5 doc/atf-test-case.4 \ - doc/atf-test-program.1 tools/atf-config.1 tools/atf-cleanup.1 \ - tools/atf-compile.1 tools/atf-exec.1 tools/atf-format.1 \ - tools/atf-killpg.1 tools/atf-report.1 tools/atf-run.1 \ - tools/atf-version.1 -libatf_c___la_LDFLAGS = -L. -libatf_c___la_LIBADD = -latf-c -libatf_c___la_SOURCES = atf-c++/application.cpp \ - atf-c++/application.hpp \ - atf-c++/atffile.cpp \ - atf-c++/atffile.hpp \ - atf-c++/config.cpp \ - atf-c++/config.hpp \ - atf-c++/env.cpp \ - atf-c++/env.hpp \ - atf-c++/exceptions.cpp \ - atf-c++/exceptions.hpp \ - atf-c++/expand.cpp \ - atf-c++/expand.hpp \ - atf-c++/formats.cpp \ - atf-c++/formats.hpp \ - atf-c++/fs.cpp \ - atf-c++/fs.hpp \ - atf-c++/io.cpp \ - atf-c++/io.hpp \ - atf-c++/macros.hpp \ - atf-c++/parser.cpp \ - atf-c++/parser.hpp \ - atf-c++/sanity.hpp \ - atf-c++/signals.cpp \ - atf-c++/signals.hpp \ - atf-c++/tests.cpp \ - atf-c++/tests.hpp \ - atf-c++/text.cpp \ - atf-c++/text.hpp \ - atf-c++/ui.cpp \ - atf-c++/ui.hpp \ - atf-c++/user.cpp \ - atf-c++/user.hpp \ - atf-c++/utils.hpp - -atf_c___HEADERS = atf-c++/application.hpp \ - atf-c++/atffile.hpp \ - atf-c++/config.hpp \ - atf-c++/env.hpp \ - atf-c++/exceptions.hpp \ - atf-c++/expand.hpp \ - atf-c++/formats.hpp \ - atf-c++/fs.hpp \ - atf-c++/io.hpp \ - atf-c++/macros.hpp \ - atf-c++/parser.hpp \ - atf-c++/sanity.hpp \ - atf-c++/tests.hpp \ - atf-c++/text.hpp \ - atf-c++/ui.hpp \ - atf-c++/user.hpp \ - atf-c++/utils.hpp - -atf_c__dir = $(includedir)/atf-c++ - -# ------------------------------------------------------------------------- -# `atf-sh' directory. -# ------------------------------------------------------------------------- -atf_sh_DATA = atf-sh/atf.footer.subr \ - atf-sh/atf.header.subr \ - atf-sh/atf.init.subr - -atf_shdir = $(pkgdatadir) - -# ------------------------------------------------------------------------- -# `data' directory. -# ------------------------------------------------------------------------- -cssdir = $(atf_cssdir) -css_DATA = data/tests-results.css -dtddir = $(atf_dtddir) -dtd_DATA = data/tests-results.dtd -egdir = $(atf_egdir) -eg_DATA = data/atf-run.hooks -pkgconfigdir = $(atf_pkgconfigdir) -pkgconfig_DATA = data/atf-c.pc data/atf-c++.pc -xsldir = $(atf_xsldir) -xsl_DATA = data/tests-results.xsl - -# ------------------------------------------------------------------------- -# `doc' directory. -# ------------------------------------------------------------------------- -man_MANS = doc/atf.7 - -# ------------------------------------------------------------------------- -# `m4' directory. -# ------------------------------------------------------------------------- -ACLOCAL_AMFLAGS = -I m4 -tests_bootstrap_h_app_empty_SOURCES = tests/bootstrap/h_app_empty.cpp -tests_bootstrap_h_app_empty_LDADD = -latf-c++ -tests_bootstrap_h_app_empty_LDFLAGS = -L. -tests_bootstrap_h_app_opts_args_SOURCES = tests/bootstrap/h_app_opts_args.cpp -tests_bootstrap_h_app_opts_args_LDADD = -latf-c++ -tests_bootstrap_h_app_opts_args_LDFLAGS = -L. -tests_bootstrap_h_tp_basic_c_SOURCES = tests/bootstrap/h_tp_basic_c.c -tests_bootstrap_h_tp_basic_c_LDADD = -latf-c -tests_bootstrap_h_tp_basic_c_LDFLAGS = -L. -tests_bootstrap_h_tp_basic_cpp_SOURCES = tests/bootstrap/h_tp_basic_cpp.cpp -tests_bootstrap_h_tp_basic_cpp_LDADD = -latf-c++ -tests_bootstrap_h_tp_basic_cpp_LDFLAGS = -L. -check_SCRIPTS = tests/bootstrap/h_tp_basic_sh \ - tests/bootstrap/h_tp_atf_check_sh -TESTS = $(srcdir)/tests/bootstrap/testsuite -DISTCLEANFILES = \ - tests/bootstrap/atconfig \ - testsuite.lineno \ - testsuite.log - -testsuite_incs = $(srcdir)/tests/bootstrap/t_application_help.at \ - $(srcdir)/tests/bootstrap/t_application_opts_args.at \ - $(srcdir)/tests/bootstrap/t_atf_config.at \ - $(srcdir)/tests/bootstrap/t_atf_format.at \ - $(srcdir)/tests/bootstrap/t_atf_run.at \ - $(srcdir)/tests/bootstrap/t_subr_atf_check.at \ - $(srcdir)/tests/bootstrap/t_test_program_compare.at \ - $(srcdir)/tests/bootstrap/t_test_program_filter.at \ - $(srcdir)/tests/bootstrap/t_test_program_list.at \ - $(srcdir)/tests/bootstrap/t_test_program_run.at - - -# ------------------------------------------------------------------------- -# `tests/atf' directory. -# ------------------------------------------------------------------------- -testsdir = $(exec_prefix)/tests -pkgtestsdir = $(exec_prefix)/tests/atf -pkgtests_DATA = tests/atf/Atffile -atf_atf_c_DATA = tests/atf/atf-c/Atffile -atf_atf_cdir = $(pkgtestsdir)/atf-c -tests_atf_atf_c_t_config_SOURCES = tests/atf/atf-c/t_config.c -tests_atf_atf_c_t_config_LDADD = -latf-c -tests_atf_atf_c_t_config_LDFLAGS = -L. -tests_atf_atf_c_t_dynstr_SOURCES = tests/atf/atf-c/t_dynstr.c -tests_atf_atf_c_t_dynstr_LDADD = -latf-c -tests_atf_atf_c_t_dynstr_LDFLAGS = -L. -tests_atf_atf_c_t_env_SOURCES = tests/atf/atf-c/t_env.c -tests_atf_atf_c_t_env_LDADD = -latf-c -tests_atf_atf_c_t_env_LDFLAGS = -L. -tests_atf_atf_c_t_error_SOURCES = tests/atf/atf-c/t_error.c -tests_atf_atf_c_t_error_LDADD = -latf-c -tests_atf_atf_c_t_error_LDFLAGS = -L. -tests_atf_atf_c_t_expand_SOURCES = tests/atf/atf-c/t_expand.c -tests_atf_atf_c_t_expand_LDADD = -latf-c -tests_atf_atf_c_t_expand_LDFLAGS = -L. -tests_atf_atf_c_t_fs_SOURCES = tests/atf/atf-c/t_fs.c -tests_atf_atf_c_t_fs_LDADD = -latf-c -tests_atf_atf_c_t_fs_LDFLAGS = -L. -tests_atf_atf_c_t_io_SOURCES = tests/atf/atf-c/t_io.c -tests_atf_atf_c_t_io_LDADD = -latf-c -tests_atf_atf_c_t_io_LDFLAGS = -L. -tests_atf_atf_c_t_list_SOURCES = tests/atf/atf-c/t_list.c -tests_atf_atf_c_t_list_LDADD = -latf-c -tests_atf_atf_c_t_list_LDFLAGS = -L. -tests_atf_atf_c_t_macros_SOURCES = tests/atf/atf-c/t_macros.c -tests_atf_atf_c_t_macros_LDADD = -latf-c -tests_atf_atf_c_t_macros_LDFLAGS = -L. -tests_atf_atf_c_t_map_SOURCES = tests/atf/atf-c/t_map.c -tests_atf_atf_c_t_map_LDADD = -latf-c -tests_atf_atf_c_t_map_LDFLAGS = -L. -tests_atf_atf_c_t_signals_SOURCES = tests/atf/atf-c/t_signals.c -tests_atf_atf_c_t_signals_LDADD = -latf-c -tests_atf_atf_c_t_signals_LDFLAGS = -L. -tests_atf_atf_c_t_tc_SOURCES = tests/atf/atf-c/t_tc.c -tests_atf_atf_c_t_tc_LDADD = -latf-c -tests_atf_atf_c_t_tc_LDFLAGS = -L. -tests_atf_atf_c_t_tcr_SOURCES = tests/atf/atf-c/t_tcr.c -tests_atf_atf_c_t_tcr_LDADD = -latf-c -tests_atf_atf_c_t_tcr_LDFLAGS = -L. -tests_atf_atf_c_t_sanity_SOURCES = tests/atf/atf-c/t_sanity.c -tests_atf_atf_c_t_sanity_LDADD = -latf-c -tests_atf_atf_c_t_sanity_LDFLAGS = -L. -tests_atf_atf_c_t_text_SOURCES = tests/atf/atf-c/t_text.c -tests_atf_atf_c_t_text_LDADD = -latf-c -tests_atf_atf_c_t_text_LDFLAGS = -L. -tests_atf_atf_c_t_ui_SOURCES = tests/atf/atf-c/t_ui.c -tests_atf_atf_c_t_ui_LDADD = -latf-c -tests_atf_atf_c_t_ui_LDFLAGS = -L. -tests_atf_atf_c_t_user_SOURCES = tests/atf/atf-c/t_user.c -tests_atf_atf_c_t_user_LDADD = -latf-c -tests_atf_atf_c_t_user_LDFLAGS = -L. -atf_atf_c___DATA = tests/atf/atf-c++/Atffile -atf_atf_c__dir = $(pkgtestsdir)/atf-c++ -tests_atf_atf_c___t_config_SOURCES = tests/atf/atf-c++/t_config.cpp -tests_atf_atf_c___t_config_LDADD = -latf-c++ -tests_atf_atf_c___t_config_LDFLAGS = -L. -tests_atf_atf_c___t_env_SOURCES = tests/atf/atf-c++/t_env.cpp -tests_atf_atf_c___t_env_LDADD = -latf-c++ -tests_atf_atf_c___t_env_LDFLAGS = -L. -tests_atf_atf_c___t_expand_SOURCES = tests/atf/atf-c++/t_expand.cpp -tests_atf_atf_c___t_expand_LDADD = -latf-c++ -tests_atf_atf_c___t_expand_LDFLAGS = -L. -tests_atf_atf_c___t_fs_SOURCES = tests/atf/atf-c++/t_fs.cpp -tests_atf_atf_c___t_fs_LDADD = -latf-c++ -tests_atf_atf_c___t_fs_LDFLAGS = -L. -tests_atf_atf_c___t_io_SOURCES = tests/atf/atf-c++/t_io.cpp -tests_atf_atf_c___t_io_LDADD = -latf-c++ -tests_atf_atf_c___t_io_LDFLAGS = -L. -tests_atf_atf_c___t_macros_SOURCES = tests/atf/atf-c++/t_macros.cpp -tests_atf_atf_c___t_macros_LDADD = -latf-c++ -tests_atf_atf_c___t_macros_LDFLAGS = -L. -tests_atf_atf_c___t_parser_SOURCES = tests/atf/atf-c++/t_parser.cpp -tests_atf_atf_c___t_parser_LDADD = -latf-c++ -tests_atf_atf_c___t_parser_LDFLAGS = -L. -tests_atf_atf_c___t_signals_SOURCES = tests/atf/atf-c++/t_signals.cpp -tests_atf_atf_c___t_signals_LDADD = -latf-c++ -tests_atf_atf_c___t_signals_LDFLAGS = -L. -tests_atf_atf_c___t_tests_SOURCES = tests/atf/atf-c++/t_tests.cpp -tests_atf_atf_c___t_tests_LDADD = -latf-c++ -tests_atf_atf_c___t_tests_LDFLAGS = -L. -tests_atf_atf_c___t_text_SOURCES = tests/atf/atf-c++/t_text.cpp -tests_atf_atf_c___t_text_LDADD = -latf-c++ -tests_atf_atf_c___t_text_LDFLAGS = -L. -tests_atf_atf_c___t_user_SOURCES = tests/atf/atf-c++/t_user.cpp -tests_atf_atf_c___t_user_LDADD = -latf-c++ -tests_atf_atf_c___t_user_LDFLAGS = -L. -tests_atf_atf_c___t_utils_SOURCES = tests/atf/atf-c++/t_utils.cpp -tests_atf_atf_c___t_utils_LDADD = -latf-c++ -tests_atf_atf_c___t_utils_LDFLAGS = -L. -atf_atf_sh_DATA = tests/atf/atf-sh/Atffile -atf_atf_shdir = $(pkgtestsdir)/atf-sh -atf_atf_sh_SCRIPTS = tests/atf/atf-sh/h_misc \ - tests/atf/atf-sh/t_atf_check tests/atf/atf-sh/t_config \ - tests/atf/atf-sh/t_normalize tests/atf/atf-sh/t_tc \ - tests/atf/atf-sh/t_tp -atf_data_DATA = tests/atf/data/Atffile -atf_datadir = $(pkgtestsdir)/data -atf_data_SCRIPTS = tests/atf/data/t_pkg_config -atf_formats_DATA = tests/atf/formats/Atffile \ - tests/atf/formats/d_atffile_1 \ - tests/atf/formats/d_atffile_1.expout \ - tests/atf/formats/d_atffile_2 \ - tests/atf/formats/d_atffile_2.expout \ - tests/atf/formats/d_atffile_3 \ - tests/atf/formats/d_atffile_3.expout \ - tests/atf/formats/d_atffile_4 \ - tests/atf/formats/d_atffile_4.expout \ - tests/atf/formats/d_atffile_5 \ - tests/atf/formats/d_atffile_5.expout \ - tests/atf/formats/d_atffile_50 \ - tests/atf/formats/d_atffile_50.experr \ - tests/atf/formats/d_atffile_51 \ - tests/atf/formats/d_atffile_51.experr \ - tests/atf/formats/d_atffile_52 \ - tests/atf/formats/d_atffile_52.experr \ - tests/atf/formats/d_atffile_53 \ - tests/atf/formats/d_atffile_53.experr \ - tests/atf/formats/d_atffile_53.expout \ - tests/atf/formats/d_atffile_54 \ - tests/atf/formats/d_atffile_54.experr \ - tests/atf/formats/d_atffile_6 \ - tests/atf/formats/d_atffile_6.expout \ - tests/atf/formats/d_config_1 \ - tests/atf/formats/d_config_1.expout \ - tests/atf/formats/d_config_2 \ - tests/atf/formats/d_config_2.expout \ - tests/atf/formats/d_config_3 \ - tests/atf/formats/d_config_3.expout \ - tests/atf/formats/d_config_4 \ - tests/atf/formats/d_config_4.expout \ - tests/atf/formats/d_config_50 \ - tests/atf/formats/d_config_50.experr \ - tests/atf/formats/d_config_51 \ - tests/atf/formats/d_config_51.experr \ - tests/atf/formats/d_config_52 \ - tests/atf/formats/d_config_52.experr \ - tests/atf/formats/d_config_53 \ - tests/atf/formats/d_config_53.experr \ - tests/atf/formats/d_config_53.expout \ - tests/atf/formats/d_config_54 \ - tests/atf/formats/d_config_54.experr \ - tests/atf/formats/d_headers_1 \ - tests/atf/formats/d_headers_1.experr \ - tests/atf/formats/d_headers_10 \ - tests/atf/formats/d_headers_10.experr \ - tests/atf/formats/d_headers_11 \ - tests/atf/formats/d_headers_11.experr \ - tests/atf/formats/d_headers_12 \ - tests/atf/formats/d_headers_12.experr \ - tests/atf/formats/d_headers_2 \ - tests/atf/formats/d_headers_2.experr \ - tests/atf/formats/d_headers_3 \ - tests/atf/formats/d_headers_3.experr \ - tests/atf/formats/d_headers_4 \ - tests/atf/formats/d_headers_4.experr \ - tests/atf/formats/d_headers_5 \ - tests/atf/formats/d_headers_5.experr \ - tests/atf/formats/d_headers_6 \ - tests/atf/formats/d_headers_6.experr \ - tests/atf/formats/d_headers_7 \ - tests/atf/formats/d_headers_7.experr \ - tests/atf/formats/d_headers_8 \ - tests/atf/formats/d_headers_8.experr \ - tests/atf/formats/d_headers_9 \ - tests/atf/formats/d_headers_9.experr \ - tests/atf/formats/d_tcs_1 \ - tests/atf/formats/d_tcs_1.errin \ - tests/atf/formats/d_tcs_1.expout \ - tests/atf/formats/d_tcs_1.outin \ - tests/atf/formats/d_tcs_2 \ - tests/atf/formats/d_tcs_2.errin \ - tests/atf/formats/d_tcs_2.expout \ - tests/atf/formats/d_tcs_2.outin \ - tests/atf/formats/d_tcs_3 \ - tests/atf/formats/d_tcs_3.errin \ - tests/atf/formats/d_tcs_3.expout \ - tests/atf/formats/d_tcs_3.outin \ - tests/atf/formats/d_tcs_4 \ - tests/atf/formats/d_tcs_4.errin \ - tests/atf/formats/d_tcs_4.expout \ - tests/atf/formats/d_tcs_4.outin \ - tests/atf/formats/d_tcs_5 \ - tests/atf/formats/d_tcs_5.errin \ - tests/atf/formats/d_tcs_5.expout \ - tests/atf/formats/d_tcs_5.outin \ - tests/atf/formats/d_tcs_50 \ - tests/atf/formats/d_tcs_50.experr \ - tests/atf/formats/d_tcs_51 \ - tests/atf/formats/d_tcs_51.experr \ - tests/atf/formats/d_tcs_52 \ - tests/atf/formats/d_tcs_52.experr \ - tests/atf/formats/d_tcs_53 \ - tests/atf/formats/d_tcs_53.experr \ - tests/atf/formats/d_tcs_53.expout \ - tests/atf/formats/d_tcs_54 \ - tests/atf/formats/d_tcs_54.experr \ - tests/atf/formats/d_tcs_54.expout \ - tests/atf/formats/d_tcs_55 \ - tests/atf/formats/d_tcs_55.experr \ - tests/atf/formats/d_tcs_55.expout \ - tests/atf/formats/d_tcs_56 \ - tests/atf/formats/d_tcs_56.errin \ - tests/atf/formats/d_tcs_56.experr \ - tests/atf/formats/d_tcs_56.expout \ - tests/atf/formats/d_tcs_56.outin \ - tests/atf/formats/d_tcs_57 \ - tests/atf/formats/d_tcs_57.errin \ - tests/atf/formats/d_tcs_57.experr \ - tests/atf/formats/d_tcs_57.expout \ - tests/atf/formats/d_tcs_57.outin \ - tests/atf/formats/d_tps_1 \ - tests/atf/formats/d_tps_1.expout \ - tests/atf/formats/d_tps_2 \ - tests/atf/formats/d_tps_2.expout \ - tests/atf/formats/d_tps_3 \ - tests/atf/formats/d_tps_3.expout \ - tests/atf/formats/d_tps_4 \ - tests/atf/formats/d_tps_4.expout \ - tests/atf/formats/d_tps_5 \ - tests/atf/formats/d_tps_5.expout \ - tests/atf/formats/d_tps_50 \ - tests/atf/formats/d_tps_50.experr \ - tests/atf/formats/d_tps_51 \ - tests/atf/formats/d_tps_51.experr \ - tests/atf/formats/d_tps_52 \ - tests/atf/formats/d_tps_52.experr \ - tests/atf/formats/d_tps_53 \ - tests/atf/formats/d_tps_53.experr \ - tests/atf/formats/d_tps_53.expout \ - tests/atf/formats/d_tps_54 \ - tests/atf/formats/d_tps_54.experr \ - tests/atf/formats/d_tps_54.expout \ - tests/atf/formats/d_tps_55 \ - tests/atf/formats/d_tps_55.experr \ - tests/atf/formats/d_tps_55.expout \ - tests/atf/formats/d_tps_56 \ - tests/atf/formats/d_tps_56.experr \ - tests/atf/formats/d_tps_56.expout \ - tests/atf/formats/d_tps_57 \ - tests/atf/formats/d_tps_57.experr \ - tests/atf/formats/d_tps_57.expout \ - tests/atf/formats/d_tps_58 \ - tests/atf/formats/d_tps_58.experr \ - tests/atf/formats/d_tps_58.expout \ - tests/atf/formats/d_tps_59 \ - tests/atf/formats/d_tps_59.experr \ - tests/atf/formats/d_tps_60 \ - tests/atf/formats/d_tps_60.experr \ - tests/atf/formats/d_tps_61 \ - tests/atf/formats/d_tps_61.experr \ - tests/atf/formats/d_tps_62 \ - tests/atf/formats/d_tps_62.experr \ - tests/atf/formats/d_tps_62.expout \ - tests/atf/formats/d_tps_63 \ - tests/atf/formats/d_tps_63.experr \ - tests/atf/formats/d_tps_63.expout \ - tests/atf/formats/d_tps_64 \ - tests/atf/formats/d_tps_64.experr \ - tests/atf/formats/d_tps_64.expout \ - tests/atf/formats/d_tps_65 \ - tests/atf/formats/d_tps_65.experr \ - tests/atf/formats/d_tps_65.expout \ - tests/atf/formats/d_tps_66 \ - tests/atf/formats/d_tps_66.experr \ - tests/atf/formats/d_tps_66.expout - -atf_formatsdir = $(pkgtestsdir)/formats -tests_atf_formats_h_parser_SOURCES = tests/atf/formats/h_parser.cpp -tests_atf_formats_h_parser_LDADD = -latf-c++ -tests_atf_formats_h_parser_LDFLAGS = -L. -tests_atf_formats_t_writers_SOURCES = tests/atf/formats/t_writers.cpp -tests_atf_formats_t_writers_LDADD = -latf-c++ -tests_atf_formats_t_writers_LDFLAGS = -L. -atf_formats_SCRIPTS = tests/atf/formats/t_parsers -atf_test_programs_DATA = tests/atf/test_programs/Atffile -atf_test_programsdir = $(pkgtestsdir)/test_programs -atf_test_programs_SCRIPTS = tests/atf/test_programs/h_sh \ - tests/atf/test_programs/t_cleanup \ - tests/atf/test_programs/t_config tests/atf/test_programs/t_env \ - tests/atf/test_programs/t_fork \ - tests/atf/test_programs/t_meta_data \ - tests/atf/test_programs/t_srcdir \ - tests/atf/test_programs/t_status \ - tests/atf/test_programs/t_workdir -tests_atf_test_programs_h_c_SOURCES = tests/atf/test_programs/h_c.c -tests_atf_test_programs_h_c_LDADD = -latf-c -tests_atf_test_programs_h_c_LDFLAGS = -L. -tests_atf_test_programs_h_cpp_SOURCES = tests/atf/test_programs/h_cpp.cpp -tests_atf_test_programs_h_cpp_LDADD = -latf-c++ -tests_atf_test_programs_h_cpp_LDFLAGS = -L. -atf_tools_DATA = tests/atf/tools/Atffile -atf_toolsdir = $(pkgtestsdir)/tools -tests_atf_tools_h_fail_SOURCES = tests/atf/tools/h_fail.cpp -tests_atf_tools_h_fail_LDADD = -latf-c++ -tests_atf_tools_h_fail_LDFLAGS = -L. -tests_atf_tools_h_misc_SOURCES = tests/atf/tools/h_misc.cpp -tests_atf_tools_h_misc_LDADD = -latf-c++ -tests_atf_tools_h_misc_LDFLAGS = -L. -tests_atf_tools_h_mode_SOURCES = tests/atf/tools/h_mode.cpp -tests_atf_tools_h_mode_LDADD = -latf-c++ -tests_atf_tools_h_mode_LDFLAGS = -L. -tests_atf_tools_h_pass_SOURCES = tests/atf/tools/h_pass.cpp -tests_atf_tools_h_pass_LDADD = -latf-c++ -tests_atf_tools_h_pass_LDFLAGS = -L. -atf_tools_SCRIPTS = tests/atf/tools/t_atf_cleanup \ - tests/atf/tools/t_atf_compile tests/atf/tools/t_atf_config \ - tests/atf/tools/t_atf_exec tests/atf/tools/t_atf_killpg \ - tests/atf/tools/t_atf_report tests/atf/tools/t_atf_run - -# ------------------------------------------------------------------------- -# `tests/build' directory. -# ------------------------------------------------------------------------- -check_LIBRARIES = tests/build/libuseless.a -tests_build_libuseless_a_SOURCES = \ - tests/build/t_include_atf_c_h.cpp \ - tests/build/t_include_atf_c++_hpp.cpp \ - tests/build/atf-c/t_include_config_h.c \ - tests/build/atf-c/t_include_dynstr_h.c \ - tests/build/atf-c/t_include_env_h.c \ - tests/build/atf-c/t_include_error_h.c \ - tests/build/atf-c/t_include_expand_h.c \ - tests/build/atf-c/t_include_fs_h.c \ - tests/build/atf-c/t_include_io_h.c \ - tests/build/atf-c/t_include_list_h.c \ - tests/build/atf-c/t_include_macros_h.c \ - tests/build/atf-c/t_include_map_h.c \ - tests/build/atf-c/t_include_object_h.c \ - tests/build/atf-c/t_include_sanity_h.c \ - tests/build/atf-c/t_include_signals_h.c \ - tests/build/atf-c/t_include_tc_h.c \ - tests/build/atf-c/t_include_tcr_h.c \ - tests/build/atf-c/t_include_text_h.c \ - tests/build/atf-c/t_include_tp_h.c \ - tests/build/atf-c/t_include_ui_h.c \ - tests/build/atf-c/t_use_macros_h.c \ - tests/build/atf-c++/t_include_application_hpp.cpp \ - tests/build/atf-c++/t_include_atffile_hpp.cpp \ - tests/build/atf-c++/t_include_config_hpp.cpp \ - tests/build/atf-c++/t_include_env_hpp.cpp \ - tests/build/atf-c++/t_include_exceptions_hpp.cpp \ - tests/build/atf-c++/t_include_expand_hpp.cpp \ - tests/build/atf-c++/t_include_formats_hpp.cpp \ - tests/build/atf-c++/t_include_fs_hpp.cpp \ - tests/build/atf-c++/t_include_io_hpp.cpp \ - tests/build/atf-c++/t_include_macros_hpp.cpp \ - tests/build/atf-c++/t_include_parser_hpp.cpp \ - tests/build/atf-c++/t_include_sanity_hpp.cpp \ - tests/build/atf-c++/t_include_signals_hpp.cpp \ - tests/build/atf-c++/t_include_tests_hpp.cpp \ - tests/build/atf-c++/t_include_text_hpp.cpp \ - tests/build/atf-c++/t_include_ui_hpp.cpp \ - tests/build/atf-c++/t_include_user_hpp.cpp \ - tests/build/atf-c++/t_include_utils_hpp.cpp \ - tests/build/atf-c++/t_use_macros_hpp.cpp - -tools_atf_config_SOURCES = tools/atf-config.cpp -tools_atf_config_LDADD = -latf-c++ -tools_atf_config_LDFLAGS = -L. -tools_atf_cleanup_SOURCES = tools/atf-cleanup.cpp -tools_atf_cleanup_LDADD = -latf-c++ -tools_atf_cleanup_LDFLAGS = -L. -tools_atf_compile_SOURCES = tools/atf-compile.cpp -tools_atf_compile_LDADD = -latf-c++ -tools_atf_compile_LDFLAGS = -L. -tools_atf_exec_SOURCES = tools/atf-exec.cpp -tools_atf_exec_LDADD = -latf-c++ -tools_atf_exec_LDFLAGS = -L. -tools_atf_format_SOURCES = tools/atf-format.cpp -tools_atf_format_LDADD = -latf-c++ -tools_atf_format_LDFLAGS = -L. -tools_atf_killpg_SOURCES = tools/atf-killpg.cpp -tools_atf_killpg_LDADD = -latf-c++ -tools_atf_killpg_LDFLAGS = -L. -tools_atf_report_SOURCES = tools/atf-report.cpp -tools_atf_report_LDADD = -latf-c++ -tools_atf_report_LDFLAGS = -L. -tools_atf_run_SOURCES = tools/atf-run.cpp -tools_atf_run_LDADD = -latf-c++ -tools_atf_run_LDFLAGS = -L. -tools_atf_version_SOURCES = tools/atf-version.cpp revision.h -tools_atf_version_LDADD = -latf-c++ -tools_atf_version_LDFLAGS = -L. -BUILT_SOURCES = revision.h -hooksdir = $(pkgdatadir) -hooks_DATA = tools/atf-run.hooks -all: $(BUILT_SOURCES) bconfig.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .cpp .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -bconfig.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/bconfig.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_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f bconfig.h stamp-h1 -atf-c/defs.h: $(top_builddir)/config.status $(top_srcdir)/atf-c/defs.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -clean-checkLIBRARIES: - -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) -tests/build/$(am__dirstamp): - @$(MKDIR_P) tests/build - @: > tests/build/$(am__dirstamp) -tests/build/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/build/$(DEPDIR) - @: > tests/build/$(DEPDIR)/$(am__dirstamp) -tests/build/t_include_atf_c_h.$(OBJEXT): tests/build/$(am__dirstamp) \ - tests/build/$(DEPDIR)/$(am__dirstamp) -tests/build/t_include_atf_c++_hpp.$(OBJEXT): \ - tests/build/$(am__dirstamp) \ - tests/build/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/$(am__dirstamp): - @$(MKDIR_P) tests/build/atf-c - @: > tests/build/atf-c/$(am__dirstamp) -tests/build/atf-c/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/build/atf-c/$(DEPDIR) - @: > tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_config_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_dynstr_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_env_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_error_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_expand_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_fs_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_io_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_list_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_macros_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_map_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_object_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_sanity_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_signals_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_tc_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_tcr_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_text_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_tp_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_include_ui_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c/t_use_macros_h.$(OBJEXT): \ - tests/build/atf-c/$(am__dirstamp) \ - tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/$(am__dirstamp): - @$(MKDIR_P) tests/build/atf-c++ - @: > tests/build/atf-c++/$(am__dirstamp) -tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/build/atf-c++/$(DEPDIR) - @: > tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_application_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_atffile_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_config_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_env_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_exceptions_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_expand_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_formats_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_fs_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_io_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_macros_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_parser_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_sanity_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_signals_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_tests_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_text_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_ui_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_user_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_include_utils_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/atf-c++/t_use_macros_hpp.$(OBJEXT): \ - tests/build/atf-c++/$(am__dirstamp) \ - tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/build/libuseless.a: $(tests_build_libuseless_a_OBJECTS) $(tests_build_libuseless_a_DEPENDENCIES) tests/build/$(am__dirstamp) - -rm -f tests/build/libuseless.a - $(tests_build_libuseless_a_AR) tests/build/libuseless.a $(tests_build_libuseless_a_OBJECTS) $(tests_build_libuseless_a_LIBADD) - $(RANLIB) tests/build/libuseless.a -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -atf-c++/$(am__dirstamp): - @$(MKDIR_P) atf-c++ - @: > atf-c++/$(am__dirstamp) -atf-c++/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) atf-c++/$(DEPDIR) - @: > atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/application.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/atffile.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++/env.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/exceptions.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/expand.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/formats.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/fs.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/io.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/parser.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/signals.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++/text.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/ui.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/user.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -libatf-c++.la: $(libatf_c___la_OBJECTS) $(libatf_c___la_DEPENDENCIES) - $(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) -atf-c/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) atf-c/$(DEPDIR) - @: > atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/config.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/dynstr.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/env.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/error.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/expand.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/fs.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/io.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/list.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/map.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/object.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/sanity.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/signals.lo: atf-c/$(am__dirstamp) \ - atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/text.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/ui.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/user.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/tc.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/tcr.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/tp.lo: atf-c/$(am__dirstamp) atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/tp_main.lo: atf-c/$(am__dirstamp) \ - atf-c/$(DEPDIR)/$(am__dirstamp) -libatf-c.la: $(libatf_c_la_OBJECTS) $(libatf_c_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libatf_c_la_OBJECTS) $(libatf_c_la_LIBADD) $(LIBS) -install-atf_atf_cPROGRAMS: $(atf_atf_c_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(atf_atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_atf_cdir)" - @list='$(atf_atf_c_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_atf_cPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(atf_atf_cdir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_atf_cPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(atf_atf_cdir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-atf_atf_cPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(atf_atf_c_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(atf_atf_cdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_atf_cdir)/$$f"; \ - done - -clean-atf_atf_cPROGRAMS: - @list='$(atf_atf_c_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -install-atf_atf_c__PROGRAMS: $(atf_atf_c___PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(atf_atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(atf_atf_c__dir)" - @list='$(atf_atf_c___PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_atf_c__PROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(atf_atf_c__dir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_atf_c__PROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(atf_atf_c__dir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-atf_atf_c__PROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(atf_atf_c___PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(atf_atf_c__dir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_atf_c__dir)/$$f"; \ - done - -clean-atf_atf_c__PROGRAMS: - @list='$(atf_atf_c___PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -install-atf_formatsPROGRAMS: $(atf_formats_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(atf_formatsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_formatsdir)" - @list='$(atf_formats_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_formatsPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(atf_formatsdir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_formatsPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(atf_formatsdir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-atf_formatsPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(atf_formats_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(atf_formatsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_formatsdir)/$$f"; \ - done - -clean-atf_formatsPROGRAMS: - @list='$(atf_formats_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -install-atf_test_programsPROGRAMS: $(atf_test_programs_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(atf_test_programsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_test_programsdir)" - @list='$(atf_test_programs_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_test_programsPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(atf_test_programsdir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_test_programsPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(atf_test_programsdir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-atf_test_programsPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(atf_test_programs_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(atf_test_programsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_test_programsdir)/$$f"; \ - done - -clean-atf_test_programsPROGRAMS: - @list='$(atf_test_programs_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -install-atf_toolsPROGRAMS: $(atf_tools_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(atf_toolsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_toolsdir)" - @list='$(atf_tools_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_toolsPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(atf_toolsdir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(atf_toolsPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(atf_toolsdir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-atf_toolsPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(atf_tools_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(atf_toolsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_toolsdir)/$$f"; \ - done - -clean-atf_toolsPROGRAMS: - @list='$(atf_tools_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -install-libexecPROGRAMS: $(libexec_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ - rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ - done - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -tests/atf/atf-c++/$(am__dirstamp): - @$(MKDIR_P) tests/atf/atf-c++ - @: > tests/atf/atf-c++/$(am__dirstamp) -tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/atf/atf-c++/$(DEPDIR) - @: > tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_config.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_config$(EXEEXT): $(tests_atf_atf_c___t_config_OBJECTS) $(tests_atf_atf_c___t_config_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_config$(EXEEXT) - $(tests_atf_atf_c___t_config_LINK) $(tests_atf_atf_c___t_config_OBJECTS) $(tests_atf_atf_c___t_config_LDADD) $(LIBS) -tests/atf/atf-c++/t_env.$(OBJEXT): tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_env$(EXEEXT): $(tests_atf_atf_c___t_env_OBJECTS) $(tests_atf_atf_c___t_env_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_env$(EXEEXT) - $(tests_atf_atf_c___t_env_LINK) $(tests_atf_atf_c___t_env_OBJECTS) $(tests_atf_atf_c___t_env_LDADD) $(LIBS) -tests/atf/atf-c++/t_expand.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_expand$(EXEEXT): $(tests_atf_atf_c___t_expand_OBJECTS) $(tests_atf_atf_c___t_expand_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_expand$(EXEEXT) - $(tests_atf_atf_c___t_expand_LINK) $(tests_atf_atf_c___t_expand_OBJECTS) $(tests_atf_atf_c___t_expand_LDADD) $(LIBS) -tests/atf/atf-c++/t_fs.$(OBJEXT): tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_fs$(EXEEXT): $(tests_atf_atf_c___t_fs_OBJECTS) $(tests_atf_atf_c___t_fs_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_fs$(EXEEXT) - $(tests_atf_atf_c___t_fs_LINK) $(tests_atf_atf_c___t_fs_OBJECTS) $(tests_atf_atf_c___t_fs_LDADD) $(LIBS) -tests/atf/atf-c++/t_io.$(OBJEXT): tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_io$(EXEEXT): $(tests_atf_atf_c___t_io_OBJECTS) $(tests_atf_atf_c___t_io_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_io$(EXEEXT) - $(tests_atf_atf_c___t_io_LINK) $(tests_atf_atf_c___t_io_OBJECTS) $(tests_atf_atf_c___t_io_LDADD) $(LIBS) -tests/atf/atf-c++/t_macros.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_macros$(EXEEXT): $(tests_atf_atf_c___t_macros_OBJECTS) $(tests_atf_atf_c___t_macros_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_macros$(EXEEXT) - $(tests_atf_atf_c___t_macros_LINK) $(tests_atf_atf_c___t_macros_OBJECTS) $(tests_atf_atf_c___t_macros_LDADD) $(LIBS) -tests/atf/atf-c++/t_parser.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_parser$(EXEEXT): $(tests_atf_atf_c___t_parser_OBJECTS) $(tests_atf_atf_c___t_parser_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_parser$(EXEEXT) - $(tests_atf_atf_c___t_parser_LINK) $(tests_atf_atf_c___t_parser_OBJECTS) $(tests_atf_atf_c___t_parser_LDADD) $(LIBS) -tests/atf/atf-c++/t_signals.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_signals$(EXEEXT): $(tests_atf_atf_c___t_signals_OBJECTS) $(tests_atf_atf_c___t_signals_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_signals$(EXEEXT) - $(tests_atf_atf_c___t_signals_LINK) $(tests_atf_atf_c___t_signals_OBJECTS) $(tests_atf_atf_c___t_signals_LDADD) $(LIBS) -tests/atf/atf-c++/t_tests.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_tests$(EXEEXT): $(tests_atf_atf_c___t_tests_OBJECTS) $(tests_atf_atf_c___t_tests_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_tests$(EXEEXT) - $(tests_atf_atf_c___t_tests_LINK) $(tests_atf_atf_c___t_tests_OBJECTS) $(tests_atf_atf_c___t_tests_LDADD) $(LIBS) -tests/atf/atf-c++/t_text.$(OBJEXT): tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_text$(EXEEXT): $(tests_atf_atf_c___t_text_OBJECTS) $(tests_atf_atf_c___t_text_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_text$(EXEEXT) - $(tests_atf_atf_c___t_text_LINK) $(tests_atf_atf_c___t_text_OBJECTS) $(tests_atf_atf_c___t_text_LDADD) $(LIBS) -tests/atf/atf-c++/t_user.$(OBJEXT): tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_user$(EXEEXT): $(tests_atf_atf_c___t_user_OBJECTS) $(tests_atf_atf_c___t_user_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_user$(EXEEXT) - $(tests_atf_atf_c___t_user_LINK) $(tests_atf_atf_c___t_user_OBJECTS) $(tests_atf_atf_c___t_user_LDADD) $(LIBS) -tests/atf/atf-c++/t_utils.$(OBJEXT): \ - tests/atf/atf-c++/$(am__dirstamp) \ - tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c++/t_utils$(EXEEXT): $(tests_atf_atf_c___t_utils_OBJECTS) $(tests_atf_atf_c___t_utils_DEPENDENCIES) tests/atf/atf-c++/$(am__dirstamp) - @rm -f tests/atf/atf-c++/t_utils$(EXEEXT) - $(tests_atf_atf_c___t_utils_LINK) $(tests_atf_atf_c___t_utils_OBJECTS) $(tests_atf_atf_c___t_utils_LDADD) $(LIBS) -tests/atf/atf-c/$(am__dirstamp): - @$(MKDIR_P) tests/atf/atf-c - @: > tests/atf/atf-c/$(am__dirstamp) -tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/atf/atf-c/$(DEPDIR) - @: > tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_config.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_config$(EXEEXT): $(tests_atf_atf_c_t_config_OBJECTS) $(tests_atf_atf_c_t_config_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_config$(EXEEXT) - $(tests_atf_atf_c_t_config_LINK) $(tests_atf_atf_c_t_config_OBJECTS) $(tests_atf_atf_c_t_config_LDADD) $(LIBS) -tests/atf/atf-c/t_dynstr.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_dynstr$(EXEEXT): $(tests_atf_atf_c_t_dynstr_OBJECTS) $(tests_atf_atf_c_t_dynstr_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_dynstr$(EXEEXT) - $(tests_atf_atf_c_t_dynstr_LINK) $(tests_atf_atf_c_t_dynstr_OBJECTS) $(tests_atf_atf_c_t_dynstr_LDADD) $(LIBS) -tests/atf/atf-c/t_env.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_env$(EXEEXT): $(tests_atf_atf_c_t_env_OBJECTS) $(tests_atf_atf_c_t_env_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_env$(EXEEXT) - $(tests_atf_atf_c_t_env_LINK) $(tests_atf_atf_c_t_env_OBJECTS) $(tests_atf_atf_c_t_env_LDADD) $(LIBS) -tests/atf/atf-c/t_error.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_error$(EXEEXT): $(tests_atf_atf_c_t_error_OBJECTS) $(tests_atf_atf_c_t_error_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_error$(EXEEXT) - $(tests_atf_atf_c_t_error_LINK) $(tests_atf_atf_c_t_error_OBJECTS) $(tests_atf_atf_c_t_error_LDADD) $(LIBS) -tests/atf/atf-c/t_expand.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_expand$(EXEEXT): $(tests_atf_atf_c_t_expand_OBJECTS) $(tests_atf_atf_c_t_expand_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_expand$(EXEEXT) - $(tests_atf_atf_c_t_expand_LINK) $(tests_atf_atf_c_t_expand_OBJECTS) $(tests_atf_atf_c_t_expand_LDADD) $(LIBS) -tests/atf/atf-c/t_fs.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_fs$(EXEEXT): $(tests_atf_atf_c_t_fs_OBJECTS) $(tests_atf_atf_c_t_fs_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_fs$(EXEEXT) - $(tests_atf_atf_c_t_fs_LINK) $(tests_atf_atf_c_t_fs_OBJECTS) $(tests_atf_atf_c_t_fs_LDADD) $(LIBS) -tests/atf/atf-c/t_io.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_io$(EXEEXT): $(tests_atf_atf_c_t_io_OBJECTS) $(tests_atf_atf_c_t_io_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_io$(EXEEXT) - $(tests_atf_atf_c_t_io_LINK) $(tests_atf_atf_c_t_io_OBJECTS) $(tests_atf_atf_c_t_io_LDADD) $(LIBS) -tests/atf/atf-c/t_list.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_list$(EXEEXT): $(tests_atf_atf_c_t_list_OBJECTS) $(tests_atf_atf_c_t_list_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_list$(EXEEXT) - $(tests_atf_atf_c_t_list_LINK) $(tests_atf_atf_c_t_list_OBJECTS) $(tests_atf_atf_c_t_list_LDADD) $(LIBS) -tests/atf/atf-c/t_macros.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_macros$(EXEEXT): $(tests_atf_atf_c_t_macros_OBJECTS) $(tests_atf_atf_c_t_macros_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_macros$(EXEEXT) - $(tests_atf_atf_c_t_macros_LINK) $(tests_atf_atf_c_t_macros_OBJECTS) $(tests_atf_atf_c_t_macros_LDADD) $(LIBS) -tests/atf/atf-c/t_map.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_map$(EXEEXT): $(tests_atf_atf_c_t_map_OBJECTS) $(tests_atf_atf_c_t_map_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_map$(EXEEXT) - $(tests_atf_atf_c_t_map_LINK) $(tests_atf_atf_c_t_map_OBJECTS) $(tests_atf_atf_c_t_map_LDADD) $(LIBS) -tests/atf/atf-c/t_sanity.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_sanity$(EXEEXT): $(tests_atf_atf_c_t_sanity_OBJECTS) $(tests_atf_atf_c_t_sanity_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_sanity$(EXEEXT) - $(tests_atf_atf_c_t_sanity_LINK) $(tests_atf_atf_c_t_sanity_OBJECTS) $(tests_atf_atf_c_t_sanity_LDADD) $(LIBS) -tests/atf/atf-c/t_signals.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_signals$(EXEEXT): $(tests_atf_atf_c_t_signals_OBJECTS) $(tests_atf_atf_c_t_signals_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_signals$(EXEEXT) - $(tests_atf_atf_c_t_signals_LINK) $(tests_atf_atf_c_t_signals_OBJECTS) $(tests_atf_atf_c_t_signals_LDADD) $(LIBS) -tests/atf/atf-c/t_tc.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_tc$(EXEEXT): $(tests_atf_atf_c_t_tc_OBJECTS) $(tests_atf_atf_c_t_tc_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_tc$(EXEEXT) - $(tests_atf_atf_c_t_tc_LINK) $(tests_atf_atf_c_t_tc_OBJECTS) $(tests_atf_atf_c_t_tc_LDADD) $(LIBS) -tests/atf/atf-c/t_tcr.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_tcr$(EXEEXT): $(tests_atf_atf_c_t_tcr_OBJECTS) $(tests_atf_atf_c_t_tcr_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_tcr$(EXEEXT) - $(tests_atf_atf_c_t_tcr_LINK) $(tests_atf_atf_c_t_tcr_OBJECTS) $(tests_atf_atf_c_t_tcr_LDADD) $(LIBS) -tests/atf/atf-c/t_text.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_text$(EXEEXT): $(tests_atf_atf_c_t_text_OBJECTS) $(tests_atf_atf_c_t_text_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_text$(EXEEXT) - $(tests_atf_atf_c_t_text_LINK) $(tests_atf_atf_c_t_text_OBJECTS) $(tests_atf_atf_c_t_text_LDADD) $(LIBS) -tests/atf/atf-c/t_ui.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_ui$(EXEEXT): $(tests_atf_atf_c_t_ui_OBJECTS) $(tests_atf_atf_c_t_ui_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_ui$(EXEEXT) - $(tests_atf_atf_c_t_ui_LINK) $(tests_atf_atf_c_t_ui_OBJECTS) $(tests_atf_atf_c_t_ui_LDADD) $(LIBS) -tests/atf/atf-c/t_user.$(OBJEXT): tests/atf/atf-c/$(am__dirstamp) \ - tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) -tests/atf/atf-c/t_user$(EXEEXT): $(tests_atf_atf_c_t_user_OBJECTS) $(tests_atf_atf_c_t_user_DEPENDENCIES) tests/atf/atf-c/$(am__dirstamp) - @rm -f tests/atf/atf-c/t_user$(EXEEXT) - $(tests_atf_atf_c_t_user_LINK) $(tests_atf_atf_c_t_user_OBJECTS) $(tests_atf_atf_c_t_user_LDADD) $(LIBS) -tests/atf/formats/$(am__dirstamp): - @$(MKDIR_P) tests/atf/formats - @: > tests/atf/formats/$(am__dirstamp) -tests/atf/formats/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/atf/formats/$(DEPDIR) - @: > tests/atf/formats/$(DEPDIR)/$(am__dirstamp) -tests/atf/formats/h_parser.$(OBJEXT): \ - tests/atf/formats/$(am__dirstamp) \ - tests/atf/formats/$(DEPDIR)/$(am__dirstamp) -tests/atf/formats/h_parser$(EXEEXT): $(tests_atf_formats_h_parser_OBJECTS) $(tests_atf_formats_h_parser_DEPENDENCIES) tests/atf/formats/$(am__dirstamp) - @rm -f tests/atf/formats/h_parser$(EXEEXT) - $(tests_atf_formats_h_parser_LINK) $(tests_atf_formats_h_parser_OBJECTS) $(tests_atf_formats_h_parser_LDADD) $(LIBS) -tests/atf/formats/t_writers.$(OBJEXT): \ - tests/atf/formats/$(am__dirstamp) \ - tests/atf/formats/$(DEPDIR)/$(am__dirstamp) -tests/atf/formats/t_writers$(EXEEXT): $(tests_atf_formats_t_writers_OBJECTS) $(tests_atf_formats_t_writers_DEPENDENCIES) tests/atf/formats/$(am__dirstamp) - @rm -f tests/atf/formats/t_writers$(EXEEXT) - $(tests_atf_formats_t_writers_LINK) $(tests_atf_formats_t_writers_OBJECTS) $(tests_atf_formats_t_writers_LDADD) $(LIBS) -tests/atf/test_programs/$(am__dirstamp): - @$(MKDIR_P) tests/atf/test_programs - @: > tests/atf/test_programs/$(am__dirstamp) -tests/atf/test_programs/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/atf/test_programs/$(DEPDIR) - @: > tests/atf/test_programs/$(DEPDIR)/$(am__dirstamp) -tests/atf/test_programs/h_c.$(OBJEXT): \ - tests/atf/test_programs/$(am__dirstamp) \ - tests/atf/test_programs/$(DEPDIR)/$(am__dirstamp) -tests/atf/test_programs/h_c$(EXEEXT): $(tests_atf_test_programs_h_c_OBJECTS) $(tests_atf_test_programs_h_c_DEPENDENCIES) tests/atf/test_programs/$(am__dirstamp) - @rm -f tests/atf/test_programs/h_c$(EXEEXT) - $(tests_atf_test_programs_h_c_LINK) $(tests_atf_test_programs_h_c_OBJECTS) $(tests_atf_test_programs_h_c_LDADD) $(LIBS) -tests/atf/test_programs/h_cpp.$(OBJEXT): \ - tests/atf/test_programs/$(am__dirstamp) \ - tests/atf/test_programs/$(DEPDIR)/$(am__dirstamp) -tests/atf/test_programs/h_cpp$(EXEEXT): $(tests_atf_test_programs_h_cpp_OBJECTS) $(tests_atf_test_programs_h_cpp_DEPENDENCIES) tests/atf/test_programs/$(am__dirstamp) - @rm -f tests/atf/test_programs/h_cpp$(EXEEXT) - $(tests_atf_test_programs_h_cpp_LINK) $(tests_atf_test_programs_h_cpp_OBJECTS) $(tests_atf_test_programs_h_cpp_LDADD) $(LIBS) -tests/atf/tools/$(am__dirstamp): - @$(MKDIR_P) tests/atf/tools - @: > tests/atf/tools/$(am__dirstamp) -tests/atf/tools/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/atf/tools/$(DEPDIR) - @: > tests/atf/tools/$(DEPDIR)/$(am__dirstamp) -tests/atf/tools/h_fail.$(OBJEXT): tests/atf/tools/$(am__dirstamp) \ - tests/atf/tools/$(DEPDIR)/$(am__dirstamp) -tests/atf/tools/h_fail$(EXEEXT): $(tests_atf_tools_h_fail_OBJECTS) $(tests_atf_tools_h_fail_DEPENDENCIES) tests/atf/tools/$(am__dirstamp) - @rm -f tests/atf/tools/h_fail$(EXEEXT) - $(tests_atf_tools_h_fail_LINK) $(tests_atf_tools_h_fail_OBJECTS) $(tests_atf_tools_h_fail_LDADD) $(LIBS) -tests/atf/tools/h_misc.$(OBJEXT): tests/atf/tools/$(am__dirstamp) \ - tests/atf/tools/$(DEPDIR)/$(am__dirstamp) -tests/atf/tools/h_misc$(EXEEXT): $(tests_atf_tools_h_misc_OBJECTS) $(tests_atf_tools_h_misc_DEPENDENCIES) tests/atf/tools/$(am__dirstamp) - @rm -f tests/atf/tools/h_misc$(EXEEXT) - $(tests_atf_tools_h_misc_LINK) $(tests_atf_tools_h_misc_OBJECTS) $(tests_atf_tools_h_misc_LDADD) $(LIBS) -tests/atf/tools/h_mode.$(OBJEXT): tests/atf/tools/$(am__dirstamp) \ - tests/atf/tools/$(DEPDIR)/$(am__dirstamp) -tests/atf/tools/h_mode$(EXEEXT): $(tests_atf_tools_h_mode_OBJECTS) $(tests_atf_tools_h_mode_DEPENDENCIES) tests/atf/tools/$(am__dirstamp) - @rm -f tests/atf/tools/h_mode$(EXEEXT) - $(tests_atf_tools_h_mode_LINK) $(tests_atf_tools_h_mode_OBJECTS) $(tests_atf_tools_h_mode_LDADD) $(LIBS) -tests/atf/tools/h_pass.$(OBJEXT): tests/atf/tools/$(am__dirstamp) \ - tests/atf/tools/$(DEPDIR)/$(am__dirstamp) -tests/atf/tools/h_pass$(EXEEXT): $(tests_atf_tools_h_pass_OBJECTS) $(tests_atf_tools_h_pass_DEPENDENCIES) tests/atf/tools/$(am__dirstamp) - @rm -f tests/atf/tools/h_pass$(EXEEXT) - $(tests_atf_tools_h_pass_LINK) $(tests_atf_tools_h_pass_OBJECTS) $(tests_atf_tools_h_pass_LDADD) $(LIBS) -tests/bootstrap/$(am__dirstamp): - @$(MKDIR_P) tests/bootstrap - @: > tests/bootstrap/$(am__dirstamp) -tests/bootstrap/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tests/bootstrap/$(DEPDIR) - @: > tests/bootstrap/$(DEPDIR)/$(am__dirstamp) -tests/bootstrap/h_app_empty.$(OBJEXT): \ - tests/bootstrap/$(am__dirstamp) \ - tests/bootstrap/$(DEPDIR)/$(am__dirstamp) -tests/bootstrap/h_app_empty$(EXEEXT): $(tests_bootstrap_h_app_empty_OBJECTS) $(tests_bootstrap_h_app_empty_DEPENDENCIES) tests/bootstrap/$(am__dirstamp) - @rm -f tests/bootstrap/h_app_empty$(EXEEXT) - $(tests_bootstrap_h_app_empty_LINK) $(tests_bootstrap_h_app_empty_OBJECTS) $(tests_bootstrap_h_app_empty_LDADD) $(LIBS) -tests/bootstrap/h_app_opts_args.$(OBJEXT): \ - tests/bootstrap/$(am__dirstamp) \ - tests/bootstrap/$(DEPDIR)/$(am__dirstamp) -tests/bootstrap/h_app_opts_args$(EXEEXT): $(tests_bootstrap_h_app_opts_args_OBJECTS) $(tests_bootstrap_h_app_opts_args_DEPENDENCIES) tests/bootstrap/$(am__dirstamp) - @rm -f tests/bootstrap/h_app_opts_args$(EXEEXT) - $(tests_bootstrap_h_app_opts_args_LINK) $(tests_bootstrap_h_app_opts_args_OBJECTS) $(tests_bootstrap_h_app_opts_args_LDADD) $(LIBS) -tests/bootstrap/h_tp_basic_c.$(OBJEXT): \ - tests/bootstrap/$(am__dirstamp) \ - tests/bootstrap/$(DEPDIR)/$(am__dirstamp) -tests/bootstrap/h_tp_basic_c$(EXEEXT): $(tests_bootstrap_h_tp_basic_c_OBJECTS) $(tests_bootstrap_h_tp_basic_c_DEPENDENCIES) tests/bootstrap/$(am__dirstamp) - @rm -f tests/bootstrap/h_tp_basic_c$(EXEEXT) - $(tests_bootstrap_h_tp_basic_c_LINK) $(tests_bootstrap_h_tp_basic_c_OBJECTS) $(tests_bootstrap_h_tp_basic_c_LDADD) $(LIBS) -tests/bootstrap/h_tp_basic_cpp.$(OBJEXT): \ - tests/bootstrap/$(am__dirstamp) \ - tests/bootstrap/$(DEPDIR)/$(am__dirstamp) -tests/bootstrap/h_tp_basic_cpp$(EXEEXT): $(tests_bootstrap_h_tp_basic_cpp_OBJECTS) $(tests_bootstrap_h_tp_basic_cpp_DEPENDENCIES) tests/bootstrap/$(am__dirstamp) - @rm -f tests/bootstrap/h_tp_basic_cpp$(EXEEXT) - $(tests_bootstrap_h_tp_basic_cpp_LINK) $(tests_bootstrap_h_tp_basic_cpp_OBJECTS) $(tests_bootstrap_h_tp_basic_cpp_LDADD) $(LIBS) -tools/$(am__dirstamp): - @$(MKDIR_P) tools - @: > tools/$(am__dirstamp) -tools/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) tools/$(DEPDIR) - @: > tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-cleanup.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-cleanup$(EXEEXT): $(tools_atf_cleanup_OBJECTS) $(tools_atf_cleanup_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-cleanup$(EXEEXT) - $(tools_atf_cleanup_LINK) $(tools_atf_cleanup_OBJECTS) $(tools_atf_cleanup_LDADD) $(LIBS) -tools/atf-compile.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-compile$(EXEEXT): $(tools_atf_compile_OBJECTS) $(tools_atf_compile_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-compile$(EXEEXT) - $(tools_atf_compile_LINK) $(tools_atf_compile_OBJECTS) $(tools_atf_compile_LDADD) $(LIBS) -tools/atf-config.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-config$(EXEEXT): $(tools_atf_config_OBJECTS) $(tools_atf_config_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-config$(EXEEXT) - $(tools_atf_config_LINK) $(tools_atf_config_OBJECTS) $(tools_atf_config_LDADD) $(LIBS) -tools/atf-exec.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-exec$(EXEEXT): $(tools_atf_exec_OBJECTS) $(tools_atf_exec_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-exec$(EXEEXT) - $(tools_atf_exec_LINK) $(tools_atf_exec_OBJECTS) $(tools_atf_exec_LDADD) $(LIBS) -tools/atf-format.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-format$(EXEEXT): $(tools_atf_format_OBJECTS) $(tools_atf_format_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-format$(EXEEXT) - $(tools_atf_format_LINK) $(tools_atf_format_OBJECTS) $(tools_atf_format_LDADD) $(LIBS) -tools/atf-killpg.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-killpg$(EXEEXT): $(tools_atf_killpg_OBJECTS) $(tools_atf_killpg_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-killpg$(EXEEXT) - $(tools_atf_killpg_LINK) $(tools_atf_killpg_OBJECTS) $(tools_atf_killpg_LDADD) $(LIBS) -tools/atf-report.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-report$(EXEEXT): $(tools_atf_report_OBJECTS) $(tools_atf_report_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-report$(EXEEXT) - $(tools_atf_report_LINK) $(tools_atf_report_OBJECTS) $(tools_atf_report_LDADD) $(LIBS) -tools/atf-run.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-run$(EXEEXT): $(tools_atf_run_OBJECTS) $(tools_atf_run_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-run$(EXEEXT) - $(tools_atf_run_LINK) $(tools_atf_run_OBJECTS) $(tools_atf_run_LDADD) $(LIBS) -tools/atf-version.$(OBJEXT): tools/$(am__dirstamp) \ - tools/$(DEPDIR)/$(am__dirstamp) -tools/atf-version$(EXEEXT): $(tools_atf_version_OBJECTS) $(tools_atf_version_DEPENDENCIES) tools/$(am__dirstamp) - @rm -f tools/atf-version$(EXEEXT) - $(tools_atf_version_LINK) $(tools_atf_version_OBJECTS) $(tools_atf_version_LDADD) $(LIBS) -install-atf_atf_shSCRIPTS: $(atf_atf_sh_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(atf_atf_shdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_atf_shdir)" - @list='$(atf_atf_sh_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(atf_atf_shSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_atf_shdir)/$$f'"; \ - $(atf_atf_shSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_atf_shdir)/$$f"; \ - else :; fi; \ - done - -uninstall-atf_atf_shSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(atf_atf_sh_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(atf_atf_shdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_atf_shdir)/$$f"; \ - done -install-atf_dataSCRIPTS: $(atf_data_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(atf_datadir)" || $(MKDIR_P) "$(DESTDIR)$(atf_datadir)" - @list='$(atf_data_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(atf_dataSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_datadir)/$$f'"; \ - $(atf_dataSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_datadir)/$$f"; \ - else :; fi; \ - done - -uninstall-atf_dataSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(atf_data_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(atf_datadir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_datadir)/$$f"; \ - done -install-atf_formatsSCRIPTS: $(atf_formats_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(atf_formatsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_formatsdir)" - @list='$(atf_formats_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(atf_formatsSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_formatsdir)/$$f'"; \ - $(atf_formatsSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_formatsdir)/$$f"; \ - else :; fi; \ - done - -uninstall-atf_formatsSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(atf_formats_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(atf_formatsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_formatsdir)/$$f"; \ - done -install-atf_test_programsSCRIPTS: $(atf_test_programs_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(atf_test_programsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_test_programsdir)" - @list='$(atf_test_programs_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(atf_test_programsSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_test_programsdir)/$$f'"; \ - $(atf_test_programsSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_test_programsdir)/$$f"; \ - else :; fi; \ - done - -uninstall-atf_test_programsSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(atf_test_programs_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(atf_test_programsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_test_programsdir)/$$f"; \ - done -install-atf_toolsSCRIPTS: $(atf_tools_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(atf_toolsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_toolsdir)" - @list='$(atf_tools_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(atf_toolsSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_toolsdir)/$$f'"; \ - $(atf_toolsSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_toolsdir)/$$f"; \ - else :; fi; \ - done - -uninstall-atf_toolsSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(atf_tools_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(atf_toolsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_toolsdir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f atf-c++/application.$(OBJEXT) - -rm -f atf-c++/application.lo - -rm -f atf-c++/atffile.$(OBJEXT) - -rm -f atf-c++/atffile.lo - -rm -f atf-c++/config.$(OBJEXT) - -rm -f atf-c++/config.lo - -rm -f atf-c++/env.$(OBJEXT) - -rm -f atf-c++/env.lo - -rm -f atf-c++/exceptions.$(OBJEXT) - -rm -f atf-c++/exceptions.lo - -rm -f atf-c++/expand.$(OBJEXT) - -rm -f atf-c++/expand.lo - -rm -f atf-c++/formats.$(OBJEXT) - -rm -f atf-c++/formats.lo - -rm -f atf-c++/fs.$(OBJEXT) - -rm -f atf-c++/fs.lo - -rm -f atf-c++/io.$(OBJEXT) - -rm -f atf-c++/io.lo - -rm -f atf-c++/parser.$(OBJEXT) - -rm -f atf-c++/parser.lo - -rm -f atf-c++/signals.$(OBJEXT) - -rm -f atf-c++/signals.lo - -rm -f atf-c++/tests.$(OBJEXT) - -rm -f atf-c++/tests.lo - -rm -f atf-c++/text.$(OBJEXT) - -rm -f atf-c++/text.lo - -rm -f atf-c++/ui.$(OBJEXT) - -rm -f atf-c++/ui.lo - -rm -f atf-c++/user.$(OBJEXT) - -rm -f atf-c++/user.lo - -rm -f atf-c/config.$(OBJEXT) - -rm -f atf-c/config.lo - -rm -f atf-c/dynstr.$(OBJEXT) - -rm -f atf-c/dynstr.lo - -rm -f atf-c/env.$(OBJEXT) - -rm -f atf-c/env.lo - -rm -f atf-c/error.$(OBJEXT) - -rm -f atf-c/error.lo - -rm -f atf-c/expand.$(OBJEXT) - -rm -f atf-c/expand.lo - -rm -f atf-c/fs.$(OBJEXT) - -rm -f atf-c/fs.lo - -rm -f atf-c/io.$(OBJEXT) - -rm -f atf-c/io.lo - -rm -f atf-c/list.$(OBJEXT) - -rm -f atf-c/list.lo - -rm -f atf-c/map.$(OBJEXT) - -rm -f atf-c/map.lo - -rm -f atf-c/object.$(OBJEXT) - -rm -f atf-c/object.lo - -rm -f atf-c/sanity.$(OBJEXT) - -rm -f atf-c/sanity.lo - -rm -f atf-c/signals.$(OBJEXT) - -rm -f atf-c/signals.lo - -rm -f atf-c/tc.$(OBJEXT) - -rm -f atf-c/tc.lo - -rm -f atf-c/tcr.$(OBJEXT) - -rm -f atf-c/tcr.lo - -rm -f atf-c/text.$(OBJEXT) - -rm -f atf-c/text.lo - -rm -f atf-c/tp.$(OBJEXT) - -rm -f atf-c/tp.lo - -rm -f atf-c/tp_main.$(OBJEXT) - -rm -f atf-c/tp_main.lo - -rm -f atf-c/ui.$(OBJEXT) - -rm -f atf-c/ui.lo - -rm -f atf-c/user.$(OBJEXT) - -rm -f atf-c/user.lo - -rm -f tests/atf/atf-c++/t_config.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_env.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_expand.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_fs.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_io.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_macros.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_parser.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_signals.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_tests.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_text.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_user.$(OBJEXT) - -rm -f tests/atf/atf-c++/t_utils.$(OBJEXT) - -rm -f tests/atf/atf-c/t_config.$(OBJEXT) - -rm -f tests/atf/atf-c/t_dynstr.$(OBJEXT) - -rm -f tests/atf/atf-c/t_env.$(OBJEXT) - -rm -f tests/atf/atf-c/t_error.$(OBJEXT) - -rm -f tests/atf/atf-c/t_expand.$(OBJEXT) - -rm -f tests/atf/atf-c/t_fs.$(OBJEXT) - -rm -f tests/atf/atf-c/t_io.$(OBJEXT) - -rm -f tests/atf/atf-c/t_list.$(OBJEXT) - -rm -f tests/atf/atf-c/t_macros.$(OBJEXT) - -rm -f tests/atf/atf-c/t_map.$(OBJEXT) - -rm -f tests/atf/atf-c/t_sanity.$(OBJEXT) - -rm -f tests/atf/atf-c/t_signals.$(OBJEXT) - -rm -f tests/atf/atf-c/t_tc.$(OBJEXT) - -rm -f tests/atf/atf-c/t_tcr.$(OBJEXT) - -rm -f tests/atf/atf-c/t_text.$(OBJEXT) - -rm -f tests/atf/atf-c/t_ui.$(OBJEXT) - -rm -f tests/atf/atf-c/t_user.$(OBJEXT) - -rm -f tests/atf/formats/h_parser.$(OBJEXT) - -rm -f tests/atf/formats/t_writers.$(OBJEXT) - -rm -f tests/atf/test_programs/h_c.$(OBJEXT) - -rm -f tests/atf/test_programs/h_cpp.$(OBJEXT) - -rm -f tests/atf/tools/h_fail.$(OBJEXT) - -rm -f tests/atf/tools/h_misc.$(OBJEXT) - -rm -f tests/atf/tools/h_mode.$(OBJEXT) - -rm -f tests/atf/tools/h_pass.$(OBJEXT) - -rm -f tests/bootstrap/h_app_empty.$(OBJEXT) - -rm -f tests/bootstrap/h_app_opts_args.$(OBJEXT) - -rm -f tests/bootstrap/h_tp_basic_c.$(OBJEXT) - -rm -f tests/bootstrap/h_tp_basic_cpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_application_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_atffile_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_config_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_env_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_exceptions_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_expand_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_formats_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_fs_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_io_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_macros_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_parser_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_sanity_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_signals_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_tests_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_text_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_ui_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_user_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_include_utils_hpp.$(OBJEXT) - -rm -f tests/build/atf-c++/t_use_macros_hpp.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_config_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_dynstr_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_env_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_error_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_expand_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_fs_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_io_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_list_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_macros_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_map_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_object_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_sanity_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_signals_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_tc_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_tcr_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_text_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_tp_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_include_ui_h.$(OBJEXT) - -rm -f tests/build/atf-c/t_use_macros_h.$(OBJEXT) - -rm -f tests/build/t_include_atf_c++_hpp.$(OBJEXT) - -rm -f tests/build/t_include_atf_c_h.$(OBJEXT) - -rm -f tools/atf-cleanup.$(OBJEXT) - -rm -f tools/atf-compile.$(OBJEXT) - -rm -f tools/atf-config.$(OBJEXT) - -rm -f tools/atf-exec.$(OBJEXT) - -rm -f tools/atf-format.$(OBJEXT) - -rm -f tools/atf-killpg.$(OBJEXT) - -rm -f tools/atf-report.$(OBJEXT) - -rm -f tools/atf-run.$(OBJEXT) - -rm -f tools/atf-version.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/application.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/atffile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/env.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/exceptions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/expand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/formats.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/fs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/parser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/signals.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/tests.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/text.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/user.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/dynstr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/env.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/expand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/fs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/object.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/sanity.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/signals.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/tc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/tcr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/text.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/tp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/tp_main.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/user.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_env.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_expand.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_fs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_macros.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_signals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_tests.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_text.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_user.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c++/$(DEPDIR)/t_utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_dynstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_env.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_expand.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_fs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_list.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_macros.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_map.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_sanity.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_signals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_tc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_tcr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_text.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_ui.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/atf-c/$(DEPDIR)/t_user.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/formats/$(DEPDIR)/h_parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/formats/$(DEPDIR)/t_writers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/test_programs/$(DEPDIR)/h_c.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/test_programs/$(DEPDIR)/h_cpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/tools/$(DEPDIR)/h_fail.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/tools/$(DEPDIR)/h_misc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/tools/$(DEPDIR)/h_mode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/atf/tools/$(DEPDIR)/h_pass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/bootstrap/$(DEPDIR)/h_app_empty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/bootstrap/$(DEPDIR)/h_app_opts_args.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/bootstrap/$(DEPDIR)/h_tp_basic_c.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/bootstrap/$(DEPDIR)/h_tp_basic_cpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/$(DEPDIR)/t_include_atf_c++_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/$(DEPDIR)/t_include_atf_c_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_application_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_atffile_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_config_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_env_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_exceptions_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_expand_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_formats_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_fs_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_io_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_macros_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_parser_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_sanity_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_signals_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_tests_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_text_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_ui_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_user_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_include_utils_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c++/$(DEPDIR)/t_use_macros_hpp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_config_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_dynstr_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_env_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_error_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_expand_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_fs_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_io_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_list_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_macros_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_map_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_object_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_sanity_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_signals_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_tc_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_tcr_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_text_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_tp_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_include_ui_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/build/atf-c/$(DEPDIR)/t_use_macros_h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-cleanup.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-compile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-exec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-format.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-killpg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-report.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-run.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/atf-version.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -.cpp.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf atf-c/.libs atf-c/_libs - -rm -rf atf-c++/.libs atf-c++/_libs - -rm -rf tests/atf/atf-c/.libs tests/atf/atf-c/_libs - -rm -rf tests/atf/atf-c++/.libs tests/atf/atf-c++/_libs - -rm -rf tests/atf/formats/.libs tests/atf/formats/_libs - -rm -rf tests/atf/test_programs/.libs tests/atf/test_programs/_libs - -rm -rf tests/atf/tools/.libs tests/atf/tools/_libs - -rm -rf tests/bootstrap/.libs tests/bootstrap/_libs - -rm -rf tools/.libs tools/_libs - -distclean-libtool: - -rm -f libtool -install-man1: $(man1_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done -install-man3: $(man3_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done -install-man4: $(man4_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man4dir)" || $(MKDIR_P) "$(DESTDIR)$(man4dir)" - @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.4*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 4*) ;; \ - *) ext='4' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst"; \ - done -uninstall-man4: - @$(NORMAL_UNINSTALL) - @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.4*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 4*) ;; \ - *) ext='4' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man4dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man4dir)/$$inst"; \ - done -install-man5: $(man5_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.5*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 5*) ;; \ - *) ext='5' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ - done -uninstall-man5: - @$(NORMAL_UNINSTALL) - @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.5*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 5*) ;; \ - *) ext='5' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ - done -install-man7: $(man7_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)" - @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.7*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 7*) ;; \ - *) ext='7' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst"; \ - done -uninstall-man7: - @$(NORMAL_UNINSTALL) - @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.7*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 7*) ;; \ - *) ext='7' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man7dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man7dir)/$$inst"; \ - done -install-atf_atf_cDATA: $(atf_atf_c_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_atf_cdir)" - @list='$(atf_atf_c_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_atf_cDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_atf_cdir)/$$f'"; \ - $(atf_atf_cDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_atf_cdir)/$$f"; \ - done - -uninstall-atf_atf_cDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_atf_c_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_atf_cdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_atf_cdir)/$$f"; \ - done -install-atf_atf_c__DATA: $(atf_atf_c___DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(atf_atf_c__dir)" - @list='$(atf_atf_c___DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_atf_c__DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_atf_c__dir)/$$f'"; \ - $(atf_atf_c__DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_atf_c__dir)/$$f"; \ - done - -uninstall-atf_atf_c__DATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_atf_c___DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_atf_c__dir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_atf_c__dir)/$$f"; \ - done -install-atf_atf_shDATA: $(atf_atf_sh_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_atf_shdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_atf_shdir)" - @list='$(atf_atf_sh_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_atf_shDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_atf_shdir)/$$f'"; \ - $(atf_atf_shDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_atf_shdir)/$$f"; \ - done - -uninstall-atf_atf_shDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_atf_sh_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_atf_shdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_atf_shdir)/$$f"; \ - done -install-atf_dataDATA: $(atf_data_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_datadir)" || $(MKDIR_P) "$(DESTDIR)$(atf_datadir)" - @list='$(atf_data_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_datadir)/$$f'"; \ - $(atf_dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_datadir)/$$f"; \ - done - -uninstall-atf_dataDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_data_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_datadir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_datadir)/$$f"; \ - done -install-atf_formatsDATA: $(atf_formats_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_formatsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_formatsdir)" - @list='$(atf_formats_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_formatsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_formatsdir)/$$f'"; \ - $(atf_formatsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_formatsdir)/$$f"; \ - done - -uninstall-atf_formatsDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_formats_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_formatsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_formatsdir)/$$f"; \ - done -install-atf_shDATA: $(atf_sh_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_shdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_shdir)" - @list='$(atf_sh_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_shDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_shdir)/$$f'"; \ - $(atf_shDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_shdir)/$$f"; \ - done - -uninstall-atf_shDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_sh_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_shdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_shdir)/$$f"; \ - done -install-atf_test_programsDATA: $(atf_test_programs_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_test_programsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_test_programsdir)" - @list='$(atf_test_programs_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_test_programsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_test_programsdir)/$$f'"; \ - $(atf_test_programsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_test_programsdir)/$$f"; \ - done - -uninstall-atf_test_programsDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_test_programs_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_test_programsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_test_programsdir)/$$f"; \ - done -install-atf_toolsDATA: $(atf_tools_DATA) - @$(NORMAL_INSTALL) - test -z "$(atf_toolsdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_toolsdir)" - @list='$(atf_tools_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_toolsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_toolsdir)/$$f'"; \ - $(atf_toolsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_toolsdir)/$$f"; \ - done - -uninstall-atf_toolsDATA: - @$(NORMAL_UNINSTALL) - @list='$(atf_tools_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_toolsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_toolsdir)/$$f"; \ - done -install-cssDATA: $(css_DATA) - @$(NORMAL_INSTALL) - test -z "$(cssdir)" || $(MKDIR_P) "$(DESTDIR)$(cssdir)" - @list='$(css_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(cssDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(cssdir)/$$f'"; \ - $(cssDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(cssdir)/$$f"; \ - done - -uninstall-cssDATA: - @$(NORMAL_UNINSTALL) - @list='$(css_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(cssdir)/$$f'"; \ - rm -f "$(DESTDIR)$(cssdir)/$$f"; \ - done -install-docDATA: $(doc_DATA) - @$(NORMAL_INSTALL) - test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" - @list='$(doc_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ - $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ - done - -uninstall-docDATA: - @$(NORMAL_UNINSTALL) - @list='$(doc_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ - rm -f "$(DESTDIR)$(docdir)/$$f"; \ - done -install-dtdDATA: $(dtd_DATA) - @$(NORMAL_INSTALL) - test -z "$(dtddir)" || $(MKDIR_P) "$(DESTDIR)$(dtddir)" - @list='$(dtd_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dtdDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dtddir)/$$f'"; \ - $(dtdDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dtddir)/$$f"; \ - done - -uninstall-dtdDATA: - @$(NORMAL_UNINSTALL) - @list='$(dtd_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(dtddir)/$$f'"; \ - rm -f "$(DESTDIR)$(dtddir)/$$f"; \ - done -install-egDATA: $(eg_DATA) - @$(NORMAL_INSTALL) - test -z "$(egdir)" || $(MKDIR_P) "$(DESTDIR)$(egdir)" - @list='$(eg_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(egDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(egdir)/$$f'"; \ - $(egDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(egdir)/$$f"; \ - done - -uninstall-egDATA: - @$(NORMAL_UNINSTALL) - @list='$(eg_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(egdir)/$$f'"; \ - rm -f "$(DESTDIR)$(egdir)/$$f"; \ - done -install-hooksDATA: $(hooks_DATA) - @$(NORMAL_INSTALL) - test -z "$(hooksdir)" || $(MKDIR_P) "$(DESTDIR)$(hooksdir)" - @list='$(hooks_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(hooksDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hooksdir)/$$f'"; \ - $(hooksDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hooksdir)/$$f"; \ - done - -uninstall-hooksDATA: - @$(NORMAL_UNINSTALL) - @list='$(hooks_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(hooksdir)/$$f'"; \ - rm -f "$(DESTDIR)$(hooksdir)/$$f"; \ - done -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-pkgtestsDATA: $(pkgtests_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgtestsdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgtestsdir)" - @list='$(pkgtests_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgtestsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgtestsdir)/$$f'"; \ - $(pkgtestsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgtestsdir)/$$f"; \ - done - -uninstall-pkgtestsDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgtests_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgtestsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgtestsdir)/$$f"; \ - done -install-xslDATA: $(xsl_DATA) - @$(NORMAL_INSTALL) - test -z "$(xsldir)" || $(MKDIR_P) "$(DESTDIR)$(xsldir)" - @list='$(xsl_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(xslDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xsldir)/$$f'"; \ - $(xslDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xsldir)/$$f"; \ - done - -uninstall-xslDATA: - @$(NORMAL_UNINSTALL) - @list='$(xsl_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(xsldir)/$$f'"; \ - rm -f "$(DESTDIR)$(xsldir)/$$f"; \ - done -install-atf_cHEADERS: $(atf_c_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_cdir)" - @list='$(atf_c_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_cHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_cdir)/$$f'"; \ - $(atf_cHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_cdir)/$$f"; \ - done - -uninstall-atf_cHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(atf_c_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_cdir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_cdir)/$$f"; \ - done -install-atf_c__HEADERS: $(atf_c___HEADERS) - @$(NORMAL_INSTALL) - test -z "$(atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(atf_c__dir)" - @list='$(atf_c___HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(atf_c__HEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_c__dir)/$$f'"; \ - $(atf_c__HEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_c__dir)/$$f"; \ - done - -uninstall-atf_c__HEADERS: - @$(NORMAL_UNINSTALL) - @list='$(atf_c___HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(atf_c__dir)/$$f'"; \ - rm -f "$(DESTDIR)$(atf_c__dir)/$$f"; \ - done -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - 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; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - 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; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - 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; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *$$ws$$tst$$ws*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ - else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @case `sed 15q $(srcdir)/NEWS` in \ - *"$(VERSION)"*) : ;; \ - *) \ - echo "NEWS not updated; not releasing" 1>&2; \ - exit 1;; \ - esac - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -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 - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) \ - $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ - $(HEADERS) bconfig.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(atf_atf_cdir)" "$(DESTDIR)$(atf_atf_c__dir)" "$(DESTDIR)$(atf_formatsdir)" "$(DESTDIR)$(atf_test_programsdir)" "$(DESTDIR)$(atf_toolsdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(atf_atf_shdir)" "$(DESTDIR)$(atf_datadir)" "$(DESTDIR)$(atf_formatsdir)" "$(DESTDIR)$(atf_test_programsdir)" "$(DESTDIR)$(atf_toolsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_atf_cdir)" "$(DESTDIR)$(atf_atf_c__dir)" "$(DESTDIR)$(atf_atf_shdir)" "$(DESTDIR)$(atf_datadir)" "$(DESTDIR)$(atf_formatsdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(atf_test_programsdir)" "$(DESTDIR)$(atf_toolsdir)" "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(xsldir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -rm -f atf-c++/$(DEPDIR)/$(am__dirstamp) - -rm -f atf-c++/$(am__dirstamp) - -rm -f atf-c/$(DEPDIR)/$(am__dirstamp) - -rm -f atf-c/$(am__dirstamp) - -rm -f tests/atf/atf-c++/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/atf/atf-c++/$(am__dirstamp) - -rm -f tests/atf/atf-c/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/atf/atf-c/$(am__dirstamp) - -rm -f tests/atf/formats/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/atf/formats/$(am__dirstamp) - -rm -f tests/atf/test_programs/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/atf/test_programs/$(am__dirstamp) - -rm -f tests/atf/tools/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/atf/tools/$(am__dirstamp) - -rm -f tests/bootstrap/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/bootstrap/$(am__dirstamp) - -rm -f tests/build/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/build/$(am__dirstamp) - -rm -f tests/build/atf-c++/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/build/atf-c++/$(am__dirstamp) - -rm -f tests/build/atf-c/$(DEPDIR)/$(am__dirstamp) - -rm -f tests/build/atf-c/$(am__dirstamp) - -rm -f tools/$(DEPDIR)/$(am__dirstamp) - -rm -f tools/$(am__dirstamp) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-atf_atf_cPROGRAMS clean-atf_atf_c__PROGRAMS \ - clean-atf_formatsPROGRAMS clean-atf_test_programsPROGRAMS \ - clean-atf_toolsPROGRAMS clean-binPROGRAMS clean-checkLIBRARIES \ - clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libexecPROGRAMS clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf atf-c++/$(DEPDIR) atf-c/$(DEPDIR) tests/atf/atf-c++/$(DEPDIR) tests/atf/atf-c/$(DEPDIR) tests/atf/formats/$(DEPDIR) tests/atf/test_programs/$(DEPDIR) tests/atf/tools/$(DEPDIR) tests/bootstrap/$(DEPDIR) tests/build/$(DEPDIR) tests/build/atf-c++/$(DEPDIR) tests/build/atf-c/$(DEPDIR) tools/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-local distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-atf_atf_cDATA install-atf_atf_cPROGRAMS \ - install-atf_atf_c__DATA install-atf_atf_c__PROGRAMS \ - install-atf_atf_shDATA install-atf_atf_shSCRIPTS \ - install-atf_cHEADERS install-atf_c__HEADERS \ - install-atf_dataDATA install-atf_dataSCRIPTS \ - install-atf_formatsDATA install-atf_formatsPROGRAMS \ - install-atf_formatsSCRIPTS install-atf_shDATA \ - install-atf_test_programsDATA \ - install-atf_test_programsPROGRAMS \ - install-atf_test_programsSCRIPTS install-atf_toolsDATA \ - install-atf_toolsPROGRAMS install-atf_toolsSCRIPTS \ - install-cssDATA install-docDATA install-dtdDATA install-egDATA \ - install-hooksDATA install-includeHEADERS install-man \ - install-pkgconfigDATA install-pkgtestsDATA install-xslDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ - install-libexecPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: install-man1 install-man3 install-man4 install-man5 \ - install-man7 - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -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/$(DEPDIR) tests/atf/atf-c++/$(DEPDIR) tests/atf/atf-c/$(DEPDIR) tests/atf/formats/$(DEPDIR) tests/atf/test_programs/$(DEPDIR) tests/atf/tools/$(DEPDIR) tests/bootstrap/$(DEPDIR) tests/build/$(DEPDIR) tests/build/atf-c++/$(DEPDIR) tests/build/atf-c/$(DEPDIR) tools/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-atf_atf_cDATA uninstall-atf_atf_cPROGRAMS \ - uninstall-atf_atf_c__DATA uninstall-atf_atf_c__PROGRAMS \ - uninstall-atf_atf_shDATA uninstall-atf_atf_shSCRIPTS \ - uninstall-atf_cHEADERS uninstall-atf_c__HEADERS \ - uninstall-atf_dataDATA uninstall-atf_dataSCRIPTS \ - uninstall-atf_formatsDATA uninstall-atf_formatsPROGRAMS \ - uninstall-atf_formatsSCRIPTS uninstall-atf_shDATA \ - uninstall-atf_test_programsDATA \ - uninstall-atf_test_programsPROGRAMS \ - uninstall-atf_test_programsSCRIPTS uninstall-atf_toolsDATA \ - uninstall-atf_toolsPROGRAMS uninstall-atf_toolsSCRIPTS \ - uninstall-binPROGRAMS uninstall-cssDATA uninstall-docDATA \ - uninstall-dtdDATA uninstall-egDATA uninstall-hooksDATA \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-libexecPROGRAMS uninstall-man \ - uninstall-pkgconfigDATA uninstall-pkgtestsDATA \ - uninstall-xslDATA - -uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \ - uninstall-man5 uninstall-man7 - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ - clean clean-atf_atf_cPROGRAMS clean-atf_atf_c__PROGRAMS \ - clean-atf_formatsPROGRAMS clean-atf_test_programsPROGRAMS \ - clean-atf_toolsPROGRAMS clean-binPROGRAMS clean-checkLIBRARIES \ - clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libexecPROGRAMS clean-libtool ctags dist dist-all \ - dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \ - 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_atf_cDATA \ - install-atf_atf_cPROGRAMS install-atf_atf_c__DATA \ - install-atf_atf_c__PROGRAMS install-atf_atf_shDATA \ - install-atf_atf_shSCRIPTS install-atf_cHEADERS \ - install-atf_c__HEADERS install-atf_dataDATA \ - install-atf_dataSCRIPTS install-atf_formatsDATA \ - install-atf_formatsPROGRAMS install-atf_formatsSCRIPTS \ - install-atf_shDATA install-atf_test_programsDATA \ - install-atf_test_programsPROGRAMS \ - install-atf_test_programsSCRIPTS install-atf_toolsDATA \ - install-atf_toolsPROGRAMS install-atf_toolsSCRIPTS \ - install-binPROGRAMS install-cssDATA install-data \ - install-data-am 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-pkgconfigDATA \ - install-pkgtestsDATA install-ps install-ps-am install-strip \ - 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_atf_cDATA \ - uninstall-atf_atf_cPROGRAMS uninstall-atf_atf_c__DATA \ - uninstall-atf_atf_c__PROGRAMS uninstall-atf_atf_shDATA \ - uninstall-atf_atf_shSCRIPTS uninstall-atf_cHEADERS \ - uninstall-atf_c__HEADERS uninstall-atf_dataDATA \ - uninstall-atf_dataSCRIPTS uninstall-atf_formatsDATA \ - uninstall-atf_formatsPROGRAMS uninstall-atf_formatsSCRIPTS \ - uninstall-atf_shDATA uninstall-atf_test_programsDATA \ - uninstall-atf_test_programsPROGRAMS \ - uninstall-atf_test_programsSCRIPTS uninstall-atf_toolsDATA \ - uninstall-atf_toolsPROGRAMS uninstall-atf_toolsSCRIPTS \ - 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-pkgconfigDATA uninstall-pkgtestsDATA \ - uninstall-xslDATA - - -dist-hook: $(srcdir)/admin/revision-dist.h check-install check-style - -# ------------------------------------------------------------------------- -# `admin' directory. -# ------------------------------------------------------------------------- - -.PHONY: check-install -check-install: - $(srcdir)/admin/check-install.sh $(srcdir)/INSTALL - -.PHONY: check-style -check-style: - $(srcdir)/admin/check-style.sh - -.PHONY: admin/revision.h -admin/revision.h: - @if [ -n "$(MTN)" -a -d $(top_srcdir)/_MTN ]; then \ - test -d admin || mkdir -p admin; \ - MTN="$(MTN)" ROOT="$(top_srcdir)" \ - $(top_srcdir)/admin/generate-revision.sh >admin/revision.h; \ - else \ - rm -f admin/revision.h; \ - fi - -$(srcdir)/admin/revision-dist.h: admin/revision.h - @if [ -f admin/revision.h ]; then \ - cp admin/revision.h $(srcdir)/admin/revision-dist.h; \ - echo '#define PACKAGE_REVISION_CACHED 1' \ - >>$(srcdir)/admin/revision-dist.h; \ - else \ - [ -f $(srcdir)/admin/revision-dist.h ]; \ - fi - -# 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 -data/atf-c.pc: $(srcdir)/data/atf-c.pc.in - test -d data || mkdir -p data - sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \ - -e 's,__CC__,$(CC),g' \ - -e 's,__INCLUDEDIR__,$(includedir),g' \ - -e 's,__LIBDIR__,$(libdir),g' \ - <$(srcdir)/data/atf-c.pc.in >data/atf-c.pc.tmp - mv data/atf-c.pc.tmp data/atf-c.pc -data/atf-c++.pc: $(srcdir)/data/atf-c++.pc.in - test -d data || mkdir -p data - sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \ - -e 's,__CXX__,$(CXX),g' \ - -e 's,__INCLUDEDIR__,$(includedir),g' \ - -e 's,__LIBDIR__,$(libdir),g' \ - <$(srcdir)/data/atf-c++.pc.in >data/atf-c++.pc.tmp - mv data/atf-c++.pc.tmp data/atf-c++.pc - -doc/atf.7: $(srcdir)/doc/atf.7.in - test -d doc || mkdir -p doc - sed -e 's,__DOCDIR__,$(docdir),g' \ - <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp - mv doc/atf.7.tmp doc/atf.7 -tests/bootstrap/h_tp_basic_sh: $(srcdir)/tests/bootstrap/h_tp_basic_sh.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/bootstrap || mkdir -p tests/bootstrap - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/bootstrap/h_tp_basic_sh.sh -tests/bootstrap/h_tp_atf_check_sh: \ - $(srcdir)/tests/bootstrap/h_tp_atf_check_sh.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/bootstrap || mkdir -p tests/bootstrap - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/bootstrap/h_tp_atf_check_sh.sh - -distclean-local: - -rm -rf testsuite.dir - -$(srcdir)/tests/bootstrap/package.m4: $(top_srcdir)/configure.ac - { \ - echo '# Signature of the current package.'; \ - echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ - echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ - echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ - echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ - echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ - } >$(srcdir)/tests/bootstrap/package.m4 - -$(srcdir)/tests/bootstrap/testsuite: $(srcdir)/tests/bootstrap/testsuite.at \ - $(testsuite_incs) \ - $(srcdir)/tests/bootstrap/package.m4 - autom4te --language=Autotest -I $(srcdir) \ - -I $(srcdir)/tests/bootstrap \ - $(srcdir)/tests/bootstrap/testsuite.at -o $@.tmp - mv $@.tmp $@ - -installcheck-local: - logfile=$$(pwd)/installcheck.log; \ - cd $(pkgtestsdir); \ - $(TESTS_ENVIRONMENT) atf-run | tee $${logfile} | atf-report; \ - res=$${?}; \ - echo; \ - echo "The verbatim output of atf-run has been saved to" \ - "installcheck.log"; \ - exit $${res} -tests/atf/atf-sh/h_misc: \ - $(srcdir)/tests/atf/atf-sh/h_misc.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/h_misc.sh -tests/atf/atf-sh/t_atf_check: \ - $(srcdir)/tests/atf/atf-sh/t_atf_check.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_atf_check.sh -tests/atf/atf-sh/t_config: \ - $(srcdir)/tests/atf/atf-sh/t_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_config.sh -tests/atf/atf-sh/t_normalize: \ - $(srcdir)/tests/atf/atf-sh/t_normalize.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_normalize.sh -tests/atf/atf-sh/t_tc: \ - $(srcdir)/tests/atf/atf-sh/t_tc.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_tc.sh -tests/atf/atf-sh/t_tp: \ - $(srcdir)/tests/atf/atf-sh/t_tp.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/atf-sh || mkdir -p tests/atf/atf-sh - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/atf-sh/t_tp.sh -tests/atf/data/t_pkg_config: \ - $(srcdir)/tests/atf/data/t_pkg_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/data || mkdir -p tests/atf/data - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/data/t_pkg_config.sh -tests/atf/formats/t_parsers: \ - $(srcdir)/tests/atf/formats/t_parsers.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/formats || mkdir -p tests/atf/formats - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/formats/t_parsers.sh -tests/atf/test_programs/h_sh: \ - $(srcdir)/tests/atf/test_programs/h_sh.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/h_sh.sh -tests/atf/test_programs/t_cleanup: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_cleanup.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_cleanup.sh -tests/atf/test_programs/t_config: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_config.sh -tests/atf/test_programs/t_env: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_env.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_env.sh -tests/atf/test_programs/t_fork: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_fork.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_fork.sh -tests/atf/test_programs/t_meta_data: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_meta_data.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_meta_data.sh -tests/atf/test_programs/t_srcdir: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_srcdir.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_srcdir.sh -tests/atf/test_programs/t_status: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_status.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_status.sh -tests/atf/test_programs/t_workdir: \ - $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_workdir.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/test_programs || mkdir -p tests/atf/test_programs - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/test_programs/common.sh \ - $(srcdir)/tests/atf/test_programs/t_workdir.sh -tests/atf/tools/t_atf_cleanup: \ - $(srcdir)/tests/atf/tools/t_atf_cleanup.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_cleanup.sh -tests/atf/tools/t_atf_compile: $(srcdir)/tests/atf/tools/t_atf_compile.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_compile.sh -tests/atf/tools/t_atf_config: $(srcdir)/tests/atf/tools/t_atf_config.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_config.sh -tests/atf/tools/t_atf_exec: $(srcdir)/tests/atf/tools/t_atf_exec.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_exec.sh -tests/atf/tools/t_atf_killpg: $(srcdir)/tests/atf/tools/t_atf_killpg.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_killpg.sh -tests/atf/tools/t_atf_report: $(srcdir)/tests/atf/tools/t_atf_report.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_report.sh -tests/atf/tools/t_atf_run: $(srcdir)/tests/atf/tools/t_atf_run.sh \ - $(ATF_COMPILE_DEPS) - test -d tests/atf/tools || mkdir -p tests/atf/tools - $(ATF_COMPILE_SH) -o $@ $(srcdir)/tests/atf/tools/t_atf_run.sh - -tools/atf-host-compile: $(srcdir)/tools/atf-host-compile.sh - sed -e 's,__ATF_PKGDATADIR__,$(srcdir)/atf-sh,g' \ - -e 's,__ATF_SHELL__,$(ATF_SHELL),g' \ - <$(srcdir)/tools/atf-host-compile.sh \ - >tools/atf-host-compile.tmp - chmod +x tools/atf-host-compile.tmp - mv tools/atf-host-compile.tmp tools/atf-host-compile -revision.h: admin/revision.h $(srcdir)/admin/revision-dist.h - @if [ -f admin/revision.h ]; then \ - cmp -s admin/revision.h revision.h || \ - cp admin/revision.h revision.h; \ - else \ - cmp -s $(srcdir)/admin/revision-dist.h revision.h || \ - cp $(srcdir)/admin/revision-dist.h revision.h; \ - fi - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/dist/atf/NEWS b/dist/atf/NEWS deleted file mode 100644 index 6b074ad16b8d..000000000000 --- a/dist/atf/NEWS +++ /dev/null @@ -1,155 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -Version 0.5 -=========== - -Release date: May 1st, 2008 -Status: Experimental - -* Clauses 3 and 4 of the BSD license used by the project were dropped. - All the code is now under a 2-clause BSD license compatible with the - GNU General Public License (GPL). - -* Added a C-only binding so that binary test programs do not need to be - tied to C++ at all. This binding is now known as the atf-c library. - -* Renamed the C++ binding to atf-c++ for consistency with the new atf-c. - -* Renamed the POSIX shell binding to atf-sh for consistency with the new - atf-c and atf-c++. - -* Added a -w flag to test programs through which it is possible to specify - the work directory to be used. This was possible in prior releases by - defining the workdir configuration variable (-v workdir=...), but was a - conceptually incorrect mechanism. - -* Test programs now preserve the execution order of test cases when they - are given in the command line. Even those mentioned more than once are - executed multiple times to comply with the user's requests. - - -Version 0.4 -=========== - -Release date: February 4th, 2008 -Status: Experimental - -Changes: - -* Added two new manual pages, atf-c++-api and atf-sh-api, describing the - C++ and POSIX shell interfaces used to write test programs. - -* Added a pkg-config file, useful to get the flags to build against the - C++ library or to easily detect the presence of ATF. - -* Added a way for test cases to require a specific architecture and/or - machine type through the new 'require.arch' and 'require.machine' - meta-data properties, respectively. - -* Added the 'timeout' property to test cases, useful to set an upper-bound - limit for the test's run time and thus prevent global test program stalls - due to the test case's misbehavior. - -* Added the atf-exec(1) internal utility, used to execute a command after - changing the process group it belongs to. - -* Added the atf-killpg(1) internal utility, used to kill process groups. - -* Multiple portability fixes. Of special interest, full support for SunOS - (Solaris Express Developer Edition 2007/09) using the Sun Studio 12 C++ - compiler. - -* Fixed a serious bug that prevented atf-run(1) from working at all under - Fedora 8 x86_64. Due to the nature of the bug, other platforms were - likely affected too. - - -Version 0.3 -=========== - -Release date: November 11th, 2007 -Status: Experimental - -Changes: - -* Added XML output support to atf-report. This is accompanied by a DTD for - the format's structure and sample XSLT/CSS files to post-process this - output and convert it to a plain HTML report. - -* Changed atf-run to add system information to the report it generates. - This is currently used by atf-report's XML output only, and is later - printed in the HTML reports in a nice and useful summary table. The user - and system administrator are allowed to tune this feature by means of - hooks. - -* Removed the test cases' 'isolated' property. This was intended to avoid - touching the file system at all when running the related test case, but - this has not been true for a long while: some control files are - unconditionally required for several purposes, and we cannot easily get - rid of them. This way we remove several critical and delicate pieces of - code. - -* Improved atf-report's CSV output format to include information about - test programs too. - -* Fixed the tests that used atf-compile to not require this tool as a - helper. Avoids systems without build-time utilities to skip many tests - that could otherwise be run. (E.g. NetBSD without the comp.tgz set - installed.) - -* Many general cleanups: Fixed many pieces of code marked as ugly and/or - incomplete. - - -Version 0.2 -=========== - -Release date: September 20th, 2007 -Status: Experimental - -Changes: - -* Test cases now get a known umask on entry. - -* atf-run now detects many unexpected failures caused by test programs - and reports them as bogus tests. atf-report is able to handle these - new errors and nicely reports them to the user. - -* All the data formats read and written by the tools have been documented - and cleaned up. These include those grammars that define how the - different components communicate with each other as well as the format - of files written by the developers and users: the Atffiles and the - configuration files. - -* Added the atf-version tool, a utility that displays information about the - currently installed version of ATF. - -* Test cases can now define an optional cleanup routine to undo their - actions regardless of their exit status. - -* atf-report now summarizes the list of failed (bogus) test programs when - using the ticker output format. - -* Test programs now capture some termination signals and clean up any - temporary files before exiting the program. - -* Multiple bug fixes and improvements all around. - - -Version 0.1 -=========== - -Release date: August 20th, 2007 -Status: Experimental - -Changes: - -* First public version. This was released coinciding with the end of the - Google Summer of Code 2007 program. - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/README b/dist/atf/README deleted file mode 100644 index ef44ae6f2cdf..000000000000 --- a/dist/atf/README +++ /dev/null @@ -1,46 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -Introduction -============ - -The Automated Testing Framework (ATF) 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. - -As regards developers, ATF 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. - -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. - - -Other documents -=============== - -* AUTHORS: List of authors and contributors for this project. - -* COPYING: License information. - -* ChangeLog: Pointers to the code repository. No actual history is - provided here. - -* INSTALL: Compilation and installation instructions. These is not the - standard document shipped with many packages, so be sure to read it for - things that are specific to ATF's build. - -* NEWS: List of major changes between formal, published releases. - -* ROADMAP: List of changes planned for future releases. - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/ROADMAP b/dist/atf/ROADMAP deleted file mode 100644 index fa9c6c99f710..000000000000 --- a/dist/atf/ROADMAP +++ /dev/null @@ -1,164 +0,0 @@ - Automated Testing Framework (atf) - The NetBSD Foundation, Inc. ---------------------------------------------------------------------------- - - -Introduction -============ - -This document contains a *non-exhaustive* list of things that should be -addressed in ATF before it can be considered stable. Some of the items -are planned for specific future releases, but take this with a big grain -of salt: the focus of a specific release may change completely depending -on how things develop. - - -Plans for 0.6 -============= - -* Add a binary atf-check tool that replaces atf-sh's atf_check function. - I suspect this will speed things up considerably, and will also expose - this extremely useful functionality to C/C++ test programs. - -* Add support for ATF_REQUIRE, making ATF_CHECK non-fatal. See Boost.Test - for details on this idea. Most useful for unit tests. - -* Add a module to atf-c to manage dynamic memory. Should provide a "mem - chunk" object that can only be managed through functions (i.e. not - directly) so that access to buffers can be safely controlled. Dealing - with strdup and similar functions, for example, might be complex. - - See these old revisions for a start, but these did not work correctly - because the use of (void **) casts brought aliasing problems: - - 78eeacf3b9284493e5e96b7866fc1d163a13bc02 - 8e200683a2b70eadca728c2e0347d4790777b3fc - 872393ed0177cbcc30ffacede228eb3986c42ab7 - -* Optimize timeout handling in atf-sh: there are too many processes - involved to run each test case, and this hurts a lot in OS X, for - example. One possibility is to integrate the timeout handling in - atf-exec and then kill the auxiliary code in atf.footer.subr. - - -Plans for 0.7 -============= - -* Add a tool to collect multiple outputs of atf-run (from different - machines) and generate a single (XML-only?) log with everything. - Must allow easy conversion to HTML for online publishing. - -* Allow grouping of test programs in tiers in an Atffile. This is to - permit the user specify "dependencies" between test programs: e.g. do - not run a specific test program if its dependencies have failed, because - it will certainly fail also. - -* Provide a kernel-level unit testing API (for NetBSD only, at the moment). - This should come in the form of an atf.ko module that provides functions - to define and register test cases, functions for results reporting and - an interface (a trivial file system?) that transports the - application/X-atf-tcs output to user-space, provides information to - user-space about the available test cases (a list) and allows user-space - to launch the execution of test cases. - -* Add expected failures and unexpected passes as test case results? The - former are used to indicate known failures at specific points and thus - not raise false positives when working on some unrelated feature. The - latter are used to detect changes that fixed expected failures. See - Monotone's test suite for an example. - - -Plans for pre-1.0 -================= - -* Fix all occurrences of XXX, TODO and FIXME. - -* Think of a way to properly add tests for (almost?) all error paths. - Most of them are probably broken already. - -* Improve error reporting: aside from clarifying error messages, this also - implies adding more error cases to give them more semantic meaning at the - source code level.. - -* Add an atf_check-like function to the C++ binding to allow easy testing - of executables. - -* Make the shell library work with 'set -e'? - -* Shell test programs dynamically locate where the shell library is by - calling atf-config (done by atf.init.subr). Contrarywise, binary test - programs are directly linked against the final location of libatf. - It may be nice if the latter loaded the library dynamically based on - what atf-config said, so the user could switch atf installations by - simply changing its PATH (and effectively making atf relocatable on the - file system). Why could this be nice? To painlessly run an older atf - test suite against a more recent version of the code base to ensure - there are no regressions even with older tests. Just a crazy idea, as - maybe what the shell test programs currently do is stupid. - -* Allow users to customize the build of atf by defining additional meta-data - for test cases. At the moment this is possible because the meta-data is - not sanity-checked, but I think it should be. Following the previous - item, NetBSD could add a 'netbsd.pr' variable and then use this data when - generating reports to add direct links to the appropriate PRs. - -* Make sure that the tests in tests/atf have, at the very least, the same - coverage as the ones in tests/bootstrap. - -* Document the code. - -* Possibly add a way to automatically gain or drop privileges when - require.user is set. - -* Add a way to specify which bug/issue/whatever a given test case is - stress-testing. This information is useful when detecting regressions. - - -Plans for 1.0-RC1 -================= - -* Build libatf as a shared library and set -version-info accordingly. - -* Set the DTDs' versions to 1.0. - - -Plans for post-1.0 -================== - -* Allow the parallel execution of tests. Achieving this with a test - program granularity is easy: only need to change atf-run. Lowering it - to a finer granularity (test cases) is harder and maybe not worth it. - - -Things that we will not do -========================== - -This is a list of things that will *not* be addressed anytime soon in the -project. Of course most of them would be nice to have in the future, but -they will not block releases nor drive development. We can obviously -change our mind in the future and add move some of these to the above list. - -* Native Win32 support: we are not talking about building atf with tools - such as Cygwin or MinGW, which should already be possible. Native Win32 - support means modifying the code to use Win32 library calls and easily - build out of the box (i.e. the GNU Autotools are not useful in that - case). - -* Extreme efficiency: even though we will focus on using the most suitable - data structures in each situation, we will not attempt to get extreme - efficiency by adding hacks that make the code uglier. Testing is a task - that requires a lot of resources on its own, and some tests will be - specially intensive, so there is no point in micro-optimizing atf if the - global gains are negligible. - -* Extreme portability: the initial goal of this project was to provide a - testing framework for the NetBSD Operating System. Given that this - system has a very nice build framework, we can be sure that atf will be - built and used with sane tools (basically a decent C++ compiler and a - POSIX-compliant shell interpreter). We will definitely not aim for - portability to broken systems by tweaking our code to not follow the - standards. - - ---------------------------------------------------------------------------- - End of document diff --git a/dist/atf/aclocal.m4 b/dist/atf/aclocal.m4 deleted file mode 100644 index d31a90f8730b..000000000000 --- a/dist/atf/aclocal.m4 +++ /dev/null @@ -1,7475 +0,0 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.61],, -[m4_warning([this file was generated for autoconf 2.61. -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'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 51 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_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 - 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. -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'] - -# 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 avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_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-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# 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. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_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 -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_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. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${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 </dev/null 2>&1 && unset CDPATH - -if test -z "$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 && - echo_test_string=`eval $cmd` && - (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. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && 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. - 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" - ;; - *ELF-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 - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - 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_TRY_LINK([],[],[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 - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if 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" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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 "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $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 - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - 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 - # 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>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - 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*) - # 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` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - 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` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$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 - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - 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 - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # 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_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; 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 - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -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 "$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 - 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 - $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_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; 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 - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - 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]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # 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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ -if test "$GCC" = yes; then - case $host_os in - 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 - # 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 - # Ok, now we have the path, separated by spaces, we can step through it - # 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` - 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 - 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; - 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; - } else { - lt_count--; - } - } - } - } - 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` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# 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' - 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' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - 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 - # 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 - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not 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 - # 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 - # 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 - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - 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' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - 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 $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - 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" - ;; - mingw*) - # 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 - ;; - 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}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - 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 - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) 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}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - 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*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - 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 - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - 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 - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - 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' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - 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' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - 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}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - 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}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - 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 - # 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 - 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' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - 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' - 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' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - 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 - ;; - -nto-qnx*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - 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' - 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 - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -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}' - 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" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - 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 - 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' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - 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' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - 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," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_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_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="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - 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 -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" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; 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 - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - 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" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; 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 - for ac_dir in $PATH; do - 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" - # 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 &1 /dev/null 2>&1; then - 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)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - 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_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_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -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 -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - 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 - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - 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 - # Check to see if the nm accepts a BSD-compat flag. - # 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'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-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(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([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 -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which 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 - -# 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 - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -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 -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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}' - - # 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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # 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"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; 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="" - 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. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes; 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` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_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' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_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' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_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' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_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 - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_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_AC_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' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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 - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # 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_AC_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_AC_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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_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. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_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' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_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' - - # 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' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_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"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_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' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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' - - # 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\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_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' - - # 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\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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 - # 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. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -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 -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&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_AC_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_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -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 - -# 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 - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -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 -AC_MSG_RESULT([$enable_static]) - -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -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" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_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" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 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 -# the Free Software Foundation; either version 2 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# 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. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# 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. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -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 in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $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. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# 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 - -# 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=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# 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 - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - 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_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - 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_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -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" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # 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 - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_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' - else - _LT_AC_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' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_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' - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_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'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" - # 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 - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # 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 - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[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 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, 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. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_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_AC_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' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_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_AC_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_AC_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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_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' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_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' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_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' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_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 -*** 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 -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; 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="" - 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 - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_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' - else - _LT_AC_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' - 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. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GCC" = yes; 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` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_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_AC_SYS_LIBPATH_AIX - _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_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' - fi - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_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 - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_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' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_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~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_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' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - 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 is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_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 - # 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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # 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 - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -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 - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $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 - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007 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_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.10' -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.10.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 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 -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# 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` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# 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_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# 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 - -# 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, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[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'. - 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_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - 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 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# 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_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - 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 - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 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 13 - -# 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. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# 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.60])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 -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. 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 -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# 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. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 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_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 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], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 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_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 -# 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_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 -ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_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 -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, 1999, 2000, 2001, 2003, 2004, 2005 -# 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_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$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. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 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_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 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_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -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, 1997, 2000, 2001, 2003, 2005 -# 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 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 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 -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 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_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 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_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# 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. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} 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. -_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 - - # 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 - -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 - -m4_include([m4/cxx-std-funcs.m4]) -m4_include([m4/developer-mode.m4]) -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]) diff --git a/dist/atf/admin/check-install.sh b/dist/atf/admin/check-install.sh deleted file mode 100755 index d783790c24bb..000000000000 --- a/dist/atf/admin/check-install.sh +++ /dev/null @@ -1,92 +0,0 @@ -#! /bin/sh -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# -# A utility to ensure that INSTALL lists the correct versions of the -# tools used to generate the distfile. -# - -Prog_Name=${0##*/} - -# -# err message -# -err() { - echo "${Prog_Name}: ${@}" 1>&2 - exit 1 -} - -# -# warn message -# -warn() { - echo "${Prog_Name}: ${@}" 1>&2 -} - -# -# check_tool readme_file prog_name verbose_name -# -# Executes 'prog_name' to determine its version and checks if the -# given 'readme_file' contains 'verbose_name ' in it. -# -check_tool() { - readme=${1} - prog=${2} - name=${3} - - ver=$(${prog} --version | head -n 1 | cut -d ' ' -f 4-) - - if grep "^\\* ${name} ${ver}$" ${readme} >/dev/null; then - true - else - warn "Incorrect version of ${name}" - false - fi -} - -# -# main readme_file -# -# Entry point. -# -main() { - readme=${1} - ret=0 - - check_tool ${readme} autoconf "GNU autoconf" || ret=1 - check_tool ${readme} automake "GNU automake" || ret=1 - check_tool ${readme} libtool "GNU libtool" || ret=1 - - return ${ret} -} - -main "${@}" - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/check-style-c.awk b/dist/atf/admin/check-style-c.awk deleted file mode 100644 index 9319714a6ab4..000000000000 --- a/dist/atf/admin/check-style-c.awk +++ /dev/null @@ -1,94 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -function warn(msg) { - print FILENAME "[" FNR "]: " msg > "/dev/stderr" - error = 1 -} - -BEGIN { - skip = 0 - error = 0 -} - -/NO_CHECK_STYLE_BEGIN/ { - skip = 1 - next -} - -/NO_CHECK_STYLE_END/ { - skip = 0 - next -} - -/NO_CHECK_STYLE/ { - next -} - -{ - if (skip) - next -} - -/#ifdef/ { - warn("Undesired usage of #ifdef; use #if defined()") -} - -/#ifndef/ { - warn("Undesired usage of #ifndef; use #if !defined()") -} - -/assert[ \t]*\(/ { - warn("Use the macros in sanity.h instead of assert"); -} - -/getprogname/ { - warn("getprogname(3) is not portable"); -} - -/include.*assert.h/ { - warn("Do not include assert.h"); -} - -/setprogname/ { - warn("setprogname(3) is not portable"); -} - -/\/\// { - warn("Do not use C99-style comments"); -} - -END { - if (skip) - warn("Missing NO_CHECK_STYLE_END"); - if (error) - exit 1 -} - -# vim: syntax=awk:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/check-style-common.awk b/dist/atf/admin/check-style-common.awk deleted file mode 100644 index 5af4f2fb43e5..000000000000 --- a/dist/atf/admin/check-style-common.awk +++ /dev/null @@ -1,82 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -function warn(msg) { - print FILENAME "[" FNR "]: " msg > "/dev/stderr" - error = 1 -} - -BEGIN { - skip = 0 - error = 0 -} - -/NO_CHECK_STYLE_BEGIN/ { - skip = 1 - next -} - -/NO_CHECK_STYLE_END/ { - skip = 0 - next -} - -/NO_CHECK_STYLE/ { - next -} - -{ - if (skip) - next - - if (length > 79) - warn("Line too long to fit on screen") -} - -/^ *\t+/ { - if (! match(FILENAME, "Makefile")) - warn("Tab character used for indentation"); -} - -/[ \t]+$/ { - warn("Trailing spaces or tabs"); -} - -/#![^ ]/ { # NO_CHECK_STYLE - warn("Invalid shellbang: missing space after !"); -} - -END { - if (skip) - warn("Missing NO_CHECK_STYLE_END"); - if (error) - exit 1 -} - -# vim: syntax=awk:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/check-style-cpp.awk b/dist/atf/admin/check-style-cpp.awk deleted file mode 100644 index af8e7e23d443..000000000000 --- a/dist/atf/admin/check-style-cpp.awk +++ /dev/null @@ -1,81 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -function warn(msg) { - print FILENAME "[" FNR "]: " msg > "/dev/stderr" - error = 1 -} - -BEGIN { - skip = 0 - error = 0 -} - -/NO_CHECK_STYLE_BEGIN/ { - skip = 1 - next -} - -/NO_CHECK_STYLE_END/ { - skip = 0 - next -} - -/NO_CHECK_STYLE/ { - next -} - -{ - if (skip) - next -} - -/#ifdef/ { - warn("Undesired usage of #ifdef; use #if defined()") -} - -/#ifndef/ { - warn("Undesired usage of #ifndef; use #if !defined()") -} - -/assert[ \t]*\(/ { - warn("Use the macros in sanity.hpp instead of assert"); -} - -/include.*assert/ { - warn("Do not include assert.h nor cassert"); -} -END { - if (skip) - warn("Missing NO_CHECK_STYLE_END"); - if (error) - exit 1 -} - -# vim: syntax=awk:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/check-style-man.awk b/dist/atf/admin/check-style-man.awk deleted file mode 100644 index 73e5ced2da64..000000000000 --- a/dist/atf/admin/check-style-man.awk +++ /dev/null @@ -1,78 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -function warn(msg) { - print FILENAME "[" FNR "]: " msg > "/dev/stderr" - error = 1 -} - -BEGIN { - skip = 0 - error = 0 -} - -/NO_CHECK_STYLE_BEGIN|^\.Bd/ { - skip = 1 - next -} - -/NO_CHECK_STYLE_END|^\.Ed/ { - skip = 0 - next -} - -/NO_CHECK_STYLE/ { - next -} - -/^\.\\"/ { - next -} - -{ - if (skip) - next -} - -/\.\.|e\.g\.|i\.e\./ { - next -} - -/\.[ ]+[a-zA-Z]+/ { - warn("Sentence does not start on new line") -} - -END { - if (skip) - warn("Missing NO_CHECK_STYLE_END"); - if (error) - exit 1 -} - -# vim: syntax=awk:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/check-style-shell.awk b/dist/atf/admin/check-style-shell.awk deleted file mode 100644 index 457c72235b0e..000000000000 --- a/dist/atf/admin/check-style-shell.awk +++ /dev/null @@ -1,110 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -function warn(msg) { - print FILENAME "[" FNR "]: " msg > "/dev/stderr" - error = 1 -} - -BEGIN { - skip = 0 - error = 0 - emacs_modeline = 0 - vim_modeline = 0 -} - -/NO_CHECK_STYLE_BEGIN/ { - skip = 1 - next -} - -/NO_CHECK_STYLE_END/ { - skip = 0 - next -} - -/NO_CHECK_STYLE/ { - next -} - -{ - if (skip) - next -} - -/vim: syntax=sh/ { - vim_modeline = 1 -} - -/^[ \t]*#/ { - next -} - -/[$ \t]+_[a-zA-Z0-9]+=/ { - warn("Variable should not start with an underline") -} - -/[^\\]\$[^0-9!'"$?@#*{}(|\/]+/ { - warn("Missing braces around variable name") -} - -/=(""|'')/ { - warn("Assignment to the empty string does not need quotes"); -} - -/basename[ \t]+/ { - warn("Use parameter expansion instead of basename"); -} - -/dirname[ \t]+/ { - warn("Use parameter expansion instead of dirname"); -} - -/if[ \t]+(test|![ \t]+test)/ { - warn("Use [ instead of test"); -} - -/[ \t]+(test|\[).*==/ { - warn("test(1)'s == operator is not portable"); -} - -/if.*;[ \t]*fi$/ { - warn("Avoid using a single-line if conditional"); -} - -END { - if (skip) - warn("Missing NO_CHECK_STYLE_END"); - if (! vim_modeline) - warn("Missing mode lines"); - if (error) - exit 1 -} - -# vim: syntax=awk:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/check-style.sh b/dist/atf/admin/check-style.sh deleted file mode 100755 index cb37436e7106..000000000000 --- a/dist/atf/admin/check-style.sh +++ /dev/null @@ -1,183 +0,0 @@ -#! /bin/sh -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# -# A utility to sanity check the coding style of all source files in the -# project tree. -# - -Prog_Name=${0##*/} - -# -# err message -# -err() { - echo "${Prog_Name}: ${@}" 1>&2 - exit 1 -} - -# -# warn message -# -warn() { - echo "${Prog_Name}: ${@}" 1>&2 -} - -# -# guess_topdir -# -# Locates the project's top directory and prints its path. The caller -# must verify if the result is correct or not. -# -guess_topdir() { - olddir=$(pwd) - topdir=$(pwd) - while [ ${topdir} != / ]; do - if [ -f ./atf-c.h ]; then - break - else - cd .. - topdir=$(pwd) - fi - done - cd ${olddir} - echo ${topdir} -} - -# -# find_sources -# -# Locates all source files within the project, relative to the current -# directory, and prints their paths. -# -find_sources() { - find . \( -name "AUTHORS" -o \ - -name "COPYING" -o \ - -name "ChangeLog" -o \ - -name "NEWS" -o \ - -name "README" -o \ - -name "TODO" -o \ - -name "*.[0-9]" -o \ - -name "*.ac" -o \ - -name "*.am" -o \ - -name "*.at" -o \ - -name "*.awk" -o \ - -name "*.c" -o \ - -name "*.cpp" -o \ - -name "*.h" -o \ - -name "*.hpp" -o \ - -name "*.m4" -o \ - -name "*.sh" \ - \) -a \( \ - \! -path "*autom4te*" -a \ - -type f -a \ - \! -name "aclocal.m4" \ - \! -name "bconfig.h" \ - \! -name "*.so.*" \ - \) -} - -# -# guess_formats file -# -# Guesses the formats applicable to the given file and prints the resulting -# list. -# -guess_formats() { - case ${1} in - */ltmain.sh) - ;; - *.[0-9]) - echo common man - ;; - *.c|*.h) - echo common c - ;; - *.cpp|*.hpp) - echo common cpp - ;; - *.sh) - echo common shell - ;; - *) - echo common - ;; - esac -} - -# -# check_file file -# -# Checks the validity of the given file. -# -check_file() { - err=0 - for format in $(guess_formats ${1}); do - awk -f ${topdir}/admin/check-style-${format}.awk ${1} || err=1 - done - - return ${err} -} - -# -# main [file list] -# -# Entry point. -# -main() { - topdir=$(guess_topdir) - if [ ! -f ${topdir}/atf-c.h ]; then - err "Could not locate the project's top directory" - fi - - if [ ${#} -gt 0 ]; then - sources=${@} - else - cd ${topdir} - sources=$(find_sources) - fi - - ok=0 - for file in ${sources}; do - file=$(echo ${file} | sed -e "s,\\./,,") - - if [ ! -f ${file} ]; then - err "Could not open ${file}" - else - check_file ${file} || ok=1 - fi - done - - return ${ok} -} - -main "${@}" - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/admin/compile b/dist/atf/admin/compile deleted file mode 100755 index 1b1d23216958..000000000000 --- a/dist/atf/admin/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# 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 -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/dist/atf/admin/config.guess b/dist/atf/admin/config.guess deleted file mode 100755 index b6e6955881f7..000000000000 --- a/dist/atf/admin/config.guess +++ /dev/null @@ -1,1516 +0,0 @@ -#! /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 Free Software Foundation, -# Inc. - -timestamp='2007-03-06' - -# 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 -# (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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# 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 to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# 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. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -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 -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." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -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 - -# 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*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # 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)` - 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 ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - 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}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - 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}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - 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" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - 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 ;; - 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 - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *: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:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - 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 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # 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} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # 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 ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - 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` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 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 - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #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); - - 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` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - 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 ;; - 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}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`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 - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${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 ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - 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, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - 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 i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /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; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - 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 - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "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 - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - 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` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - 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. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/dist/atf/admin/config.sub b/dist/atf/admin/config.sub deleted file mode 100755 index 5defff65a6e4..000000000000 --- a/dist/atf/admin/config.sub +++ /dev/null @@ -1,1622 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-01-18' - -# 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 -# (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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# 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. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -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 -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." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# 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* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -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) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | 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 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | 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 \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-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. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | 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-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - 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 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - 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 - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -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* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -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*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/dist/atf/admin/depcomp b/dist/atf/admin/depcomp deleted file mode 100755 index e5f9736c7239..000000000000 --- a/dist/atf/admin/depcomp +++ /dev/null @@ -1,589 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2007-03-29.01 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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 -# 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# 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 Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# 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 -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## 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). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - 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. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## 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 ' ' ' -' < "$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. -## 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" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - 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 - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | 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" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # 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$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - 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" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -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" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -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 ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - 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 "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" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # '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$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#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$//'` - - 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 - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - 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" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # 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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$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" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## 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" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - 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" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/dist/atf/admin/install-sh b/dist/atf/admin/install-sh deleted file mode 100755 index 1281687a6a9d..000000000000 --- a/dist/atf/admin/install-sh +++ /dev/null @@ -1,291 +0,0 @@ -#!/bin/sh -# -# $NetBSD: install-sh,v 1.1.1.1 2007/11/12 14:50:55 jmmv 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). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# 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. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `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="$mvprog" -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;; - - -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;; - - *) 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" - 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=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - 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 - - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - - if [ x"$dir_arg" != x ] - then - if [ -d "$dstarg" ]; then - true - else - $doit $mkdirprog "$dstarg" && - - 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 [ x"$dstisfile" = x ] - then - file=$srcarg - else - file=$dst - fi - - dstfile=`basename "$file"` - dstfinal="$dstdir/$dstfile" - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# 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" - -# Move or copy the file name to the temp name - - $doit $doinst $srcarg "$dsttmp" && - - trap "rm -f ${dsttmp}" 0 && - -# 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 $instcmd $src $dsttmp" command. - - 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 && - -# Now rename the file to the real destination. - - if [ x"$suffix" != x ] && [ -f "$dstfinal" ] - then - $doit $mvcmd "$dstfinal" "$dstbackup" - else - $doit $rmcmd -f "$dstfinal" - fi && - $doit $mvcmd "$dsttmp" "$dstfinal" - fi - -done && - - -exit 0 diff --git a/dist/atf/admin/ltmain.sh b/dist/atf/admin/ltmain.sh deleted file mode 100644 index 2b51468abc6f..000000000000 --- a/dist/atf/admin/ltmain.sh +++ /dev/null @@ -1,7024 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 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 -# the Free Software Foundation; either version 2 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# 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. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)" - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -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 - # 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 -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# 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! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# 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 "$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" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# 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. -func_win32_libid () -{ - 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 - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# 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. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - # Set the commonly-used compilers for some tags. - tag_compilers_CC="*cc *xlc" - tag_compilers_CXX="*++ *CC" - tag_compilers_F77="*77 *fort" - base_compiler=`set -- "$@"; $echo $1` - # If $tagname still isn't set, then try to infer if the default - # "CC" tag applies by matching up the base compile command to some - # compilers commonly used for the "CC" tag. - if test -z "$tagname"; then - z=CC - eval "tag_compilers=\$tag_compilers_${z}" - if test -n "$tag_compilers"; then - for zp in $tag_compilers; do - case $base_compiler in - $zp) - # The compiler in the base compile command matches - # one of the common compilers for the current tag. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - done - fi - fi - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - 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` "*) ;; - # 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`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - # If $tagname still isn't set, then try to infer it by - # matching up the base compile command to some compilers - # commonly used for certain tags. - base_compiler=`set -- "$@"; $echo $1` - eval "tag_compilers=\$tag_compilers_${z}" - if test -n "$tag_compilers"; then - for zp in $tag_compilers; do - case $base_compiler in - $zp) - # The compiler in the base compile command matches - # one of the common compilers for the current tag. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - done - if test -n "$tagname"; then - break - fi - fi - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - 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}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 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." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# 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= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc* | *CC) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; 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" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # 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 - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -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 -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." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$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 -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." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$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 -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." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - 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" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; 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_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - # Canonicalise the pathname - tmp="" - while test "$arg" != "$tmp" - do - tmp=$arg - arg=`$echo "X$arg" | $Xsed -e 's%[^/.][^/.]*/\.\.%%g' -e 's%/\./%/%g' -e 's%//*%/%g' -e 's%/$%%g'` - done - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - case $host:$arg in - *-*-dragonfly*:-pthread) - # pkgsrc hack to use -pthread in .la file for final linking - deplibs="$deplibs $arg" - ;; - esac - continue - ;; - - -module) - module=yes - continue - ;; - - # -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* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - 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" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; 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_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - 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\'\` - 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\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # 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 test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - case $host:$deplib in - *-*-dragonfly*:-pthread) - # pkgsrc hack to use -pthread in .la file for final linking - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - ;; - esac - ;; - esac - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - 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 $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 - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_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 - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - 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 used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - 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" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - 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" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; 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" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # 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 - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - 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" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$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 - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$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 && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - 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 - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; 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 - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; 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" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-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" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # 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" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; 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 - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; 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 - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - 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" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; 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" - 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 - # Not a shared library - if test "$deplibs_check_method" != pass_all; 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." - 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." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && 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 test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - 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 "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; 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 - # 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" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # 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" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # 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 - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - 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]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - 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]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - 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]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - versuffix2= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - versuffix2="$major.$age" - ;; - - osf) - major=.`expr $current - $age` - 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 - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - 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 - major= - versuffix= - versuffix2= - 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 - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - 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" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "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" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # 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="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $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 "*** 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" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - 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 \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $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 "*** 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" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - 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 - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "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." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; 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." - 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." - fi - if test "$build_old_libs" = no; 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." - - 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" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - 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 - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - 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" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$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 - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - 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:" - 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" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $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 -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # 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\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # 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 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'` - else - gentop="$output_objdir/${obj}x" - generated="$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 - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - 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 / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - 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" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - 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" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$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" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; 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` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # 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*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - 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'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - 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" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - 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" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - 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 - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - 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"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - 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 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#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; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = 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"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# 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 (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -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 - # 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 -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# 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 - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -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\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e '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'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - 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 >> $output "\ - # 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. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - 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*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$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 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # 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" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$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 - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - 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\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - 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" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - 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) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # 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 || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Canonicalise the pathname: - # - remove foo/../ - # - replace // - # - remove /./ - # - strip any trailing / - tmp="" - while test "$dest" != "$tmp"; do - tmp=$dest - dest=`$echo "X$dest" | $Xsed -e 's%[^/.][^/.]*/\.\.%%g' -e 's%/\./%/%g' -e 's%//*%/%g' -e 's%/$%%g'` - done - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # 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 - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - 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="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo 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. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && 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\" - - $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" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - 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 - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $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" - 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" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # 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" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [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 - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -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 \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -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 -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -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'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -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' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -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." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -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 - -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 - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -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 - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -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 -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 \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -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 -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which 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 -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/dist/atf/admin/missing b/dist/atf/admin/missing deleted file mode 100755 index 1c8ff7049d8f..000000000000 --- a/dist/atf/admin/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally 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 -# 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - 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 - ;; - - -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. - -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 - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# 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). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - 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 - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 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 1 - 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 - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - 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 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/dist/atf/admin/revision-dist.h b/dist/atf/admin/revision-dist.h deleted file mode 100644 index 8d7d7d8cf916..000000000000 --- a/dist/atf/admin/revision-dist.h +++ /dev/null @@ -1,2 +0,0 @@ -#define PACKAGE_REVISION_BASE "0b094aecb5df00cbc8a6a1a9b2668bd586ad5938" -#define PACKAGE_REVISION_CACHED 1 diff --git a/dist/atf/atf-c++.hpp b/dist/atf/atf-c++.hpp deleted file mode 100644 index 5c8d92311d4f..000000000000 --- a/dist/atf/atf-c++.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_HPP_) -#define _ATF_CXX_HPP_ - -#include - -#endif // !defined(_ATF_CXX_HPP_) diff --git a/dist/atf/atf-c++/application.cpp b/dist/atf/atf-c++/application.cpp deleted file mode 100644 index 02c52b69fb6f..000000000000 --- a/dist/atf/atf-c++/application.cpp +++ /dev/null @@ -1,311 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -extern "C" { -#include -} - -#include -#include -#include -#include - -extern "C" { -#include "atf-c/object.h" -} - -#include "atf-c++/application.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/ui.hpp" - -#if !defined(HAVE_VSNPRINTF_IN_STD) -namespace std { -using ::vsnprintf; -} -#endif // !defined(HAVE_VSNPRINTF_IN_STD) - -namespace impl = atf::application; -#define IMPL_NAME "atf::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) -{ - atf_init_objects(); -} - -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, const char* arg) -{ -} - -void -impl::app::process_options(void) -{ - PRE(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; - ::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; -} - -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) << std::endl - << std::endl - << ui::format_text(m_description) << std::endl - << std::endl; - - options_set opts = options(); - INV(!opts.empty()); - os << "Available options:" << std::endl; - 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) - << std::endl; - } - os << std::endl; - - 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 + ".") - << std::endl; -} - -int -impl::app::run(int argc, char* const* argv) -{ - PRE(argc > 0); - PRE(argv != NULL); - - m_argc = argc; - m_argv = argv; - - m_prog_name = std::strrchr(m_argv[0], '/'); - if (m_prog_name == NULL) - m_prog_name = m_argv[0]; - else - m_prog_name++; - - 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()) - << std::endl - << ui::format_info(m_prog_name, std::string("Type `") + - m_prog_name + " -h' for more details.") - << std::endl; - errcode = EXIT_FAILURE; - } catch (const std::runtime_error& e) { - std::cerr << ui::format_error(m_prog_name, std::string(e.what())) - << std::endl; - 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) - << std::endl; - errcode = EXIT_FAILURE; - } catch (...) { - std::cerr << ui::format_error(m_prog_name, - std::string("Caught unknown error\n") + - bug) - << std::endl; - errcode = EXIT_FAILURE; - } - return errcode; -} diff --git a/dist/atf/atf-c++/application.hpp b/dist/atf/atf-c++/application.hpp deleted file mode 100644 index a82cacb21a3b..000000000000 --- a/dist/atf/atf-c++/application.hpp +++ /dev/null @@ -1,112 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_APPLICATION_HPP_) -#define _ATF_CXX_APPLICATION_HPP_ - -#include -#include -#include -#include - -namespace atf { -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_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* argv); -}; - -} // namespace application -} // namespace atf - -#endif // !defined(_ATF_CXX_APPLICATION_HPP_) diff --git a/dist/atf/atf-c++/atf-c++-api.3 b/dist/atf/atf-c++/atf-c++-api.3 deleted file mode 100644 index 9420bdc017d7..000000000000 --- a/dist/atf/atf-c++/atf-c++-api.3 +++ /dev/null @@ -1,264 +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. -.\" -.Dd April 26, 2008 -.Dt ATF-C++-API 3 -.Os -.Sh NAME -.Nm ATF_ADD_TEST_CASE , -.Nm ATF_CHECK , -.Nm ATF_CHECK_EQUAL , -.Nm ATF_CHECK_THROW , -.Nm ATF_FAIL , -.Nm ATF_INIT_TEST_CASES , -.Nm ATF_PASS , -.Nm ATF_SKIP , -.Nm ATF_TEST_CASE , -.Nm ATF_TEST_CASE_BODY , -.Nm ATF_TEST_CASE_CLEANUP , -.Nm ATF_TEST_CASE_HEAD , -.Nm ATF_TEST_CASE_WITH_CLEANUP -.Nd C++ API to write ATF-based test programs -.Sh SYNOPSIS -.In atf-c++.hpp -.Fn ATF_ADD_TEST_CASE "tcs" "name" -.Fn ATF_CHECK "expression" -.Fn ATF_CHECK_EQUAL "expression_1" "expression_2" -.Fn ATF_CHECK_THROW "statement_1" "expected_exception" -.Fn ATF_FAIL "reason" -.Fn ATF_INIT_TEST_CASES "tcs" -.Fn ATF_PASS -.Fn ATF_SKIP "reason" -.Fn ATF_TEST_CASE "name" -.Fn ATF_TEST_CASE_BODY "name" -.Fn ATF_TEST_CASE_CLEANUP "name" -.Fn ATF_TEST_CASE_HEAD "name" -.Fn ATF_TEST_CASE_WITH_CLEANUP "name" -.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: -.Bd -literal -offset indent -extern "C" { -.Ns ... C-specific includes go here ... -} - -.Ns ... C++-specific includes go here ... - -#include - -ATF_TEST_CASE(tc1); -ATF_TEST_CASE_HEAD(tc1) -{ - ... first test case's header ... -} -ATF_TEST_CASE_BODY(tc1) -{ - ... first test case's body ... -} - -ATF_TEST_CASE_WITH_CLEANUP(tc2); -ATF_TEST_CASE_HEAD(tc2) -{ - ... second test case's header ... -} -ATF_TEST_CASE_BODY(tc2) -{ - ... second test case's body ... -} -ATF_TEST_CASE_CLEANUP(tc2) -{ - ... second test case's cleanup ... -} - -.Ns ... additional test cases ... - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, tc1) - ATF_ADD_TEST_CASE(tcs, tc2) - ... add additional test cases ... -} -.Ed -.Ss Definition of test cases -Test cases have an identifier and are composed of three different parts: -the header, the body and an optional cleanup routine, all of which are -described in -.Xr atf-test-case 8 . -To define test cases, one can use the -.Fn ATF_TEST_CASE -or the -.Fn ATF_TEST_CASE_WITH_CLEANUP -macros, which take a single parameter specifiying the test case's -name. -The former does not allow the specification of a cleanup routine for the -test case while the latter does. -It is important to note that these -.Em do 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 -macro detailed in -.Sx Program initialization . -.Pp -Later on, one must define the three parts of the body by means of three -functions. -Their headers are given by the -.Fn ATF_TEST_CASE_HEAD , -.Fn ATF_TEST_CASE_BODY -and -.Fn ATF_TEST_CASE_CLEANUP -macros, all of which take the test case's name. -Following each of these, a block of code is expected, surrounded by the -opening and closing brackets. -.Ss Program initialization -The library provides a way to easily define the test program's -.Fn main -function. -You should never define one on your own, but rely on the -library to do it for you. -This is done by using the -.Fn ATF_INIT_TEST_CASES -macro, which is passed the name of the list that will hold the test cases. -This name can be whatever you want as long as it is a valid variable value. -.Pp -After the macro, you are supposed to provide the body of a function, which -should only use the -.Fn ATF_ADD_TEST_CASE -macro to register the test cases the test program will execute. -The first parameter of this macro matches the name you provided in the -former call. -.Ss Header definitions -The test case's header can define the meta-data by using the -.Fn set -method, which takes two parameters: the first one specifies the -meta-data variable to be set and the second one specifies its value. -Both of them are strings. -.Ss Configuration variables -The test case has read-only access to the current configuration variables -by means of the -.Ft bool -.Fn has_config_var -and the -.Ft std::string -.Fn get_config_var -methods, which can be called in any of the three parts of a test case. -.Ss Access to the source directory -It is possible to get the path to the test case's source directory from any -of its three components by querying the -.Sq srcdir -configuration variable. -.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 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. -.Ss Test case finalization -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 -or -.Fn ATF_SKIP . -These three macros 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 -does not take any parameters. -.Fn ATF_FAIL -and -.Fn ATF_SKIP -take a single string 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 -the user can quickly know why the test did not pass. -.Ss Helper macros for common checks -The library provides several macros that are very handy in multiple -situations. -These basically check some condition after executing a given statement or -processing a given expression and, if the condition is not met, they -automatically call -.Fn ATF_FAIL -with an appropriate error message. -.Pp -.Fn ATF_CHECK -takes an expression and raises a failure if it evaluates to false. -.Pp -.Fn ATF_CHECK_EQUAL -takes two expressions and raises a failure if the two do not evaluate to -the same exact value. -.Pp -.Fn ATF_CHECK_THROW -takes a statement and the name of an exception and raises a failure if -the statement did not throw the specified exception. -.Sh EXAMPLES -The following shows a complete test program with a single test case that -validates the addition operator: -.Bd -literal -offset indent -#include - -ATF_TEST_CASE(addition); -ATF_TEST_CASE_HEAD(addition) -{ - set("descr", "Sample tests for the addition operator"); -} -ATF_TEST_CASE_BODY(addition) -{ - ATF_CHECK_EQUAL(0 + 0, 0); - ATF_CHECK_EQUAL(0 + 1, 1); - ATF_CHECK_EQUAL(1 + 0, 1); - - ATF_CHECK_EQUAL(1 + 1, 2); - - ATF_CHECK_EQUAL(100 + 200, 300); -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, addition); -} -.Ed -.Sh SEE ALSO -.Xr atf-test-program 1 , -.Xr atf 7 , -.Xr atf-test-case 8 diff --git a/dist/atf/atf-c++/atffile.cpp b/dist/atf/atf-c++/atffile.cpp deleted file mode 100644 index 625c2d9c4fb7..000000000000 --- a/dist/atf/atf-c++/atffile.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/atffile.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/expand.hpp" -#include "atf-c++/formats.hpp" - -// ------------------------------------------------------------------------ -// The "reader" helper class. -// ------------------------------------------------------------------------ - -class reader : public atf::formats::atf_atffile_reader { - const atf::fs::directory& m_dir; - atf::tests::vars_map m_conf, m_props; - std::vector< std::string > m_tps; - - void - got_tp(const std::string& name, bool isglob) - { - if (isglob) { - std::vector< std::string > ms = - atf::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(); - iter != ms.end(); iter++) - m_tps.push_back(*iter); - } else { - if (m_dir.find(name) == m_dir.end()) - throw atf::not_found_error< atf::fs::path > - ("Cannot locate the " + name + " file", - atf::fs::path(name)); - m_tps.push_back(name); - } - } - - void - got_prop(const std::string& name, const std::string& val) - { - m_props[name] = val; - } - - void - got_conf(const std::string& var, const std::string& val) - { - m_conf[var] = val; - } - -public: - reader(std::istream& is, const atf::fs::directory& dir) : - atf::formats::atf_atffile_reader(is), - m_dir(dir) - { - } - - const atf::tests::vars_map& - conf(void) - const - { - return m_conf; - } - - const atf::tests::vars_map& - props(void) - const - { - return m_props; - } - - const std::vector< std::string >& - tps(void) - const - { - return m_tps; - } -}; - -// ------------------------------------------------------------------------ -// The "atffile" class. -// ------------------------------------------------------------------------ - -atf::atffile::atffile(const atf::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()); - dir.erase(filename.leaf_name()); - fs::directory::iterator iter = dir.begin(); - while (iter != dir.end()) { - const std::string& name = (*iter).first; - const fs::file_info& fi = (*iter).second; - - // Discard hidden files and non-executable ones so that they are - // not candidates for glob matching. - if (name[0] == '.' || (!fi.is_owner_executable() && - !fi.is_group_executable())) - dir.erase(iter++); - else - iter++; - } - - // Parse the atffile. - std::ifstream is(filename.c_str()); - if (!is) - throw atf::not_found_error< fs::path > - ("Cannot open Atffile", filename); - reader r(is, dir); - r.read(); - is.close(); - - // Update the atffile with the data accumulated in the reader. - m_conf = r.conf(); - m_props = r.props(); - m_tps = r.tps(); - - // Sanity checks. - if (m_props.find("test-suite") == m_props.end()) - throw std::runtime_error("Undefined property `test-suite'"); -} - -const std::vector< std::string >& -atf::atffile::tps(void) - const -{ - return m_tps; -} - -const atf::tests::vars_map& -atf::atffile::conf(void) - const -{ - return m_conf; -} - -const atf::tests::vars_map& -atf::atffile::props(void) - const -{ - return m_props; -} diff --git a/dist/atf/atf-c++/atffile.hpp b/dist/atf/atf-c++/atffile.hpp deleted file mode 100644 index 404ebf91a92a..000000000000 --- a/dist/atf/atf-c++/atffile.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_ATFFILE_HPP_) -#define _ATF_CXX_ATFFILE_HPP_ - -#include -#include - -#include -#include - -namespace atf { - -class atffile { - atf::tests::vars_map m_conf; - std::vector< std::string > m_tps; - atf::tests::vars_map m_props; - -public: - atffile(const fs::path&); - - const atf::tests::vars_map& conf(void) const; - const std::vector< std::string >& tps(void) const; - const atf::tests::vars_map& props(void) const; -}; - -} // namespace atf - -#endif // !defined(_ATF_CXX_ATFFILE_HPP_) diff --git a/dist/atf/atf-c++/config.cpp b/dist/atf/atf-c++/config.cpp deleted file mode 100644 index f9722bfd7e1e..000000000000 --- a/dist/atf/atf-c++/config.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -extern "C" { -#include "atf-c/config.h" -} - -#include "atf-c++/config.hpp" -#include "atf-c++/env.hpp" -#include "atf-c++/sanity.hpp" - -static std::map< std::string, std::string > m_variables; - -// -// Adds all predefined standard build-time variables to the m_variables -// map, considering the values a user may have provided in the environment. -// -// Can only be called once during the program's lifetime. -// -static -void -init_variables(void) -{ - PRE(m_variables.empty()); - - m_variables["atf_arch"] = atf_config_get("atf_arch"); - m_variables["atf_confdir"] = atf_config_get("atf_confdir"); - 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"); - - POST(!m_variables.empty()); -} - -const std::string& -atf::config::get(const std::string& varname) -{ - if (m_variables.empty()) - init_variables(); - - PRE(has(varname)); - return m_variables[varname]; -} - -const std::map< std::string, std::string >& -atf::config::get_all(void) -{ - if (m_variables.empty()) - init_variables(); - - return m_variables; -} - -bool -atf::config::has(const std::string& varname) -{ - if (m_variables.empty()) - init_variables(); - - return m_variables.find(varname) != m_variables.end(); -} - -extern "C" { -void __atf_config_reinit(void); -} - -namespace atf { -namespace config { -// -// Auxiliary function for the t_config test program so that it can -// revert the configuration's global status to an empty state and -// do new tests from there on. -// -// Ideally this shouldn't be part of the production library... but -// this is so small that it does not matter. -// -void -__reinit(void) -{ - __atf_config_reinit(); - m_variables.clear(); -} -} // namespace config -} // namespace atf diff --git a/dist/atf/atf-c++/config.hpp b/dist/atf/atf-c++/config.hpp deleted file mode 100644 index 1d25fe324984..000000000000 --- a/dist/atf/atf-c++/config.hpp +++ /dev/null @@ -1,75 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_CONFIG_HPP_) -#define _ATF_CXX_CONFIG_HPP_ - -#include -#include - -namespace atf { - -namespace config { - -//! -//! \brief Gets a build-time configuration variable's value. -//! -//! Given the name of a build-time configuration variable, returns its -//! textual value. The user is free to override these by setting their -//! corresponding environment variables. Therefore always use this -//! interface to get the value of these variables. -//! -//! \pre The variable must exist. -//! -const std::string& get(const std::string&); - -//! -//! \brief Returns all the build-time configuration variables. -//! -//! Returns a name to value map containing all build-time configuration -//! variables. -//! -const std::map< std::string, std::string >& get_all(void); - -//! -//! \brief Checks whether a build-time configuration variable exists. -//! -//! Given the name of a build-time configuration variable, checks -//! whether it is defined and returns a boolean indicating this -//! condition. The program only has to use this function to sanity-check -//! a variable name provided by the user. Otherwise it can assume that -//! the variables are defined. -//! -bool has(const std::string&); - -} // namespace config - -} // namespace atf - -#endif // !defined(_ATF_CXX_CONFIG_HPP_) diff --git a/dist/atf/atf-c++/env.cpp b/dist/atf/atf-c++/env.cpp deleted file mode 100644 index 127df9be3253..000000000000 --- a/dist/atf/atf-c++/env.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c/env.h" -} - -#include "atf-c++/env.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/sanity.hpp" - -namespace impl = atf::env; -#define IMPL_NAME "atf::env" - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -std::string -impl::get(const std::string& name) -{ - return atf_env_get(name.c_str()); -} - -bool -impl::has(const std::string& name) -{ - return atf_env_has(name.c_str()); -} - -void -impl::set(const std::string& name, const std::string& val) -{ - atf_error_t err = atf_env_set(name.c_str(), val.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); -} - -void -impl::unset(const std::string& name) -{ - atf_error_t err = atf_env_unset(name.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); -} diff --git a/dist/atf/atf-c++/env.hpp b/dist/atf/atf-c++/env.hpp deleted file mode 100644 index 97ce87bcc2ea..000000000000 --- a/dist/atf/atf-c++/env.hpp +++ /dev/null @@ -1,84 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_ENV_HPP_) -#define _ATF_CXX_ENV_HPP_ - -#include - -namespace atf { -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 atf - -#endif // !defined(_ATF_CXX_ENV_HPP_) diff --git a/dist/atf/atf-c++/exceptions.cpp b/dist/atf/atf-c++/exceptions.cpp deleted file mode 100644 index 2e383ceb25dd..000000000000 --- a/dist/atf/atf-c++/exceptions.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include -#include -#include - -extern "C" { -#include "atf-c/error.h" -}; - -#include "atf-c++/exceptions.hpp" -#include "atf-c++/sanity.hpp" - -atf::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) -{ -} - -atf::system_error::~system_error(void) - throw() -{ -} - -int -atf::system_error::code(void) - const - throw() -{ - return m_sys_err; -} - -const char* -atf::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); - } - - return m_message.c_str(); - } catch (...) { - return "Unable to format system_error message"; - } -} - -void -atf::throw_atf_error(atf_error_t err) -{ - static char buf[4096]; - - PRE(atf_is_error(err)); - - atf_error_format(err, buf, sizeof(buf)); - atf_error_free(err); - - throw std::runtime_error(buf); -} diff --git a/dist/atf/atf-c++/exceptions.hpp b/dist/atf/atf-c++/exceptions.hpp deleted file mode 100644 index f10dfd5de32d..000000000000 --- a/dist/atf/atf-c++/exceptions.hpp +++ /dev/null @@ -1,98 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_EXCEPTIONS_HPP_) -#define _ATF_CXX_EXCEPTIONS_HPP_ - -#include - -extern "C" { -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; - -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(); -}; - -void throw_atf_error(struct atf_error *); - -} // namespace atf - -#endif // !defined(_ATF_CXX_EXCEPTIONS_HPP_) diff --git a/dist/atf/atf-c++/expand.cpp b/dist/atf/atf-c++/expand.cpp deleted file mode 100644 index e8f8562de125..000000000000 --- a/dist/atf/atf-c++/expand.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c/expand.h" -} - -#include "atf-c++/exceptions.hpp" -#include "atf-c++/expand.hpp" -#include "atf-c++/sanity.hpp" - -namespace impl = atf::expand; -#define IMPL_NAME "atf::expand" - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -bool -impl::is_glob(const std::string& glob) -{ - return atf_expand_is_glob(glob.c_str()); -} - -bool -impl::matches_glob(const std::string& glob, const std::string& candidate) -{ - bool result; - atf_error_t err; - - err = atf_expand_matches_glob(glob.c_str(), candidate.c_str(), &result); - if (atf_is_error(err)) - throw_atf_error(err); - - return result; -} diff --git a/dist/atf/atf-c++/expand.hpp b/dist/atf/atf-c++/expand.hpp deleted file mode 100644 index 7e043a1dc5fa..000000000000 --- a/dist/atf/atf-c++/expand.hpp +++ /dev/null @@ -1,147 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_EXPAND_HPP_) -#define _ATF_CXX_EXPAND_HPP_ - -#include -#include -#include - -#include - -namespace atf { -namespace expand { - -// ------------------------------------------------------------------------ -// The "pattern_error" class. -// ------------------------------------------------------------------------ - -//! -//! \brief An error class to hold information about bad patterns. -//! -//! The pattern_error class is used to represent an error when parsing -//! or comparing a pattern against a string. -//! -class pattern_error : public std::runtime_error { - struct shared_data { - //! - //! \brief Number of live references to this shared_data. - //! - size_t m_refs; - - //! - //! \brief A pointer to the error message. - //! - //! This variable holds a pointer to the error message describing - //! why the pattern failed. This is a pointer to dynamic memory - //! allocated by the code that constructed this class. - //! - char *m_what; - }; - mutable shared_data* m_sd; - - //! - //! \brief Assignment operator for pattern_error. - //! - //! This assignment operator is made private to prevent its usage. - //! We cannot modify the parent's message once constructed, so we - //! cannot safely implement this method. - //! - pattern_error& operator=(const pattern_error&); - -public: - //! - //! \brief Constructs a new pattern_error. - //! - //! Constructs a new pattern error, to be thrown as an exception, - //! with the given error message. The error message must be a - //! pointer to dynamically allocated memory, obtained by using the - //! 'new char[...]' construction. - //! - pattern_error(atf::utils::auto_array< char >&); - - //! - //! \brief Copy-constructor for pattern_error. - //! - pattern_error(const pattern_error&); - - //! - //! \brief Destroys the pattern_error. - //! - //! Destroys the object and releases the memory that was held by the - //! error message given during construction. - //! - ~pattern_error(void) throw(); -}; - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -//! -//! \brief Expands a glob pattern among multiple candidates. -//! -//! Given a glob pattern and a set of candidate strings, checks which of -//! those strings match the glob pattern and returns them. -//! -template< class T > -std::vector< std::string > expand_glob(const std::string& glob, - const T& candidates) -{ - std::vector< std::string > exps; - - for (typename T::const_iterator iter = candidates.begin(); - iter != candidates.end(); iter++) - if (matches_glob(glob, *iter)) - exps.push_back(*iter); - - return exps; -} - -//! -//! \brief Checks if the given string is a glob pattern. -//! -//! Returns true if the given string is a glob pattern; i.e. if it contains -//! any character that will be expanded by expand_glob. -//! -bool is_glob(const std::string&); - -//! -//! \brief Checks if a given string matches a glob pattern. -//! -//! Given a glob pattern and a string, checks whether the former matches -//! the latter. Returns a boolean indicating this condition. -//! -bool matches_glob(const std::string&, const std::string&); - -} // namespace expand -} // namespace atf - -#endif // !defined(_ATF_CXX_EXPAND_HPP_) diff --git a/dist/atf/atf-c++/formats.cpp b/dist/atf/atf-c++/formats.cpp deleted file mode 100644 index b4035675df1f..000000000000 --- a/dist/atf/atf-c++/formats.cpp +++ /dev/null @@ -1,1248 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/formats.hpp" -#include "atf-c++/parser.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/text.hpp" - -namespace impl = atf::formats; -#define IMPL_NAME "atf::formats" - -#define CALLBACK(parser, func) \ - do { \ - if (!(parser).has_errors()) \ - func; \ - } while (false); - -// ------------------------------------------------------------------------ -// The "format_error" class. -// ------------------------------------------------------------------------ - -impl::format_error::format_error(const std::string& w) : - std::runtime_error(w.c_str()) -{ -} - -// ------------------------------------------------------------------------ -// The "header_entry" class. -// ------------------------------------------------------------------------ - -typedef std::map< std::string, std::string > attrs_map; - -class header_entry { - std::string m_name; - std::string m_value; - attrs_map m_attrs; - -public: - header_entry(void); - header_entry(const std::string&, const std::string&, - attrs_map = attrs_map()); - - const std::string& name(void) const; - const std::string& value(void) const; - const attrs_map& attrs(void) const; - bool has_attr(const std::string&) const; - const std::string& get_attr(const std::string&) const; -}; - -typedef std::map< std::string, header_entry > headers_map; - -header_entry::header_entry(void) -{ -} - -header_entry::header_entry(const std::string& n, - const std::string& v, - attrs_map as) : - m_name(n), - m_value(v), - m_attrs(as) -{ -} - -const std::string& -header_entry::name(void) - const -{ - return m_name; -} - -const std::string& -header_entry::value(void) - const -{ - return m_value; -} - -const attrs_map& -header_entry::attrs(void) - const -{ - return m_attrs; -} - -bool -header_entry::has_attr(const std::string& n) - const -{ - return m_attrs.find(n) != m_attrs.end(); -} - -const std::string& -header_entry::get_attr(const std::string& n) - const -{ - attrs_map::const_iterator iter = m_attrs.find(n); - PRE(iter != m_attrs.end()); - return (*iter).second; -} - -// ------------------------------------------------------------------------ -// The header tokenizer. -// ------------------------------------------------------------------------ - -namespace header { - -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& semicolon_type = 4; -static const atf::parser::token_type& dblquote_type = 5; -static const atf::parser::token_type& equal_type = 6; - -class tokenizer : public atf::parser::tokenizer< std::istream > { -public: - tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > - (is, true, eof_type, nl_type, text_type, curline) - { - add_delim(';', semicolon_type); - add_delim(':', colon_type); - add_delim('=', equal_type); - add_quote('"', dblquote_type); - } -}; - -static -atf::parser::parser< header::tokenizer >& -read(atf::parser::parser< header::tokenizer >& p, header_entry& he) -{ - using namespace header; - - atf::parser::token t = p.expect(text_type, nl_type, "a header name"); - if (t.type() == nl_type) { - he = header_entry(); - return p; - } - std::string hdr_name = t.text(); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "a textual value"); - std::string hdr_value = t.text(); - - attrs_map attrs; - - for (;;) { - t = p.expect(eof_type, semicolon_type, nl_type, - "eof, `;' or new line"); - if (t.type() == eof_type || t.type() == nl_type) - break; - - t = p.expect(text_type, "an attribute name"); - std::string attr_name = t.text(); - - t = p.expect(equal_type, "`='"); - - t = p.expect(text_type, "word or quoted string"); - std::string attr_value = t.text(); - attrs[attr_name] = attr_value; - } - - he = header_entry(hdr_name, hdr_value, attrs); - - return p; -} - -static -std::ostream& -write(std::ostream& os, const header_entry& he) -{ - std::string line = he.name() + ": " + he.value(); - attrs_map as = he.attrs(); - for (attrs_map::const_iterator iter = as.begin(); - iter != as.end(); iter++) { - PRE((*iter).second.find('\"') == std::string::npos); - line += "; " + (*iter).first + "=\"" + (*iter).second + "\""; - } - - os << line << std::endl; - - return os; -} - -} // namespace header - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -static -size_t -string_to_size_t(const std::string& str) -{ - std::istringstream ss(str); - size_t s; - ss >> s; - - return s; -} - -static -std::pair< size_t, headers_map > -read_headers(std::istream& is, size_t curline) -{ - using impl::format_error; - - headers_map hm; - - // - // Grammar - // - // header = entry+ nl - // entry = line nl - // line = text colon text - // (semicolon (text equal (text | dblquote string dblquote)))* - // string = quoted_string - // - - header::tokenizer tkz(is, curline); - atf::parser::parser< header::tokenizer > p(tkz); - - bool first = true; - for (;;) { - try { - header_entry he; - if (!header::read(p, he).good() || he.name().empty()) - break; - - if (first && he.name() != "Content-Type") - throw format_error("Could not determine content type"); - else - first = false; - - hm[he.name()] = he; - } catch (const atf::parser::parse_error& pe) { - p.add_error(pe); - p.reset(header::nl_type); - } - } - - if (!is.good()) - throw format_error("Unexpected end of stream"); - - return std::pair< size_t, headers_map >(tkz.lineno(), hm); -} - -static -void -write_headers(const headers_map& hm, - std::ostream& os) -{ - PRE(!hm.empty()); - headers_map::const_iterator ct = hm.find("Content-Type"); - PRE(ct != hm.end()); - header::write(os, (*ct).second); - for (headers_map::const_iterator iter = hm.begin(); iter != hm.end(); - iter++) { - if ((*iter).first != "Content-Type") - header::write(os, (*iter).second); - } - os << std::endl; -} - -static -void -validate_content_type(const headers_map& hm, - const std::string& fmt, - int version) -{ - using impl::format_error; - - headers_map::const_iterator iter = hm.find("Content-Type"); - if (iter == hm.end()) - throw format_error("Could not determine content type"); - - const header_entry& he = (*iter).second; - if (he.value() != fmt) - throw format_error("Mismatched content type: expected `" + fmt + - "' but got `" + he.value() + "'"); - - if (!he.has_attr("version")) - throw format_error("Could not determine version"); - const std::string& vstr = atf::text::to_string(version); - if (he.get_attr("version") != vstr) - throw format_error("Mismatched version: expected `" + - vstr + "' but got `" + - he.get_attr("version") + "'"); -} - -// ------------------------------------------------------------------------ -// The "atf_atffile" auxiliary parser. -// ------------------------------------------------------------------------ - -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; - -class tokenizer : public atf::parser::tokenizer< std::istream > { -public: - tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > - (is, true, eof_type, nl_type, text_type, curline) - { - add_delim(':', colon_type); - add_delim('=', equal_type); - add_delim('#', hash_type); - add_quote('"', dblquote_type); - add_keyword("conf", conf_type); - add_keyword("prop", prop_type); - add_keyword("tp", tp_type); - add_keyword("tp-glob", tp_glob_type); - } -}; - -} // namespace atf_atffile - -// ------------------------------------------------------------------------ -// The "atf_config" auxiliary parser. -// ------------------------------------------------------------------------ - -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; - -class tokenizer : public atf::parser::tokenizer< std::istream > { -public: - tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > - (is, true, eof_type, nl_type, text_type, curline) - { - add_delim('=', equal_type); - add_delim('#', hash_type); - add_quote('"', dblquote_type); - } -}; - -} // namespace atf_config - -// ------------------------------------------------------------------------ -// The "atf_tcs" auxiliary parser. -// ------------------------------------------------------------------------ - -namespace atf_tcs { - -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& tcs_count_type = 5; -static const atf::parser::token_type& tc_start_type = 6; -static const atf::parser::token_type& tc_end_type = 7; -static const atf::parser::token_type& passed_type = 8; -static const atf::parser::token_type& failed_type = 9; -static const atf::parser::token_type& skipped_type = 10; - -class tokenizer : public atf::parser::tokenizer< std::istream > { -public: - tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > - (is, true, eof_type, nl_type, text_type, curline) - { - add_delim(':', colon_type); - add_delim(',', comma_type); - add_keyword("tcs-count", tcs_count_type); - add_keyword("tc-start", tc_start_type); - add_keyword("tc-end", tc_end_type); - add_keyword("passed", passed_type); - add_keyword("failed", failed_type); - add_keyword("skipped", skipped_type); - } -}; - -} // namespace atf_tcs - -// ------------------------------------------------------------------------ -// The "atf_tps" auxiliary parser. -// ------------------------------------------------------------------------ - -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; - -class tokenizer : public atf::parser::tokenizer< std::istream > { -public: - tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > - (is, true, eof_type, nl_type, text_type, curline) - { - add_delim(':', colon_type); - add_delim(',', comma_type); - add_keyword("tps-count", tps_count_type); - add_keyword("tp-start", tp_start_type); - add_keyword("tp-end", tp_end_type); - add_keyword("tc-start", tc_start_type); - add_keyword("tc-so", tc_so_type); - add_keyword("tc-se", tc_se_type); - add_keyword("tc-end", tc_end_type); - add_keyword("passed", passed_type); - add_keyword("failed", failed_type); - add_keyword("skipped", skipped_type); - add_keyword("info", info_type); - } -}; - -} // namespace atf_tps - -// ------------------------------------------------------------------------ -// The "atf_atffile_reader" class. -// ------------------------------------------------------------------------ - -impl::atf_atffile_reader::atf_atffile_reader(std::istream& is) : - m_is(is) -{ -} - -impl::atf_atffile_reader::~atf_atffile_reader(void) -{ -} - -void -impl::atf_atffile_reader::got_conf(const std::string& name, - const std::string& val) -{ -} - -void -impl::atf_atffile_reader::got_prop(const std::string& name, - const std::string& val) -{ -} - -void -impl::atf_atffile_reader::got_tp(const std::string& name, bool isglob) -{ -} - -void -impl::atf_atffile_reader::got_eof(void) -{ -} - -void -impl::atf_atffile_reader::read(void) -{ - using atf::parser::parse_error; - using namespace atf_atffile; - - std::pair< size_t, headers_map > hml = read_headers(m_is, 1); - validate_content_type(hml.second, "application/X-atf-atffile", 1); - - tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); - - for (;;) { - try { - atf::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"); - if (t.type() == eof_type) - break; - - if (t.type() == conf_type) { - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "variable name"); - std::string var = t.text(); - - t = p.expect(equal_type, "equal sign"); - - t = p.expect(text_type, "word or quoted string"); - CALLBACK(p, got_conf(var, t.text())); - } else if (t.type() == hash_type) { - (void)p.rest_of_line(); - } else if (t.type() == prop_type) { - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "property name"); - std::string name = t.text(); - - t = p.expect(equal_type, "equale sign"); - - t = p.expect(text_type, "word or quoted string"); - CALLBACK(p, got_prop(name, t.text())); - } else if (t.type() == tp_type) { - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "word or quoted string"); - CALLBACK(p, got_tp(t.text(), false)); - } else if (t.type() == tp_glob_type) { - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "word or quoted string"); - CALLBACK(p, got_tp(t.text(), true)); - } else if (t.type() == nl_type) { - continue; - } else - UNREACHABLE; - - t = p.expect(nl_type, hash_type, eof_type, - "new line or comment"); - if (t.type() == hash_type) { - (void)p.rest_of_line(); - t = p.next(); - } else if (t.type() == eof_type) - break; - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } - } - - CALLBACK(p, got_eof()); -} - -// ------------------------------------------------------------------------ -// The "atf_config_reader" class. -// ------------------------------------------------------------------------ - -impl::atf_config_reader::atf_config_reader(std::istream& is) : - m_is(is) -{ -} - -impl::atf_config_reader::~atf_config_reader(void) -{ -} - -void -impl::atf_config_reader::got_var(const std::string& var, - const std::string& val) -{ -} - -void -impl::atf_config_reader::got_eof(void) -{ -} - -void -impl::atf_config_reader::read(void) -{ - using atf::parser::parse_error; - using namespace atf_config; - - std::pair< size_t, headers_map > hml = read_headers(m_is, 1); - validate_content_type(hml.second, "application/X-atf-config", 1); - - tokenizer tkz(m_is, hml.first); - atf::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"); - if (t.type() == eof_type) - break; - - if (t.type() == hash_type) { - (void)p.rest_of_line(); - t = p.expect(nl_type, "new line"); - } else if (t.type() == text_type) { - std::string name = t.text(); - - t = p.expect(equal_type, "equal sign"); - - t = p.expect(text_type, "word or quoted string"); - CALLBACK(p, got_var(name, t.text())); - - t = p.expect(nl_type, hash_type, "new line or comment"); - if (t.type() == hash_type) { - (void)p.rest_of_line(); - t = p.expect(nl_type, "new line"); - } - } else if (t.type() == nl_type) { - } else - UNREACHABLE; - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } - } - - CALLBACK(p, got_eof()); -} - -// ------------------------------------------------------------------------ -// The "atf_tcs_reader" class. -// ------------------------------------------------------------------------ - -impl::atf_tcs_reader::atf_tcs_reader(std::istream& is) : - m_is(is) -{ -} - -impl::atf_tcs_reader::~atf_tcs_reader(void) -{ -} - -void -impl::atf_tcs_reader::got_ntcs(size_t ntcs) -{ -} - -void -impl::atf_tcs_reader::got_tc_start(const std::string& tcname) -{ -} - -void -impl::atf_tcs_reader::got_tc_end(const atf::tests::tcr& tcr) -{ -} - -void -impl::atf_tcs_reader::got_stdout_line(const std::string& line) -{ -} - -void -impl::atf_tcs_reader::got_stderr_line(const std::string& line) -{ -} - -void -impl::atf_tcs_reader::got_eof(void) -{ -} - -void -impl::atf_tcs_reader::read_out_err(void* pptr, - atf::io::unbuffered_istream& out, - atf::io::unbuffered_istream& err) -{ - using namespace atf_tps; - - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > - (pptr); - - struct pollfd fds[2]; - fds[0].fd = out.get_fh().get(); - fds[0].events = POLLIN; - fds[1].fd = err.get_fh().get(); - fds[1].events = POLLIN; - - do { - fds[0].revents = 0; - fds[1].revents = 0; - if (::poll(fds, 2, -1) == -1) - break; - - if (fds[0].revents & POLLIN) { - std::string line; - if (atf::io::getline(out, line).good()) { - if (line == "__atf_tc_separator__") - fds[0].events &= ~POLLIN; - else - CALLBACK(p, got_stdout_line(line)); - } else - fds[0].events &= ~POLLIN; - } else if (fds[0].revents & POLLHUP) - fds[0].events &= ~POLLIN; - - if (fds[1].revents & POLLIN) { - std::string line; - if (atf::io::getline(err, line).good()) { - if (line == "__atf_tc_separator__") - fds[1].events &= ~POLLIN; - else - CALLBACK(p, got_stderr_line(line)); - } else - fds[1].events &= ~POLLIN; - } else if (fds[1].revents & POLLHUP) - fds[1].events &= ~POLLIN; - } while (fds[0].events & POLLIN || fds[1].events & POLLIN); -} - -void -impl::atf_tcs_reader::read(atf::io::unbuffered_istream& out, - atf::io::unbuffered_istream& err) -{ - using atf::parser::parse_error; - using namespace atf_tcs; - using atf::tests::tcr; - - std::pair< size_t, headers_map > hml = read_headers(m_is, 1); - validate_content_type(hml.second, "application/X-atf-tcs", 1); - - tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); - - try { - atf::parser::token t = p.expect(tcs_count_type, "tcs-count field"); - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "number of test cases"); - size_t ntcs = string_to_size_t(t.text()); - CALLBACK(p, got_ntcs(ntcs)); - - t = p.expect(nl_type, "new line"); - - size_t i = 0; - while (m_is.good() && i < ntcs) { - try { - t = p.expect(tc_start_type, "start of test case"); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "test case name"); - std::string tcname = t.text(); - CALLBACK(p, got_tc_start(tcname)); - - t = p.expect(nl_type, "new line"); - - read_out_err(&p, out, err); - if (i < ntcs - 1 && (!out.good() || !err.good())) - p.add_error(parse_error(0, "Missing terminators in " - "stdout or stderr")); - - t = p.expect(tc_end_type, "end of test case"); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "test case name"); - if (t.text() != tcname) - throw parse_error(t.lineno(), "Test case name used in " - "terminator does not match " - "opening"); - - t = p.expect(comma_type, "`,'"); - - t = p.expect(passed_type, skipped_type, failed_type, - "passed, failed or skipped"); - if (t.type() == passed_type) { - CALLBACK(p, got_tc_end(tcr(tcr::passed_state))); - } else if (t.type() == failed_type) { - t = p.expect(comma_type, "`,'"); - std::string reason = text::trim(p.rest_of_line()); - if (reason.empty()) - throw parse_error(t.lineno(), - "Empty reason for failed " - "test case result"); - CALLBACK(p, got_tc_end(tcr(tcr::failed_state, reason))); - } else if (t.type() == skipped_type) { - t = p.expect(comma_type, "`,'"); - std::string reason = text::trim(p.rest_of_line()); - if (reason.empty()) - throw parse_error(t.lineno(), - "Empty reason for skipped " - "test case result"); - CALLBACK(p, got_tc_end(tcr(tcr::skipped_state, reason))); - } else - UNREACHABLE; - - t = p.expect(nl_type, "new line"); - i++; - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } - } - - t = p.expect(eof_type, "end of stream"); - CALLBACK(p, got_eof()); - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } -} - -// ------------------------------------------------------------------------ -// The "atf_tcs_writer" class. -// ------------------------------------------------------------------------ - -impl::atf_tcs_writer::atf_tcs_writer(std::ostream& os, - std::ostream& p_cout, - std::ostream& p_cerr, - size_t ntcs) : - m_os(os), - m_cout(p_cout), - m_cerr(p_cerr), - m_ntcs(ntcs), - m_curtc(0) -{ - headers_map hm; - attrs_map ct_attrs; - ct_attrs["version"] = "1"; - hm["Content-Type"] = - header_entry("Content-Type", "application/X-atf-tcs", ct_attrs); - write_headers(hm, m_os); - - m_os << "tcs-count: " << ntcs << std::endl; - m_os.flush(); -} - -void -impl::atf_tcs_writer::start_tc(const std::string& tcname) -{ - m_tcname = tcname; - m_os << "tc-start: " << tcname << std::endl; - m_os.flush(); -} - -void -impl::atf_tcs_writer::end_tc(const atf::tests::tcr& tcr) -{ - PRE(m_curtc < m_ntcs); - m_curtc++; - if (m_curtc < m_ntcs) { - m_cout << "__atf_tc_separator__\n"; - m_cerr << "__atf_tc_separator__\n"; - } - m_cout.flush(); - m_cerr.flush(); - - std::string end = "tc-end: " + m_tcname + ", "; - if (tcr.get_state() == tests::tcr::passed_state) - end += "passed"; - else if (tcr.get_state() == tests::tcr::failed_state) - end += "failed, " + tcr.get_reason(); - else if (tcr.get_state() == tests::tcr::skipped_state) - end += "skipped, " + tcr.get_reason(); - else - UNREACHABLE; - m_os << end << std::endl; - m_os.flush(); -} - -// ------------------------------------------------------------------------ -// The "atf_tps_reader" class. -// ------------------------------------------------------------------------ - -impl::atf_tps_reader::atf_tps_reader(std::istream& is) : - m_is(is) -{ -} - -impl::atf_tps_reader::~atf_tps_reader(void) -{ -} - -void -impl::atf_tps_reader::got_info(const std::string& what, - const std::string& val) -{ -} - -void -impl::atf_tps_reader::got_ntps(size_t ntps) -{ -} - -void -impl::atf_tps_reader::got_tp_start(const std::string& tp, size_t ntcs) -{ -} - -void -impl::atf_tps_reader::got_tp_end(const std::string& reason) -{ -} - -void -impl::atf_tps_reader::got_tc_start(const std::string& tcname) -{ -} - -void -impl::atf_tps_reader::got_tc_stdout_line(const std::string& line) -{ -} - -void -impl::atf_tps_reader::got_tc_stderr_line(const std::string& line) -{ -} - -void -impl::atf_tps_reader::got_tc_end(const atf::tests::tcr& tcr) -{ -} - -void -impl::atf_tps_reader::got_eof(void) -{ -} - -void -impl::atf_tps_reader::read_info(void* pptr) -{ - using atf::parser::parse_error; - using namespace atf_tps; - - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > - (pptr); - - (void)p.expect(colon_type, "`:'"); - - atf::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())); - - (void)p.expect(nl_type, "new line"); -} - -void -impl::atf_tps_reader::read_tp(void* pptr) -{ - using atf::parser::parse_error; - using namespace atf_tps; - - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > - (pptr); - - atf::parser::token t = p.expect(tp_start_type, - "start of test program"); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "test program name"); - std::string tpname = t.text(); - - t = p.expect(comma_type, "`,'"); - - t = p.expect(text_type, "number of test programs"); - size_t ntcs = string_to_size_t(t.text()); - - t = p.expect(nl_type, "new line"); - - CALLBACK(p, got_tp_start(tpname, ntcs)); - - size_t i = 0; - while (p.good() && i < ntcs) { - try { - read_tc(&p); - i++; - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } - } - t = p.expect(tp_end_type, "end of test program"); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "test program name"); - if (t.text() != tpname) - throw parse_error(t.lineno(), "Test program name used in " - "terminator does not match " - "opening"); - - t = p.expect(nl_type, comma_type, - "new line or comma_type"); - std::string reason; - if (t.type() == comma_type) { - reason = text::trim(p.rest_of_line()); - if (reason.empty()) - throw parse_error(t.lineno(), - "Empty reason for failed test program"); - t = p.next(); - } - - CALLBACK(p, got_tp_end(reason)); -} - -void -impl::atf_tps_reader::read_tc(void* pptr) -{ - using atf::parser::parse_error; - using namespace atf_tps; - using atf::tests::tcr; - - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > - (pptr); - - atf::parser::token t = p.expect(tc_start_type, "start of test case"); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "test case name"); - std::string tcname = t.text(); - CALLBACK(p, got_tc_start(tcname)); - - t = p.expect(nl_type, "new line"); - - t = p.expect(tc_end_type, tc_so_type, tc_se_type, - "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; - - t = p.expect(colon_type, "`:'"); - - std::string line = p.rest_of_line(); - - if (t2.type() == tc_so_type) { - CALLBACK(p, got_tc_stdout_line(line)); - } else { - INV(t2.type() == tc_se_type); - CALLBACK(p, got_tc_stderr_line(line)); - } - - t = p.expect(nl_type, "new line"); - - t = p.expect(tc_end_type, tc_so_type, tc_se_type, - "end of test case or test case's stdout/stderr line"); - } - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "test case name"); - if (t.text() != tcname) - throw parse_error(t.lineno(), - "Test case name used in terminator does not " - "match opening"); - - t = p.expect(comma_type, "`,'"); - - t = p.expect(passed_type, failed_type, skipped_type, - "passed, failed or skipped"); - if (t.type() == passed_type) { - CALLBACK(p, got_tc_end(tcr(tcr::passed_state))); - } else if (t.type() == failed_type) { - t = p.expect(comma_type, "`,'"); - std::string reason = text::trim(p.rest_of_line()); - if (reason.empty()) - throw parse_error(t.lineno(), - "Empty reason for failed test case result"); - CALLBACK(p, got_tc_end(tcr(tcr::failed_state, reason))); - } else if (t.type() == skipped_type) { - t = p.expect(comma_type, "`,'"); - std::string reason = text::trim(p.rest_of_line()); - if (reason.empty()) - throw parse_error(t.lineno(), - "Empty reason for skipped test case result"); - CALLBACK(p, got_tc_end(tcr(tcr::skipped_state, reason))); - } else - UNREACHABLE; - - t = p.expect(nl_type, "new line"); -} - -void -impl::atf_tps_reader::read(void) -{ - using atf::parser::parse_error; - using namespace atf_tps; - - std::pair< size_t, headers_map > hml = read_headers(m_is, 1); - validate_content_type(hml.second, "application/X-atf-tps", 2); - - tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); - - try { - atf::parser::token t; - - while ((t = p.expect(tps_count_type, info_type, "tps-count or info " - "field")).type() == info_type) - read_info(&p); - - t = p.expect(colon_type, "`:'"); - - t = p.expect(text_type, "number of test programs"); - size_t ntps = string_to_size_t(t.text()); - CALLBACK(p, got_ntps(ntps)); - - t = p.expect(nl_type, "new line"); - - size_t i = 0; - while (p.good() && i < ntps) { - try { - read_tp(&p); - i++; - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } - } - - while ((t = p.expect(eof_type, info_type, "end of stream or info " - "field")).type() == info_type) - read_info(&p); - CALLBACK(p, got_eof()); - } catch (const parse_error& pe) { - p.add_error(pe); - p.reset(nl_type); - } -} - -// ------------------------------------------------------------------------ -// The "atf_tps_writer" class. -// ------------------------------------------------------------------------ - -impl::atf_tps_writer::atf_tps_writer(std::ostream& os) : - m_os(os) -{ - headers_map hm; - attrs_map ct_attrs; - ct_attrs["version"] = "2"; - hm["Content-Type"] = - header_entry("Content-Type", "application/X-atf-tps", ct_attrs); - write_headers(hm, m_os); -} - -void -impl::atf_tps_writer::info(const std::string& what, const std::string& val) -{ - m_os << "info: " << what << ", " << val << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::ntps(size_t p_ntps) -{ - m_os << "tps-count: " << p_ntps << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::start_tp(const std::string& tp, size_t ntcs) -{ - m_tpname = tp; - m_os << "tp-start: " << tp << ", " << ntcs << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::end_tp(const std::string& reason) -{ - PRE(reason.find('\n') == std::string::npos); - if (reason.empty()) - m_os << "tp-end: " << m_tpname << std::endl; - else - m_os << "tp-end: " << m_tpname << ", " << reason << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::start_tc(const std::string& tcname) -{ - m_tcname = tcname; - m_os << "tc-start: " << tcname << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::stdout_tc(const std::string& line) -{ - m_os << "tc-so:" << line << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::stderr_tc(const std::string& line) -{ - m_os << "tc-se:" << line << std::endl; - m_os.flush(); -} - -void -impl::atf_tps_writer::end_tc(const atf::tests::tcr& tcr) -{ - std::string str = "tc-end: " + m_tcname + ", "; - if (tcr.get_state() == atf::tests::tcr::passed_state) - str += "passed"; - else if (tcr.get_state() == atf::tests::tcr::skipped_state) - str += "skipped, " + tcr.get_reason(); - else if (tcr.get_state() == atf::tests::tcr::failed_state) - str += "failed, " + tcr.get_reason(); - else - UNREACHABLE; - m_os << str << std::endl; - m_os.flush(); -} diff --git a/dist/atf/atf-c++/formats.hpp b/dist/atf/atf-c++/formats.hpp deleted file mode 100644 index a4d6c4e59080..000000000000 --- a/dist/atf/atf-c++/formats.hpp +++ /dev/null @@ -1,199 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_FORMATS_HPP_) -#define _ATF_CXX_FORMATS_HPP_ - -#include -#include -#include -#include - -#include -#include - -namespace atf { -namespace formats { - -// ------------------------------------------------------------------------ -// The "format_error" class. -// ------------------------------------------------------------------------ - -//! -//! \brief A class to signal format errors in external data formats. -//! -//! This error class is used to signal format errors while parsing some -//! externalized representation of a data structure. -//! -class format_error : public std::runtime_error { -public: - format_error(const std::string&); -}; - -// ------------------------------------------------------------------------ -// The "atf_atffile_reader" class. -// ------------------------------------------------------------------------ - -class atf_atffile_reader { - std::istream& m_is; - -protected: - virtual void got_conf(const std::string&, const std::string &); - virtual void got_prop(const std::string&, const std::string &); - virtual void got_tp(const std::string&, bool); - virtual void got_eof(void); - -public: - atf_atffile_reader(std::istream&); - virtual ~atf_atffile_reader(void); - - void read(void); -}; - -// ------------------------------------------------------------------------ -// The "atf_config_reader" class. -// ------------------------------------------------------------------------ - -class atf_config_reader { - std::istream& m_is; - -protected: - virtual void got_var(const std::string&, const std::string &); - virtual void got_eof(void); - -public: - atf_config_reader(std::istream&); - virtual ~atf_config_reader(void); - - void read(void); -}; - -// ------------------------------------------------------------------------ -// The "atf_tcs_reader" class. -// ------------------------------------------------------------------------ - -class atf_tcs_reader { - std::istream& m_is; - - void read_out_err(void*, - atf::io::unbuffered_istream&, - atf::io::unbuffered_istream&); - -protected: - virtual void got_ntcs(size_t); - virtual void got_tc_start(const std::string&); - virtual void got_tc_end(const atf::tests::tcr&); - virtual void got_stdout_line(const std::string&); - virtual void got_stderr_line(const std::string&); - virtual void got_eof(void); - -public: - atf_tcs_reader(std::istream&); - virtual ~atf_tcs_reader(void); - - void read(atf::io::unbuffered_istream&, atf::io::unbuffered_istream&); -}; - -// ------------------------------------------------------------------------ -// The "atf_tcs_writer" class. -// ------------------------------------------------------------------------ - -class atf_tcs_writer { - std::ostream& m_os; - std::ostream& m_cout; - std::ostream& m_cerr; - - size_t m_ntcs, m_curtc; - std::string m_tcname; - -public: - atf_tcs_writer(std::ostream&, std::ostream&, std::ostream&, size_t); - - void start_tc(const std::string&); - void end_tc(const atf::tests::tcr&); -}; - -// ------------------------------------------------------------------------ -// The "atf_tps_reader" class. -// ------------------------------------------------------------------------ - -class atf_tps_reader { - std::istream& m_is; - - void read_info(void*); - void read_tp(void*); - void read_tc(void*); - -protected: - virtual void got_info(const std::string&, const std::string&); - virtual void got_ntps(size_t); - virtual void got_tp_start(const std::string&, size_t); - virtual void got_tp_end(const std::string&); - - virtual void got_tc_start(const std::string&); - virtual void got_tc_stdout_line(const std::string&); - virtual void got_tc_stderr_line(const std::string&); - virtual void got_tc_end(const atf::tests::tcr&); - virtual void got_eof(void); - -public: - atf_tps_reader(std::istream&); - virtual ~atf_tps_reader(void); - - void read(void); -}; - -// ------------------------------------------------------------------------ -// The "atf_tps_writer" class. -// ------------------------------------------------------------------------ - -class atf_tps_writer { - std::ostream& m_os; - - std::string m_tpname, m_tcname; - -public: - atf_tps_writer(std::ostream&); - - void info(const std::string&, const std::string&); - void ntps(size_t); - - void start_tp(const std::string&, size_t); - void end_tp(const std::string&); - - void start_tc(const std::string&); - void stdout_tc(const std::string&); - void stderr_tc(const std::string&); - void end_tc(const atf::tests::tcr&); -}; - -} // namespace formats -} // namespace atf - -#endif // !defined(_ATF_CXX_FORMATS_HPP_) diff --git a/dist/atf/atf-c++/fs.cpp b/dist/atf/atf-c++/fs.cpp deleted file mode 100644 index a5f993e6497b..000000000000 --- a/dist/atf/atf-c++/fs.cpp +++ /dev/null @@ -1,546 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -extern "C" { -#include -#include -#include -#include -#include -#include -#include -#include -} - -#include -#include -#include - -#include "atf-c++/exceptions.hpp" -#include "atf-c++/env.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/text.hpp" -#include "atf-c++/user.hpp" -#include "atf-c++/utils.hpp" - -namespace impl = atf::fs; -#define IMPL_NAME "atf::fs" - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -//! -//! \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) -{ - bool ok; - - atf_error_t err = atf_fs_eaccess(p.c_path(), mode); - if (atf_is_error(err)) { - if (atf_error_is(err, "libc")) { - if (atf_libc_error_code(err) == experr) - ok = false; - else { - atf::throw_atf_error(err); - // XXX Silence warning; maybe throw_atf_error should be - // an exception and not a function. - ok = false; - } - } else { - atf::throw_atf_error(err); - // XXX Silence warning; maybe throw_atf_error should be - // an exception and not a function. - ok = false; - } - } else - ok = true; - - return ok; -} - -// ------------------------------------------------------------------------ -// The "path" class. -// ------------------------------------------------------------------------ - -impl::path::path(const std::string& s) -{ - atf_error_t err = atf_fs_path_init_fmt(&m_path, "%s", s.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::path::path(const path& p) -{ - atf_error_t err = atf_fs_path_copy(&m_path, &p.m_path); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::path::~path(void) -{ - atf_fs_path_fini(&m_path); -} - -const char* -impl::path::c_str(void) - const -{ - return atf_fs_path_cstring(&m_path); -} - -const atf_fs_path_t* -impl::path::c_path(void) - const -{ - return &m_path; -} - -std::string -impl::path::str(void) - const -{ - return c_str(); -} - -bool -impl::path::is_absolute(void) - const -{ - return atf_fs_path_is_absolute(&m_path); -} - -bool -impl::path::is_root(void) - const -{ - return atf_fs_path_is_root(&m_path); -} - -impl::path -impl::path::branch_path(void) - const -{ - atf_fs_path_t bp; - atf_error_t err; - - err = atf_fs_path_branch_path(&m_path, &bp); - if (atf_is_error(err)) - throw_atf_error(err); - - path p(atf_fs_path_cstring(&bp)); - atf_fs_path_fini(&bp); - return p; -} - -std::string -impl::path::leaf_name(void) - const -{ - atf_dynstr_t ln; - atf_error_t err; - - err = atf_fs_path_leaf_name(&m_path, &ln); - if (atf_is_error(err)) - throw_atf_error(err); - - std::string s(atf_dynstr_cstring(&ln)); - atf_dynstr_fini(&ln); - return s; -} - -impl::path -impl::path::to_absolute(void) - const -{ - atf_fs_path_t pa; - - atf_error_t err = atf_fs_path_to_absolute(&m_path, &pa); - if (atf_is_error(err)) - throw_atf_error(err); - - path p(atf_fs_path_cstring(&pa)); - atf_fs_path_fini(&pa); - return p; -} - -impl::path& -impl::path::operator=(const path& p) -{ - atf_fs_path_t tmp; - - atf_error_t err = atf_fs_path_init_fmt(&tmp, "%s", p.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); - else { - atf_fs_path_fini(&m_path); - m_path = tmp; - } - - return *this; -} - -bool -impl::path::operator==(const path& p) - const -{ - return atf_equal_fs_path_fs_path(&m_path, &p.m_path); -} - -bool -impl::path::operator!=(const path& p) - const -{ - return !atf_equal_fs_path_fs_path(&m_path, &p.m_path); -} - -impl::path -impl::path::operator/(const std::string& p) - const -{ - path p2 = *this; - - atf_error_t err = atf_fs_path_append_fmt(&p2.m_path, "%s", p.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); - - return p2; -} - -impl::path -impl::path::operator/(const path& p) - const -{ - path p2 = *this; - - atf_error_t err = atf_fs_path_append_fmt(&p2.m_path, "%s", - atf_fs_path_cstring(&p.m_path)); - if (atf_is_error(err)) - throw_atf_error(err); - - return p2; -} - -bool -impl::path::operator<(const path& p) - const -{ - const char *s1 = atf_fs_path_cstring(&m_path); - const char *s2 = atf_fs_path_cstring(&p.m_path); - return std::strcmp(s1, s2) < 0; -} - -// ------------------------------------------------------------------------ -// The "file_info" class. -// ------------------------------------------------------------------------ - -const int impl::file_info::blk_type = atf_fs_stat_blk_type; -const int impl::file_info::chr_type = atf_fs_stat_chr_type; -const int impl::file_info::dir_type = atf_fs_stat_dir_type; -const int impl::file_info::fifo_type = atf_fs_stat_fifo_type; -const int impl::file_info::lnk_type = atf_fs_stat_lnk_type; -const int impl::file_info::reg_type = atf_fs_stat_reg_type; -const int impl::file_info::sock_type = atf_fs_stat_sock_type; -const int impl::file_info::wht_type = atf_fs_stat_wht_type; - -impl::file_info::file_info(const path& p) -{ - atf_error_t err; - - err = atf_fs_stat_init(&m_stat, p.c_path()); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::file_info::file_info(const file_info& fi) -{ - atf_fs_stat_copy(&m_stat, &fi.m_stat); -} - -impl::file_info::~file_info(void) -{ - atf_fs_stat_fini(&m_stat); -} - -dev_t -impl::file_info::get_device(void) - const -{ - return atf_fs_stat_get_device(&m_stat); -} - -ino_t -impl::file_info::get_inode(void) - const -{ - return atf_fs_stat_get_inode(&m_stat); -} - -int -impl::file_info::get_type(void) - const -{ - return atf_fs_stat_get_type(&m_stat); -} - -bool -impl::file_info::is_owner_readable(void) - const -{ - return atf_fs_stat_is_owner_readable(&m_stat); -} - -bool -impl::file_info::is_owner_writable(void) - const -{ - return atf_fs_stat_is_owner_writable(&m_stat); -} - -bool -impl::file_info::is_owner_executable(void) - const -{ - return atf_fs_stat_is_owner_executable(&m_stat); -} - -bool -impl::file_info::is_group_readable(void) - const -{ - return atf_fs_stat_is_group_readable(&m_stat); -} - -bool -impl::file_info::is_group_writable(void) - const -{ - return atf_fs_stat_is_group_writable(&m_stat); -} - -bool -impl::file_info::is_group_executable(void) - const -{ - return atf_fs_stat_is_group_executable(&m_stat); -} - -bool -impl::file_info::is_other_readable(void) - const -{ - return atf_fs_stat_is_other_readable(&m_stat); -} - -bool -impl::file_info::is_other_writable(void) - const -{ - return atf_fs_stat_is_other_writable(&m_stat); -} - -bool -impl::file_info::is_other_executable(void) - const -{ - return atf_fs_stat_is_other_executable(&m_stat); -} - -// ------------------------------------------------------------------------ -// 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) -{ - atf::utils::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 = new path(buf.get()); -} - -impl::temp_dir::~temp_dir(void) -{ - cleanup(*m_path); - delete m_path; -} - -const impl::path& -impl::temp_dir::get_path(void) - const -{ - return *m_path; -} - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -impl::path -impl::change_directory(const path& dir) -{ - 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; -} - -bool -impl::exists(const path& p) -{ - atf_error_t err; - bool b; - - err = atf_fs_exists(p.c_path(), &b); - if (atf_is_error(err)) - throw_atf_error(err); - - return b; -} - -bool -impl::have_prog_in_path(const std::string& prog) -{ - PRE(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 (!atf::env::has("PATH")) - throw std::runtime_error("PATH not defined in the environment"); - std::vector< std::string > dirs = \ - atf::text::split(atf::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; -} - -impl::path -impl::get_current_dir(void) -{ - atf_fs_path_t cwd; - - atf_error_t err = atf_fs_getcwd(&cwd); - if (atf_is_error(err)) - throw_atf_error(err); - - path p(atf_fs_path_cstring(&cwd)); - atf_fs_path_fini(&cwd); - return p; -} - -bool -impl::is_executable(const path& p) -{ - if (!exists(p)) - return false; - return safe_access(p, atf_fs_access_x, EACCES); -} - -void -impl::remove(const path& p) -{ - if (file_info(p).get_type() == file_info::dir_type) - throw atf::system_error(IMPL_NAME "::remove(" + p.str() + ")", - "Is a directory", - EPERM); - if (::unlink(p.c_str()) == -1) - throw atf::system_error(IMPL_NAME "::remove(" + p.str() + ")", - "unlink(" + p.str() + ") failed", - errno); -} - -void -impl::cleanup(const path& p) -{ - atf_error_t err; - - err = atf_fs_cleanup(p.c_path()); - if (atf_is_error(err)) - throw_atf_error(err); -} diff --git a/dist/atf/atf-c++/fs.hpp b/dist/atf/atf-c++/fs.hpp deleted file mode 100644 index 6eb11d7f91b1..000000000000 --- a/dist/atf/atf-c++/fs.hpp +++ /dev/null @@ -1,437 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_FS_HPP_) -#define _ATF_CXX_FS_HPP_ - -extern "C" { -#include -} - -#include -#include -#include -#include - -extern "C" { -#include "atf-c/fs.h" -} - -namespace atf { -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. - //! - atf_fs_path_t m_path; - -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 Copy constructor. - //! - path(const path&); - - //! - //! \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 pointer to the implementation data. - //! - const atf_fs_path_t* c_path(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 Assignment operator. - //! - path& operator=(const path&); - - //! - //! \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 { - atf_fs_stat_t m_stat; - -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 copy constructor. - //! - file_info(const file_info&); - - //! - //! \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 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. -// ------------------------------------------------------------------------ - -//! -//! \brief A RAII model for temporary directories. -//! -//! The temp_dir class provides a RAII model for temporary directories. -//! During construction, a safe temporary directory is created and during -//! destruction it is carefully removed by making use of the cleanup -//! function. -//! -class temp_dir { - //! - //! \brief The path to this temporary directory. - //! - path *m_path; - -public: - //! - //! \brief Creates a new temporary directory. - //! - //! Creates a new temporary directory based on the provided name - //! template. The template must end with six X characters preceded - //! by a dot. These characters are replaced with a unique name on - //! the file system as described in mkdtemp(3). - //! - temp_dir(const path&); - - //! - //! \brief Destroys the temporary directory. - //! - //! Destroys this temporary directory object as well as its file - //! system representation. - //! - ~temp_dir(void); - - //! - //! \brief Returns the path to this temporary directory. - //! - const path& get_path(void) const; -}; - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -//! -//! \brief Changes the current working directory. -//! -//! Changes the current working directory to the given path. Returns the -//! path to the directory just left. -//! -//! \throw system_error If ::chdir failed. -//! -path change_directory(const path&); - -//! -//! \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 Returns the path to the current working directory. -//! -//! Calculates and returns the path to the current working directory, which -//! is guessed using the ::getcwd function. -//! -//! \throw system_error If ::getcwd failed. -//! -path get_current_dir(void); - -//! -//! \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 Recursively cleans up a directory. -//! -//! This function cleans up a directory hierarchy. First of all, it looks -//! for any file system that may be mounted under the given path and, if -//! any is found, an attempt is made to unmount it. Later on, the -//! directory is removed alongside all of its contents. -//! -void cleanup(const path&); - -} // namespace fs -} // namespace atf - -#endif // !defined(_ATF_CXX_FS_HPP_) diff --git a/dist/atf/atf-c++/io.cpp b/dist/atf/atf-c++/io.cpp deleted file mode 100644 index e8d91a56e423..000000000000 --- a/dist/atf/atf-c++/io.cpp +++ /dev/null @@ -1,350 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/exceptions.hpp" -#include "atf-c++/io.hpp" -#include "atf-c++/sanity.hpp" - -namespace impl = atf::io; -#define IMPL_NAME "atf::io" - -// ------------------------------------------------------------------------ -// The "file_handle" class. -// ------------------------------------------------------------------------ - -impl::file_handle::file_handle(void) : - m_handle(invalid_value()) -{ -} - -impl::file_handle::file_handle(handle_type h) : - m_handle(h) -{ - PRE(m_handle != invalid_value()); -} - -impl::file_handle::file_handle(const file_handle& fh) : - m_handle(fh.m_handle) -{ - fh.m_handle = invalid_value(); -} - -impl::file_handle::~file_handle(void) -{ - if (is_valid()) - close(); -} - -impl::file_handle& -impl::file_handle::operator=(const file_handle& fh) -{ - m_handle = fh.m_handle; - fh.m_handle = invalid_value(); - - return *this; -} - -bool -impl::file_handle::is_valid(void) - const -{ - return m_handle != invalid_value(); -} - -void -impl::file_handle::close(void) -{ - PRE(is_valid()); - - ::close(m_handle); - - m_handle = invalid_value(); -} - -impl::file_handle::handle_type -impl::file_handle::disown(void) -{ - PRE(is_valid()); - - handle_type h = m_handle; - m_handle = invalid_value(); - return h; -} - -impl::file_handle::handle_type -impl::file_handle::get(void) - const -{ - PRE(is_valid()); - - return m_handle; -} - -void -impl::file_handle::posix_remap(handle_type h) -{ - PRE(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); - - if (::close(m_handle) == -1) { - ::close(h); - throw system_error(IMPL_NAME "::file_handle::posix_remap", - "close(2) failed", errno); - } - - m_handle = h; -} - -const impl::file_handle::handle_type -impl::file_handle::invalid_value(void) -{ - return -1; -} - -// ------------------------------------------------------------------------ -// The "systembuf" class. -// ------------------------------------------------------------------------ - -impl::systembuf::systembuf(handle_type h, std::size_t bufsize) : - m_handle(h), - m_bufsize(bufsize), - m_read_buf(NULL), - m_write_buf(NULL) -{ - PRE(m_handle >= 0); - PRE(m_bufsize > 0); - - try { - m_read_buf = new char[bufsize]; - m_write_buf = new char[bufsize]; - } catch (...) { - if (m_read_buf != NULL) - delete [] m_read_buf; - if (m_write_buf != NULL) - delete [] m_write_buf; - throw; - } - - setp(m_write_buf, m_write_buf + m_bufsize); -} - -impl::systembuf::~systembuf(void) -{ - sync(); // XXX Unsure if this is correct. But seems to be needed. - delete [] m_read_buf; - delete [] m_write_buf; -} - -impl::systembuf::int_type -impl::systembuf::underflow(void) -{ - PRE(gptr() >= egptr()); - - bool ok; - ssize_t cnt = ::read(m_handle, m_read_buf, m_bufsize); - ok = (cnt != -1 && cnt != 0); - - if (!ok) - return traits_type::eof(); - else { - setg(m_read_buf, m_read_buf, m_read_buf + cnt); - return traits_type::to_int_type(*gptr()); - } -} - -impl::systembuf::int_type -impl::systembuf::overflow(int c) -{ - PRE(pptr() >= epptr()); - if (sync() == -1) - return traits_type::eof(); - if (!traits_type::eq_int_type(c, traits_type::eof())) { - traits_type::assign(*pptr(), c); - pbump(1); - } - return traits_type::not_eof(c); -} - -int -impl::systembuf::sync(void) -{ - ssize_t cnt = pptr() - pbase(); - - bool ok; - ok = ::write(m_handle, pbase(), cnt) == cnt; - - if (ok) - pbump(-cnt); - return ok ? 0 : -1; -} - -// ------------------------------------------------------------------------ -// The "pipe" class. -// ------------------------------------------------------------------------ - -impl::pipe::pipe(void) -{ - file_handle::handle_type hs[2]; - - if (::pipe(hs) == -1) - throw system_error(IMPL_NAME "::pipe::pipe", - "pipe(2) failed", errno); - - m_read_end = file_handle(hs[0]); - m_write_end = file_handle(hs[1]); -} - -impl::file_handle& -impl::pipe::rend(void) -{ - return m_read_end; -} - -impl::file_handle& -impl::pipe::wend(void) -{ - return m_write_end; -} - -// ------------------------------------------------------------------------ -// The "pistream" class. -// ------------------------------------------------------------------------ - -impl::pistream::pistream(impl::file_handle& fh) : - std::istream(NULL), - m_handle(fh), - m_systembuf(m_handle.get()) -{ - rdbuf(&m_systembuf); -} - -void -impl::pistream::close(void) -{ - m_handle.close(); -} - -impl::file_handle& -impl::pistream::handle(void) -{ - return m_handle; -} - -// ------------------------------------------------------------------------ -// The "postream" class. -// ------------------------------------------------------------------------ - -impl::postream::postream(impl::file_handle& fh) : - std::ostream(NULL), - m_handle(fh), - m_systembuf(m_handle.get()) -{ - rdbuf(&m_systembuf); -} - -void -impl::postream::close(void) -{ - m_handle.close(); -} - -impl::file_handle& -impl::postream::handle(void) -{ - return m_handle; -} - -// ------------------------------------------------------------------------ -// The "pollable_istream" class. -// ------------------------------------------------------------------------ - -impl::unbuffered_istream::unbuffered_istream(impl::file_handle& fh) : - m_fh(fh), - m_is_good(true) -{ -} - -impl::file_handle& -impl::unbuffered_istream::get_fh(void) -{ - return m_fh; -} - -bool -impl::unbuffered_istream::good(void) - const -{ - return m_is_good; -} - -size_t -impl::unbuffered_istream::read(void* buf, size_t buflen) -{ - if (!m_is_good) - return 0; - - ssize_t res = ::read(m_fh.get(), buf, buflen); - m_is_good = res > 0; - return res > 0 ? res : 0; -} - -void -impl::unbuffered_istream::close(void) -{ - m_is_good = false; - m_fh.close(); -} - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -impl::unbuffered_istream& -impl::getline(unbuffered_istream& uis, std::string& str) -{ - str.clear(); - char ch; - while (uis.read(&ch, sizeof(ch)) == sizeof(ch) && ch != '\n') { - if (ch != '\r') - str += ch; - } - return uis; -} diff --git a/dist/atf/atf-c++/io.hpp b/dist/atf/atf-c++/io.hpp deleted file mode 100644 index 9d14f6d84ac0..000000000000 --- a/dist/atf/atf-c++/io.hpp +++ /dev/null @@ -1,637 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_IO_HPP_) -#define _ATF_CXX_IO_HPP_ - -#include -#include -#include - -#include - -namespace atf { -namespace io { - -// ------------------------------------------------------------------------ -// The "file_handle" class. -// ------------------------------------------------------------------------ - -//! -//! \brief Simple RAII model for system file handles. -//! -//! The \a file_handle class is a simple RAII model for native system file -//! handles. This class wraps one of such handles grabbing its ownership, -//! and automaticaly closes it upon destruction. It is basically used -//! inside the library to avoid leaking open file handles, shall an -//! unexpected execution trace occur. -//! -//! A \a file_handle object can be copied but doing so invalidates the -//! source object. There can only be a single valid \a file_handle object -//! for a given system file handle. This is similar to std::auto_ptr\<\>'s -//! semantics. -//! -//! This class also provides some convenience methods to issue special file -//! operations under their respective platforms. -//! -class file_handle -{ -public: - //! - //! \brief Opaque name for the native handle type. - //! - //! Each operating system identifies file handles using a specific type. - //! The \a handle_type type is used to transparently refer to file - //! handles regarless of the operating system in which this class is - //! used. - //! - //! If this class is used in a POSIX system, \a NativeSystemHandle is - //! an integer type while it is a \a HANDLE in a Win32 system. - //! - typedef int handle_type; - - //! - //! \brief Constructs an invalid file handle. - //! - //! This constructor creates a new \a file_handle object that represents - //! an invalid file handle. An invalid file handle can be copied but - //! cannot be manipulated in any way (except checking for its validity). - //! - //! \see is_valid() - //! - file_handle(void); - - //! - //! \brief Constructs a new file handle from a native file handle. - //! - //! This constructor creates a new \a file_handle object that takes - //! ownership of the given \a h native file handle. The user must not - //! close \a h on his own during the lifetime of the new object. - //! Ownership can be reclaimed using disown(). - //! - //! \pre The native file handle must be valid; a close operation must - //! succeed on it. - //! - //! \see disown() - //! - file_handle(handle_type h); - - //! - //! \brief Copy constructor; invalidates the source handle. - //! - //! This copy constructor creates a new file handle from a given one. - //! Ownership of the native file handle is transferred to the new - //! object, effectively invalidating the source file handle. This - //! avoids having two live \a file_handle objects referring to the - //! same native file handle. The source file handle need not be - //! valid in the name of simplicity. - //! - //! \post The source file handle is invalid. - //! \post The new file handle owns the source's native file handle. - //! - file_handle(const file_handle& fh); - - //! - //! \brief Releases resources if the handle is valid. - //! - //! If the file handle is valid, the destructor closes it. - //! - //! \see is_valid() - //! - ~file_handle(void); - - //! - //! \brief Assignment operator; invalidates the source handle. - //! - //! This assignment operator transfers ownership of the RHS file - //! handle to the LHS one, effectively invalidating the source file - //! handle. This avoids having two live \a file_handle objects - //! referring to the same native file handle. The source file - //! handle need not be valid in the name of simplicity. - //! - //! \post The RHS file handle is invalid. - //! \post The LHS file handle owns RHS' native file handle. - //! \return A reference to the LHS file handle. - //! - file_handle& operator=(const file_handle& fh); - - //! - //! \brief Checks whether the file handle is valid or not. - //! - //! Returns a boolean indicating whether the file handle is valid or - //! not. If the file handle is invalid, no other applications can be - //! executed other than the destructor. - //! - //! \return True if the file handle is valid; false otherwise. - //! - bool is_valid(void) const; - - //! - //! \brief Closes the file handle. - //! - //! Explicitly closes the file handle, which must be valid. Upon - //! exit, the handle is not valid any more. - //! - //! \pre The file handle is valid. - //! \post The file handle is invalid. - //! \post The native file handle is closed. - //! - void close(void); - - //! - //! \brief Reclaims ownership of the native file handle. - //! - //! Explicitly reclaims ownership of the native file handle contained - //! in the \a file_handle object, returning the native file handle. - //! The caller is responsible of closing it later on. - //! - //! \pre The file handle is valid. - //! \post The file handle is invalid. - //! \return The native file handle. - //! - handle_type disown(void); - - //! - //! \brief Gets the native file handle. - //! - //! Returns the native file handle for the \a file_handle object. - //! The caller can issue any operation on it except closing it. - //! If closing is required, disown() shall be used. - //! - //! \pre The file handle is valid. - //! \return The native file handle. - //! - handle_type get(void) const; - - //! - //! \brief Changes the native file handle to the given one. - //! - //! Given a new native file handle \a h, this operation assigns this - //! handle to the current object, closing its old native file handle. - //! In other words, it first calls dup2() to remap the old handle to - //! the new one and then closes the old handle. - //! - //! If \a h matches the current value of the handle, this is a no-op. - //! This is done for simplicity, to avoid the caller having to check - //! this condition on its own. - //! - //! If \a h is open, it is automatically closed by dup2(). - //! - //! This operation is only available in POSIX systems. - //! - //! \pre The file handle is valid. - //! \pre The native file handle \a h is valid; i.e., it must be - //! closeable. - //! \post The file handle's native file handle is \a h. - //! \throw system_error If the internal remapping operation fails. - //! - void posix_remap(handle_type h); - -private: - //! - //! \brief Internal handle value. - //! - //! This variable holds the native handle value for the file handle - //! hold by this object. It is interesting to note that this needs - //! to be mutable because the copy constructor and the assignment - //! operator invalidate the source object. - //! - mutable handle_type m_handle; - - //! - //! \brief Constant function representing an invalid handle value. - //! - //! Returns the platform-specific handle value that represents an - //! invalid handle. This is a constant function rather than a regular - //! constant because, in the latter case, we cannot define it under - //! Win32 due to the value being of a complex type. - //! - static const handle_type invalid_value(void); -}; - -// ------------------------------------------------------------------------ -// The "systembuf" class. -// ------------------------------------------------------------------------ - -//! -//! \brief std::streambuf implementation for system file handles. -//! -//! systembuf provides a std::streambuf implementation for system file -//! handles. Contrarywise to file_handle, this class does \b not take -//! ownership of the native file handle; this should be taken care of -//! somewhere else. -//! -//! This class follows the expected semantics of a std::streambuf object. -//! However, it is not copyable to avoid introducing inconsistences with -//! the on-disk file and the in-memory buffers. -//! -class systembuf : - public std::streambuf, utils::noncopyable -{ -public: - typedef int handle_type; - - //! - //! \brief Constructs a new systembuf for the given file handle. - //! - //! This constructor creates a new systembuf object that reads or - //! writes data from/to the \a h native file handle. This handle - //! is \b not owned by the created systembuf object; the code - //! should take care of it externally. - //! - //! This class buffers input and output; the buffer size may be - //! tuned through the \a bufsize parameter, which defaults to 8192 - //! bytes. - //! - //! \see pistream and postream. - //! - explicit systembuf(handle_type h, std::size_t bufsize = 8192); - ~systembuf(void); - -private: - //! - //! \brief Native file handle used by the systembuf object. - //! - handle_type m_handle; - - //! - //! \brief Internal buffer size used during read and write operations. - //! - std::size_t m_bufsize; - - //! - //! \brief Internal buffer used during read operations. - //! - char* m_read_buf; - - //! - //! \brief Internal buffer used during write operations. - //! - char* m_write_buf; - -protected: - //! - //! \brief Reads new data from the native file handle. - //! - //! This operation is called by input methods when there are no more - //! data in the input buffer. The function fills the buffer with new - //! data, if available. - //! - //! \pre All input positions are exhausted (gptr() >= egptr()). - //! \post The input buffer has new data, if available. - //! \returns traits_type::eof() if a read error occurrs or there are - //! no more data to be read. Otherwise returns - //! traits_type::to_int_type(*gptr()). - //! - virtual int_type underflow(void); - - //! - //! \brief Makes room in the write buffer for additional data. - //! - //! This operation is called by output methods when there is no more - //! space in the output buffer to hold a new element. The function - //! first flushes the buffer's contents to disk and then clears it to - //! leave room for more characters. The given \a c character is - //! stored at the beginning of the new space. - //! - //! \pre All output positions are exhausted (pptr() >= epptr()). - //! \post The output buffer has more space if no errors occurred - //! during the write to disk. - //! \post *(pptr() - 1) is \a c. - //! \returns traits_type::eof() if a write error occurrs. Otherwise - //! returns traits_type::not_eof(c). - //! - virtual int_type overflow(int c); - - //! - //! \brief Flushes the output buffer to disk. - //! - //! Synchronizes the systembuf buffers with the contents of the file - //! associated to this object through the native file handle. The - //! output buffer is flushed to disk and cleared to leave new room - //! for more data. - //! - //! \returns 0 on success, -1 if an error occurred. - //! - virtual int sync(void); -}; - -// ------------------------------------------------------------------------ -// The "pipe" class. -// ------------------------------------------------------------------------ - -//! -//! \brief Simple RAII model for anonymous pipes. -//! -//! The pipe class is a simple RAII model for anonymous pipes. It -//! provides a portable constructor that allocates a new %pipe and creates -//! a pipe object that owns the two file handles associated to it: the -//! read end and the write end. -//! -//! These handles can be retrieved for modification according to -//! file_handle semantics. Optionally, their ownership can be transferred -//! to external \a file_handle objects which comes handy when the two -//! ends need to be used in different places (i.e. after a POSIX fork() -//! system call). -//! -//! Pipes can be copied following the same semantics as file handles. -//! In other words, copying a %pipe object invalidates the source one. -//! -//! \see file_handle -//! -class pipe -{ - //! - //! \brief The %pipe's read end file handle. - //! - file_handle m_read_end; - - //! - //! \brief The %pipe's write end file handle. - //! - file_handle m_write_end; - -public: - //! - //! \brief Creates a new %pipe. - //! - //! The default pipe constructor allocates a new anonymous %pipe - //! and assigns its ownership to the created pipe object. - //! - //! \throw system_error If the anonymous %pipe creation fails. - //! - pipe(void); - - //! - //! \brief Returns the %pipe's read end file handle. - //! - //! Obtains a reference to the %pipe's read end file handle. Care - //! should be taken to not duplicate the returned object if ownership - //! shall remain to the %pipe. - //! - //! Duplicating the returned object invalidates its corresponding file - //! handle in the %pipe. - //! - //! \return A reference to the %pipe's read end file handle. - //! - file_handle& rend(void); - - //! - //! \brief Returns the %pipe's write end file handle. - //! - //! Obtains a reference to the %pipe's write end file handle. Care - //! should be taken to not duplicate the returned object if ownership - //! shall remain to the %pipe. - //! - //! Duplicating the returned object invalidates its corresponding file - //! handle in the %pipe. - //! - //! \return A reference to the %pipe's write end file handle. - //! - file_handle& wend(void); -}; - -// ------------------------------------------------------------------------ -// The "pistream" class. -// ------------------------------------------------------------------------ - -//! -//! \brief Child process' output stream. -//! -//! The pistream class represents an output communication channel with the -//! child process. The child process writes data to this stream and the -//! parent process can read it through the pistream object. In other -//! words, from the child's point of view, the communication channel is an -//! output one, but from the parent's point of view it is an input one; -//! hence the confusing pistream name. -//! -//! pistream objects cannot be copied because they own the file handle -//! they use to communicate with the child and because they buffer data -//! that flows through the communication channel. -//! -//! A pistream object behaves as a std::istream stream in all senses. -//! The class is only provided because it must provide a method to let -//! the caller explicitly close the communication channel. -//! -//! \remark Blocking remarks: Functions that read data from this -//! stream can block if the associated file handle blocks during the read. -//! As this class is used to communicate with child processes through -//! anonymous pipes, the most typical blocking condition happens when the -//! child has no more data to send to the pipe's system buffer. When -//! this happens, the buffer eventually empties and the system blocks -//! until the writer generates some data. -//! -class pistream : - public std::istream, utils::noncopyable -{ - //! - //! \brief The file handle managed by this stream. - //! - file_handle m_handle; - - //! - //! \brief The systembuf object used to manage this stream's data. - //! - systembuf m_systembuf; - -public: - //! - //! \brief Creates a new process' output stream. - //! - //! Given a file handle, this constructor creates a new pistream - //! object that owns the given file handle \a fh. Ownership of - //! \a fh is transferred to the created pistream object. - //! - //! \pre \a fh is valid. - //! \post \a fh is invalid. - //! \post The new pistream object owns \a fh. - //! - explicit pistream(file_handle& fh); - - //! - //! \brief Closes the file handle managed by this stream. - //! - //! Explicitly closes the file handle managed by this stream. This - //! function can be used by the user to tell the child process it's - //! not willing to receive more data. - //! - void close(void); - - //! - //! \brief Returns the file descriptor attached to this stream. - //! - file_handle& handle(void); -}; - -// ------------------------------------------------------------------------ -// The "postream" class. -// ------------------------------------------------------------------------ - -//! -//! \brief Child process' input stream. -//! -//! The postream class represents an input communication channel with the -//! child process. The child process reads data from this stream and the -//! parent process can write to it through the postream object. In other -//! words, from the child's point of view, the communication channel is an -//! input one, but from the parent's point of view it is an output one; -//! hence the confusing postream name. -//! -//! postream objects cannot be copied because they own the file handle -//! they use to communicate with the child and because they buffer data -//! that flows through the communication channel. -//! -//! A postream object behaves as a std::ostream stream in all senses. -//! The class is only provided because it must provide a method to let -//! the caller explicitly close the communication channel. -//! -//! \remark Blocking remarks: Functions that write data to this -//! stream can block if the associated file handle blocks during the write. -//! As this class is used to communicate with child processes through -//! anonymous pipes, the most typical blocking condition happens when the -//! child is not processing the data in the pipe's system buffer. When -//! this happens, the buffer eventually fills up and the system blocks -//! until the reader consumes some data, leaving some new room. -//! -class postream : - public std::ostream, utils::noncopyable -{ - //! - //! \brief The file handle managed by this stream. - //! - file_handle m_handle; - - //! - //! \brief The systembuf object used to manage this stream's data. - //! - systembuf m_systembuf; - -public: - //! - //! \brief Creates a new process' input stream. - //! - //! Given a file handle, this constructor creates a new postream - //! object that owns the given file handle \a fh. Ownership of - //! \a fh is transferred to the created postream object. - //! - //! \pre \a fh is valid. - //! \post \a fh is invalid. - //! \post The new postream object owns \a fh. - //! - explicit postream(file_handle& fh); - - //! - //! \brief Closes the file handle managed by this stream. - //! - //! Explicitly closes the file handle managed by this stream. This - //! function can be used by the user to tell the child process there - //! is no more data to send. - //! - void close(void); - - //! - //! \brief Returns the file descriptor attached to this stream. - //! - file_handle& handle(void); -}; - -// ------------------------------------------------------------------------ -// The "unbuffered_istream" class. -// ------------------------------------------------------------------------ - -//! -//! \brief An unbuffered input stream. -//! -//! The unbuffered_istream class somewhat mimics the interface of -//! std::istream, but it provides unbuffered access to its attached -//! file descriptor. This is required in those situations where poll(2) -//! is needed, because buffering data will mangle the events reported by -//! this system call and break algorithms mysteriously on some platforms. -//! -class unbuffered_istream { - //! - //! \brief The file descriptor attached to this stream. - //! - file_handle m_fh; - - //! - //! \brief Whether the stream is good or not. - //! - bool m_is_good; - -public: - //! - //! \brief Constructs a new unbuffered input stream. - //! - //! Given a file handle, constructs a new unbuffered input stream to - //! handle it and takes ownership of that handle. - //! - unbuffered_istream(file_handle& fh); - - //! - //! \brief Returns a reference to this stream's file handle. - //! - file_handle& get_fh(void); - - //! - //! \brief Checks whether the stream is good or not for reading. - //! - bool good(void) const; - - //! - //! \brief Reads unformatted data. - //! - //! Reads data from this stream onto the buffer specified and returns - //! the amount of data read. To detect errors, check for the stream's - //! status using the good method after a call to this function. - //! - size_t read(void*, size_t); - - //! - //! \brief Closes the stream. - //! - void close(void); -}; - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -//! -//! \brief Unbuffered getline implementation. -//! -//! Reads a text line from the given stream without buffering any data. -//! This is inefficient but is the only way to safely use poll(2)... -//! -unbuffered_istream& getline(unbuffered_istream&, std::string&); - -} // namespace io -} // namespace atf - -#endif // !defined(_ATF_CXX_IO_HPP_) diff --git a/dist/atf/atf-c++/macros.hpp b/dist/atf/atf-c++/macros.hpp deleted file mode 100644 index aeccf87fefb6..000000000000 --- a/dist/atf/atf-c++/macros.hpp +++ /dev/null @@ -1,145 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_MACROS_HPP_) -#define _ATF_CXX_MACROS_HPP_ - -#include -#include -#include - -#include - -#define ATF_TEST_CASE(name) \ - class atfu_tc_ ## name : public atf::tests::tc { \ - void head(void); \ - void body(void) const; \ - public: \ - atfu_tc_ ## name(void) : atf::tests::tc(#name) {} \ - }; - -#define ATF_TEST_CASE_WITH_CLEANUP(name) \ - class atfu_tc_ ## name : public atf::tests::tc { \ - void head(void); \ - void body(void) const; \ - void cleanup(void) const; \ - public: \ - atfu_tc_ ## name(void) : atf::tests::tc(#name) {} \ - }; - -#define ATF_TEST_CASE_NAME(name) atfu_tc_ ## name - -#define ATF_TEST_CASE_HEAD(name) \ - void \ - atfu_tc_ ## name::head(void) - -#define ATF_TEST_CASE_BODY(name) \ - void \ - atfu_tc_ ## name::body(void) \ - const - -#define ATF_TEST_CASE_CLEANUP(name) \ - void \ - atfu_tc_ ## name::cleanup(void) \ - const - -#define ATF_FAIL(reason) atf::tests::tc::fail(reason) - -#define ATF_SKIP(reason) atf::tests::tc::skip(reason) - -#define ATF_PASS() atf::tests::tc::pass() - -#define ATF_CHECK(x) \ - do { \ - if (!(x)) { \ - std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " << #x << " not met"; \ - atf::tests::tc::fail(atfu_ss.str()); \ - } \ - } while (false) - -#define ATF_CHECK_EQUAL(x, y) \ - do { \ - if ((x) != (y)) { \ - std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " << #x << " != " << #y \ - << " (" << (x) << " != " << (y) << ")"; \ - atf::tests::tc::fail(atfu_ss.str()); \ - } \ - } while (false) - -#define ATF_CHECK_THROW(x, e) \ - do { \ - try { \ - x; \ - std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " did not throw " \ - #e " as expected"; \ - atf::tests::tc::fail(atfu_ss.str()); \ - } catch (const e& atfu_eo) { \ - } catch (const std::exception& atfu_e) { \ - std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " threw an " \ - "unexpected error (not " #e "): " << 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 ")"; \ - atf::tests::tc::fail(atfu_ss.str()); \ - } \ - } while (false) - -#define ATF_INIT_TEST_CASES(tcs) \ - namespace atf { \ - namespace tests { \ - int run_tp(int, char* const*, \ - void (*)(std::vector< atf::tests::tc * >&)); \ - } \ - } \ - \ - static void atfu_init_tcs(std::vector< atf::tests::tc * >&); \ - \ - int \ - main(int argc, char* const* argv) \ - { \ - return atf::tests::run_tp(argc, argv, atfu_init_tcs); \ - } \ - \ - static \ - void \ - atfu_init_tcs(std::vector< atf::tests::tc * >& tcs) - -#define ATF_ADD_TEST_CASE(tcs, tcname) \ - do { \ - atf::tests::tc* tcptr = new atfu_tc_ ## tcname(); \ - (tcs).push_back(tcptr); \ - } while (0); - -#endif // !defined(_ATF_CXX_MACROS_HPP_) diff --git a/dist/atf/atf-c++/parser.cpp b/dist/atf/atf-c++/parser.cpp deleted file mode 100644 index ba4ee4c69088..000000000000 --- a/dist/atf/atf-c++/parser.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/parser.hpp" - -namespace impl = atf::parser; -#define IMPL_NAME "atf::parser" - -// ------------------------------------------------------------------------ -// The "parse_error" class. -// ------------------------------------------------------------------------ - -impl::parse_error::parse_error(size_t line, std::string msg) : - std::runtime_error(msg), - std::pair< size_t, std::string >(line, msg) -{ -} - -impl::parse_error::~parse_error(void) - throw() -{ -} - -const char* -impl::parse_error::what(void) - const throw() -{ - try { - std::ostringstream oss; - oss << "LONELY PARSE ERROR: " << first << ": " << second; - m_msg = oss.str(); - return m_msg.c_str(); - } catch (...) { - return "Could not format message for parsing error."; - } -} - -// ------------------------------------------------------------------------ -// The "parse_errors" class. -// ------------------------------------------------------------------------ - -impl::parse_errors::parse_errors(void) : - std::runtime_error("No parsing errors yet") -{ - m_msg.clear(); -} - -impl::parse_errors::~parse_errors(void) - throw() -{ -} - -const char* -impl::parse_errors::what(void) - const throw() -{ - try { - std::ostringstream oss; - for (const_iterator iter = begin(); iter != end(); iter++) { - oss << (*iter).first << ": " << (*iter).second - << std::endl; - } - m_msg = oss.str(); - return m_msg.c_str(); - } catch (...) { - return "Could not format messages for parsing errors."; - } -} - -// ------------------------------------------------------------------------ -// The "token" class. -// ------------------------------------------------------------------------ - -impl::token::token(void) : - m_inited(false) -{ -} - -impl::token::token(size_t p_line, - const token_type& p_type, - const std::string& p_text) : - m_inited(true), - m_line(p_line), - m_type(p_type), - m_text(p_text) -{ -} - -size_t -impl::token::lineno(void) - const -{ - return m_line; -} - -const impl::token_type& -impl::token::type(void) - const -{ - return m_type; -} - -const std::string& -impl::token::text(void) - const -{ - return m_text; -} - -impl::token::operator bool(void) - const -{ - return m_inited; -} - -bool -impl::token::operator!(void) - const -{ - return !m_inited; -} diff --git a/dist/atf/atf-c++/parser.hpp b/dist/atf/atf-c++/parser.hpp deleted file mode 100644 index ec9431c94c16..000000000000 --- a/dist/atf/atf-c++/parser.hpp +++ /dev/null @@ -1,524 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_PARSER_HPP_) -#define _ATF_CXX_PARSER_HPP_ - -#include -#include -#include -#include -#include - -namespace atf { -namespace parser { - -// ------------------------------------------------------------------------ -// The "parse_error" class. -// ------------------------------------------------------------------------ - -class parse_error : public std::runtime_error, - public std::pair< size_t, std::string > { - mutable std::string m_msg; - -public: - parse_error(size_t, std::string); - ~parse_error(void) throw(); - - const char* what(void) const throw(); -}; - -// ------------------------------------------------------------------------ -// The "parse_errors" class. -// ------------------------------------------------------------------------ - -class parse_errors : public std::runtime_error, - public std::vector< parse_error > { - std::vector< parse_error > m_errors; - mutable std::string m_msg; - -public: - parse_errors(void); - ~parse_errors(void) throw(); - - const char* what(void) const throw(); -}; - -// ------------------------------------------------------------------------ -// The "token" class. -// ------------------------------------------------------------------------ - -typedef int token_type; - -//! -//! \brief Representation of a read token. -//! -//! A pair that contains the information of a token read from a stream. -//! It contains the token's type and its associated data, if any. -//! -struct token { - bool m_inited; - size_t m_line; - token_type m_type; - std::string m_text; - -public: - token(void); - token(size_t, const token_type&, const std::string& = ""); - - size_t lineno(void) const; - const token_type& type(void) const; - const std::string& text(void) const; - - operator bool(void) const; - bool operator!(void) const; -}; - -// ------------------------------------------------------------------------ -// The "tokenizer" class. -// ------------------------------------------------------------------------ - -//! -//! \brief A stream tokenizer. -//! -//! This template implements an extremely simple, line-oriented stream -//! tokenizer. It is only able to recognize one character-long delimiters, -//! random-length keywords, skip whitespace and, anything that does not -//! match these rules is supposed to be a word. -//! -//! Parameter IS: The input stream's type. -//! -template< class IS > -class tokenizer { - IS& m_is; - size_t m_lineno; - token m_la; - - bool m_skipws; - token_type m_eof_type, m_nl_type, m_text_type; - - std::map< char, token_type > m_delims_map; - std::string m_delims_str; - - char m_quotech; - token_type m_quotetype; - - std::map< std::string, token_type > m_keywords_map; - - token_type alloc_type(void); - - template< class TKZ > - friend - class parser; - -public: - tokenizer(IS&, bool, const token_type&, const token_type&, - const token_type&, size_t = 1); - - size_t lineno(void) const; - - void add_delim(char, const token_type&); - void add_keyword(const std::string&, const token_type&); - void add_quote(char, const token_type&); - - token next(void); - std::string rest_of_line(void); -}; - -template< class IS > -tokenizer< IS >::tokenizer(IS& p_is, - bool p_skipws, - const token_type& p_eof_type, - const token_type& p_nl_type, - const token_type& p_text_type, - size_t p_lineno) : - m_is(p_is), - m_lineno(p_lineno), - m_skipws(p_skipws), - m_eof_type(p_eof_type), - m_nl_type(p_nl_type), - m_text_type(p_text_type), - m_quotech(-1) -{ -} - -template< class IS > -size_t -tokenizer< IS >::lineno(void) - const -{ - return m_lineno; -} - -template< class IS > -void -tokenizer< IS >::add_delim(char delim, const token_type& type) -{ - m_delims_map[delim] = type; - m_delims_str += delim; -} - -template< class IS > -void -tokenizer< IS >::add_keyword(const std::string& keyword, - const token_type& type) -{ - m_keywords_map[keyword] = type; -} - -template< class IS > -void -tokenizer< IS >::add_quote(char ch, const token_type& type) -{ - m_quotech = ch; - m_quotetype = type; -} - -template< class IS > -token -tokenizer< IS >::next(void) -{ - if (m_la) { - token t = m_la; - m_la = token(); - if (t.type() == m_nl_type) - m_lineno++; - return t; - } - - char ch; - std::string text; - - bool done = false, quoted = false; - token t(m_lineno, m_eof_type, "<>"); - while (!done && m_is.get(ch).good()) { - if (ch == m_quotech) { - if (text.empty()) { - bool escaped = false; - while (!done && m_is.get(ch).good()) { - if (!escaped) { - if (ch == '\\') - escaped = true; - else if (ch == '\n') { - m_la = token(m_lineno, m_nl_type, "<>"); - throw parse_error(t.lineno(), - "Missing double quotes before " - "end of line"); - } else if (ch == m_quotech) - done = true; - else - text += ch; - } else { - text += ch; - escaped = false; - } - } - if (!m_is.good()) - throw parse_error(t.lineno(), - "Missing double quotes before " - "end of file"); - t = token(m_lineno, m_text_type, text); - quoted = true; - } else { - m_is.unget(); - done = true; - } - } else { - typename std::map< char, token_type >::const_iterator idelim; - idelim = m_delims_map.find(ch); - if (idelim != m_delims_map.end()) { - done = true; - if (text.empty()) - t = token(m_lineno, (*idelim).second, - std::string("") + ch); - else - m_is.unget(); - } else if (ch == '\n') { - done = true; - if (text.empty()) - t = token(m_lineno, m_nl_type, "<>"); - else - m_is.unget(); - } else if (m_skipws && (ch == ' ' || ch == '\t')) { - if (!text.empty()) - done = true; - } else - text += ch; - } - } - - if (!quoted && !text.empty()) { - typename std::map< std::string, token_type >::const_iterator ikw; - ikw = m_keywords_map.find(text); - if (ikw != m_keywords_map.end()) - t = token(m_lineno, (*ikw).second, text); - else - t = token(m_lineno, m_text_type, text); - } - - if (t.type() == m_nl_type) - m_lineno++; - - return t; -} - -template< class IS > -std::string -tokenizer< IS >::rest_of_line(void) -{ - std::string str; - while (m_is.good() && m_is.peek() != '\n') - str += m_is.get(); - return str; -} - -// ------------------------------------------------------------------------ -// The "parser" class. -// ------------------------------------------------------------------------ - -template< class TKZ > -class parser { - TKZ& m_tkz; - token m_last; - parse_errors m_errors; - bool m_thrown; - -public: - parser(TKZ& tkz); - ~parser(void); - - bool good(void) const; - void add_error(const parse_error&); - bool has_errors(void) const; - - token next(void); - std::string rest_of_line(void); - token reset(const token_type&); - - token - expect(const token_type&, - const std::string&); - - token - expect(const token_type&, - const token_type&, - const std::string&); - - token - expect(const token_type&, - const token_type&, - const token_type&, - const std::string&); - - token - expect(const token_type&, - const token_type&, - const token_type&, - const token_type&, - const std::string&); - - token - expect(const token_type&, - const token_type&, - const token_type&, - const token_type&, - const token_type&, - const token_type&, - const token_type&, - const std::string&); -}; - -template< class TKZ > -parser< TKZ >::parser(TKZ& tkz) : - m_tkz(tkz), - m_thrown(false) -{ -} - -template< class TKZ > -parser< TKZ >::~parser(void) -{ - if (!m_errors.empty() && !m_thrown) - throw m_errors; -} - -template< class TKZ > -bool -parser< TKZ >::good(void) - const -{ - return m_tkz.m_is.good(); -} - -template< class TKZ > -void -parser< TKZ >::add_error(const parse_error& pe) -{ - m_errors.push_back(pe); -} - -template< class TKZ > -bool -parser< TKZ >::has_errors(void) - const -{ - return !m_errors.empty(); -} - -template< class TKZ > -token -parser< TKZ >::next(void) -{ - token t = m_tkz.next(); - - m_last = t; - - if (t.type() == m_tkz.m_eof_type) { - if (!m_errors.empty()) { - m_thrown = true; - throw m_errors; - } - } - - return t; -} - -template< class TKZ > -std::string -parser< TKZ >::rest_of_line(void) -{ - return m_tkz.rest_of_line(); -} - -template< class TKZ > -token -parser< TKZ >::reset(const token_type& stop) -{ - token t = m_last; - - while (t.type() != m_tkz.m_eof_type && t.type() != stop) - t = next(); - - return t; -} - -template< class TKZ > -token -parser< TKZ >::expect(const token_type& t1, - const std::string& textual) -{ - token t = next(); - - if (t.type() != t1) - throw parse_error(t.lineno(), - "Unexpected token `" + t.text() + - "'; expected " + textual); - - return t; -} - -template< class TKZ > -token -parser< TKZ >::expect(const token_type& t1, - const token_type& t2, - const std::string& textual) -{ - token t = next(); - - if (t.type() != t1 && t.type() != t2) - throw parse_error(t.lineno(), - "Unexpected token `" + t.text() + - "'; expected " + textual); - - return t; -} - -template< class TKZ > -token -parser< TKZ >::expect(const token_type& t1, - const token_type& t2, - const token_type& t3, - const std::string& textual) -{ - token t = next(); - - if (t.type() != t1 && t.type() != t2 && t.type() != t3) - throw parse_error(t.lineno(), - "Unexpected token `" + t.text() + - "'; expected " + textual); - - return t; -} - -template< class TKZ > -token -parser< TKZ >::expect(const token_type& t1, - const token_type& t2, - const token_type& t3, - const token_type& t4, - const std::string& textual) -{ - token t = next(); - - if (t.type() != t1 && t.type() != t2 && t.type() != t3 && - t.type() != t4) - throw parse_error(t.lineno(), - "Unexpected token `" + t.text() + - "'; expected " + textual); - - return t; -} - -template< class TKZ > -token -parser< TKZ >::expect(const token_type& t1, - const token_type& t2, - const token_type& t3, - const token_type& t4, - const token_type& t5, - const token_type& t6, - const token_type& t7, - const std::string& textual) -{ - token t = next(); - - if (t.type() != t1 && t.type() != t2 && t.type() != t3 && - t.type() != t4 && t.type() != t5 && t.type() != t6 && - t.type() != t7) - throw parse_error(t.lineno(), - "Unexpected token `" + t.text() + - "'; expected " + textual); - - return t; -} - -} // namespace parser -} // namespace atf - -#endif // !defined(_ATF_CXX_PARSER_HPP_) diff --git a/dist/atf/atf-c++/sanity.hpp b/dist/atf/atf-c++/sanity.hpp deleted file mode 100644 index c0fe9feba89e..000000000000 --- a/dist/atf/atf-c++/sanity.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_SANITY_HPP_) -#define _ATF_CXX_SANITY_HPP_ - -extern "C" { -#include -} - -#endif // !defined(_ATF_CXX_SANITY_HPP_) diff --git a/dist/atf/atf-c++/signals.cpp b/dist/atf/atf-c++/signals.cpp deleted file mode 100644 index d1e7565e8362..000000000000 --- a/dist/atf/atf-c++/signals.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/exceptions.hpp" -#include "atf-c++/signals.hpp" - -namespace impl = atf::signals; -#define IMPL_NAME "atf::signals" - -const int impl::last_signo = atf_signals_last_signo; - -// ------------------------------------------------------------------------ -// The "signal_holder" class. -// ------------------------------------------------------------------------ - -impl::signal_holder::signal_holder(int signo) -{ - atf_error_t err = atf_signal_holder_init(&m_sh, signo); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::signal_holder::~signal_holder(void) -{ - atf_signal_holder_fini(&m_sh); -} - -void -impl::signal_holder::process(void) -{ - atf_signal_holder_process(&m_sh); -} - -// ------------------------------------------------------------------------ -// The "signal_programmer" class. -// ------------------------------------------------------------------------ - -impl::signal_programmer::signal_programmer(int signo, handler h) -{ - atf_error_t err = atf_signal_programmer_init(&m_sp, signo, h); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::signal_programmer::~signal_programmer(void) -{ - atf_signal_programmer_fini(&m_sp); -} diff --git a/dist/atf/atf-c++/signals.hpp b/dist/atf/atf-c++/signals.hpp deleted file mode 100644 index 623ec3813014..000000000000 --- a/dist/atf/atf-c++/signals.hpp +++ /dev/null @@ -1,84 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_SIGNALS_HPP_) -#define _ATF_CXX_SIGNALS_HPP_ - -extern "C" { -#include -} - -#include - -extern "C" { -#include "atf-c/signals.h" -} - -namespace atf { -namespace signals { - -extern const int last_signo; -typedef atf_signal_handler_t handler; - -// ------------------------------------------------------------------------ -// The "signal_holder" class. -// ------------------------------------------------------------------------ - -// -// A RAII model to hold a signal while the object is alive. -// -class signal_holder { - atf_signal_holder_t m_sh; - -public: - signal_holder(int); - ~signal_holder(void); - - void process(void); -}; - -// ------------------------------------------------------------------------ -// The "signal_programmer" class. -// ------------------------------------------------------------------------ - -// -// A RAII model to program a signal while the object is alive. -// -class signal_programmer { - atf_signal_programmer_t m_sp; - -public: - signal_programmer(int, handler); - ~signal_programmer(void); -}; - -} // namespace signals -} // namespace atf - -#endif // !defined(_ATF_CXX_SIGNALS_HPP_) diff --git a/dist/atf/atf-c++/tests.cpp b/dist/atf/atf-c++/tests.cpp deleted file mode 100644 index 7c392fce7ad0..000000000000 --- a/dist/atf/atf-c++/tests.cpp +++ /dev/null @@ -1,699 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 -#include -#include -#include -#include -#include -#include -#include -#include - -extern "C" { -#include "atf-c/object.h" -} - -#include "atf-c++/application.hpp" -#include "atf-c++/config.hpp" -#include "atf-c++/env.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/expand.hpp" -#include "atf-c++/formats.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/io.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/signals.hpp" -#include "atf-c++/tests.hpp" -#include "atf-c++/text.hpp" -#include "atf-c++/ui.hpp" -#include "atf-c++/user.hpp" - -namespace impl = atf::tests; -#define IMPL_NAME "atf::tests" - -// ------------------------------------------------------------------------ -// Auxiliary stuff for the timeout implementation. -// ------------------------------------------------------------------------ - -namespace timeout { - static pid_t current_body = 0; - static bool killed = false; - - void - sigalrm_handler(int signo) - { - PRE(signo == SIGALRM); - - if (current_body != 0) { - ::killpg(current_body, SIGTERM); - killed = true; - } - } -} // namespace timeout - -// ------------------------------------------------------------------------ -// The "tcr" class. -// ------------------------------------------------------------------------ - -const impl::tcr::state impl::tcr::passed_state = atf_tcr_passed_state; -const impl::tcr::state impl::tcr::failed_state = atf_tcr_failed_state; -const impl::tcr::state impl::tcr::skipped_state = atf_tcr_skipped_state; - -impl::tcr::tcr(state s) -{ - PRE(s == passed_state); - - atf_error_t err = atf_tcr_init(&m_tcr, s); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::tcr::tcr(state s, const std::string& r) -{ - PRE(s == failed_state || s == skipped_state); - PRE(!r.empty()); - - atf_error_t err = atf_tcr_init_reason_fmt(&m_tcr, s, "%s", r.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::tcr::tcr(const tcr& o) -{ - if (o.get_state() == passed_state) - atf_tcr_init(&m_tcr, o.get_state()); - else - atf_tcr_init_reason_fmt(&m_tcr, o.get_state(), "%s", - o.get_reason().c_str()); -} - -impl::tcr::~tcr(void) -{ - atf_tcr_fini(&m_tcr); -} - -impl::tcr::state -impl::tcr::get_state(void) - const -{ - return atf_tcr_get_state(&m_tcr); -} - -const std::string -impl::tcr::get_reason(void) - const -{ - const atf_dynstr_t* r = atf_tcr_get_reason(&m_tcr); - return atf_dynstr_cstring(r); -} - -impl::tcr& -impl::tcr::operator=(const tcr& o) -{ - if (this != &o) { - atf_tcr_fini(&m_tcr); - - if (o.get_state() == passed_state) - atf_tcr_init(&m_tcr, o.get_state()); - else - atf_tcr_init_reason_fmt(&m_tcr, o.get_state(), "%s", - o.get_reason().c_str()); - } - return *this; -} - -// ------------------------------------------------------------------------ -// The "tc" class. -// ------------------------------------------------------------------------ - -static std::map< atf_tc_t*, impl::tc* > wraps; -static std::map< const atf_tc_t*, const impl::tc* > cwraps; - -void -impl::tc::wrap_head(atf_tc_t *tc) -{ - std::map< atf_tc_t*, impl::tc* >::iterator iter = wraps.find(tc); - INV(iter != wraps.end()); - (*iter).second->head(); -} - -void -impl::tc::wrap_body(const atf_tc_t *tc) -{ - std::map< const atf_tc_t*, const impl::tc* >::const_iterator iter = - cwraps.find(tc); - INV(iter != cwraps.end()); - (*iter).second->body(); -} - -void -impl::tc::wrap_cleanup(const atf_tc_t *tc) -{ - std::map< const atf_tc_t*, const impl::tc* >::const_iterator iter = - cwraps.find(tc); - INV(iter != cwraps.end()); - (*iter).second->cleanup(); -} - -impl::tc::tc(const std::string& ident) : - m_ident(ident) -{ -} - -impl::tc::~tc(void) -{ - cwraps.erase(&m_tc); - wraps.erase(&m_tc); - - atf_tc_fini(&m_tc); - atf_map_fini(&m_config); -} - -void -impl::tc::init(const vars_map& config) -{ - atf_error_t err; - - err = atf_map_init(&m_config); - if (atf_is_error(err)) - throw_atf_error(err); - - for (vars_map::const_iterator iter = config.begin(); - iter != config.end(); iter++) { - const char *var = (*iter).first.c_str(); - const char *val = (*iter).second.c_str(); - - err = atf_map_insert(&m_config, var, ::strdup(val), true); - if (atf_is_error(err)) { - atf_map_fini(&m_config); - throw_atf_error(err); - } - } - - wraps[&m_tc] = this; - cwraps[&m_tc] = this; - - err = atf_tc_init(&m_tc, m_ident.c_str(), wrap_head, wrap_body, - wrap_cleanup, &m_config); - if (atf_is_error(err)) { - atf_map_fini(&m_config); - throw_atf_error(err); - } -} - -bool -impl::tc::has_config_var(const std::string& var) - const -{ - return atf_tc_has_config_var(&m_tc, var.c_str()); -} - -bool -impl::tc::has_md_var(const std::string& var) - const -{ - return atf_tc_has_md_var(&m_tc, var.c_str()); -} - -const std::string -impl::tc::get_config_var(const std::string& var) - const -{ - return atf_tc_get_config_var(&m_tc, var.c_str()); -} - -const std::string -impl::tc::get_config_var(const std::string& var, const std::string& defval) - const -{ - return atf_tc_get_config_var_wd(&m_tc, var.c_str(), defval.c_str()); -} - -const std::string -impl::tc::get_md_var(const std::string& var) - const -{ - return atf_tc_get_md_var(&m_tc, var.c_str()); -} - -void -impl::tc::set_md_var(const std::string& var, const std::string& val) -{ - atf_error_t err = atf_tc_set_md_var(&m_tc, var.c_str(), val.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); -} - -impl::tcr -impl::tc::run(const fs::path& workdirbase) - const -{ - atf_tcr_t tcrc; - tcr tcrr(tcr::failed_state, "UNINITIALIZED"); - - atf_error_t err = atf_tc_run(&m_tc, &tcrc, workdirbase.c_path()); - if (atf_is_error(err)) - throw_atf_error(err); - - if (atf_tcr_has_reason(&tcrc)) { - const atf_dynstr_t* r = atf_tcr_get_reason(&tcrc); - tcrr = tcr(atf_tcr_get_state(&tcrc), atf_dynstr_cstring(r)); - } else { - tcrr = tcr(atf_tcr_get_state(&tcrc)); - } - - atf_tcr_fini(&tcrc); - return tcrr; -} - -void -impl::tc::cleanup(void) - const -{ -} - -void -impl::tc::require_prog(const std::string& prog) - const -{ - PRE(!prog.empty()); - - fs::path p(prog); - - if (p.is_absolute()) { - if (!fs::is_executable(p)) - skip("The required program " + prog + " could not be found"); - } else { - INV(p.branch_path() == fs::path(".")); - if (!fs::have_prog_in_path(prog)) - skip("The required program " + prog + " could not be found in " - "the PATH"); - } -} - -void -impl::tc::pass(void) -{ - atf_tc_pass(); -} - -void -impl::tc::fail(const std::string& reason) -{ - atf_tc_fail("%s", reason.c_str()); -} - -void -impl::tc::skip(const std::string& reason) -{ - atf_tc_skip("%s", reason.c_str()); -} - -// ------------------------------------------------------------------------ -// The "tp" class. -// ------------------------------------------------------------------------ - -class tp : public atf::application::app { -public: - typedef std::vector< impl::tc * > tc_vector; - -private: - static const char* m_description; - - bool m_lflag; - int m_results_fd; - std::auto_ptr< std::ostream > m_results_os; - atf::fs::path m_srcdir; - atf::fs::path m_workdir; - std::vector< std::string > m_tcnames; - - 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); - static tc_vector filter_tcs(tc_vector, - const std::vector< std::string >&); - - std::ostream& results_stream(void); - - int list_tcs(void); - int run_tcs(void); - -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)"), - m_lflag(false), - m_results_fd(STDOUT_FILENO), - m_srcdir("."), - m_workdir(atf::config::get("atf_workdir")), - 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_case1 [.. test_caseN]]"; -} - -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', "fd", "The file descriptor to which the test " - "program will send the results of the " - "test cases")); - 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'")); - opts.insert(option('w', "workdir", "Directory where the test's " - "temporary files are located")); - return opts; -} - -void -tp::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'l': - m_lflag = true; - break; - - case 'r': - { - std::istringstream ss(arg); - ss >> m_results_fd; - } - break; - - case 's': - m_srcdir = atf::fs::path(arg); - break; - - case 'v': - parse_vflag(arg); - break; - - case 'w': - m_workdir = atf::fs::path(arg); - break; - - default: - UNREACHABLE; - } -} - -void -tp::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, "="); - if (ws.size() == 1 && str[str.length() - 1] == '=') { - m_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]; - } -} - -void -tp::handle_srcdir(void) -{ - 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 (!m_srcdir.is_absolute()) - m_srcdir = m_srcdir.to_absolute(); - - m_vars["srcdir"] = m_srcdir.str(); -} - -tp::tc_vector -tp::init_tcs(void) -{ - m_add_tcs(m_tcs); - for (tc_vector::iterator iter = m_tcs.begin(); - iter != m_tcs.end(); iter++) { - impl::tc* tc = *iter; - - tc->init(m_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; - } -}; - -tp::tc_vector -tp::filter_tcs(tc_vector tcs, const std::vector< std::string >& tcnames) -{ - tc_vector tcso; - - if (tcnames.empty()) { - // Special case: added for efficiency because this is the most - // typical situation. - tcso = tcs; - } else { - // Collect all the test cases' identifiers. - std::vector< std::string > ids; - for (tc_vector::iterator iter = tcs.begin(); - iter != tcs.end(); iter++) { - impl::tc* tc = *iter; - - ids.push_back(tc->get_md_var("ident")); - } - - // Iterate over all names provided by the user and, for each one, - // expand it as if it were a glob pattern. Collect all expansions. - std::vector< std::string > exps; - for (std::vector< std::string >::const_iterator iter = tcnames.begin(); - iter != tcnames.end(); iter++) { - const std::string& glob = *iter; - - std::vector< std::string > ms = - atf::expand::expand_glob(glob, ids); - if (ms.empty()) - throw std::runtime_error("Unknown test case `" + glob + "'"); - exps.insert(exps.end(), ms.begin(), ms.end()); - } - - // For each expansion, locate its corresponding test case and add - // it to the output set. - for (std::vector< std::string >::const_iterator iter = exps.begin(); - iter != exps.end(); iter++) { - const std::string& name = *iter; - - tc_vector::iterator tciter = - std::find_if(tcs.begin(), tcs.end(), tc_equal_to_ident(name)); - INV(tciter != tcs.end()); - tcso.push_back(*tciter); - } - } - - return tcso; -} - -int -tp::list_tcs(void) -{ - tc_vector tcs = filter_tcs(init_tcs(), m_tcnames); - - std::string::size_type maxlen = 0; - for (tc_vector::const_iterator iter = tcs.begin(); - iter != tcs.end(); iter++) { - const impl::tc* tc = *iter; - - if (maxlen < tc->get_md_var("ident").length()) - maxlen = tc->get_md_var("ident").length(); - } - - for (tc_vector::const_iterator iter = tcs.begin(); - iter != tcs.end(); iter++) { - const impl::tc* tc = *iter; - - std::cout << atf::ui::format_text_with_tag(tc->get_md_var("descr"), - tc->get_md_var("ident"), - false, maxlen + 4) - << std::endl; - } - - return EXIT_SUCCESS; -} - -std::ostream& -tp::results_stream(void) -{ - if (m_results_fd == STDOUT_FILENO) - return std::cout; - else if (m_results_fd == STDERR_FILENO) - return std::cerr; - else - return *m_results_os; -} - -int -tp::run_tcs(void) -{ - tc_vector tcs = filter_tcs(init_tcs(), m_tcnames); - - if (!atf::fs::exists(m_workdir)) - throw std::runtime_error("Cannot find the work directory `" + - m_workdir.str() + "'"); - - int errcode = EXIT_SUCCESS; - - atf::signals::signal_holder sighup(SIGHUP); - atf::signals::signal_holder sigint(SIGINT); - atf::signals::signal_holder sigterm(SIGTERM); - - atf::formats::atf_tcs_writer w(results_stream(), std::cout, std::cerr, - tcs.size()); - for (tc_vector::iterator iter = tcs.begin(); - iter != tcs.end(); iter++) { - impl::tc* tc = *iter; - - w.start_tc(tc->get_md_var("ident")); - impl::tcr tcr = tc->run(m_workdir); - w.end_tc(tcr); - - sighup.process(); - sigint.process(); - sigterm.process(); - - if (tcr.get_state() == impl::tcr::failed_state) - errcode = EXIT_FAILURE; - } - - return errcode; -} - -int -tp::main(void) -{ - int errcode; - - handle_srcdir(); - - for (int i = 0; i < m_argc; i++) - m_tcnames.push_back(m_argv[i]); - - if (m_lflag) - errcode = list_tcs(); - else { - if (m_results_fd != STDOUT_FILENO && m_results_fd != STDERR_FILENO) { - atf::io::file_handle fh(m_results_fd); - m_results_os = - std::auto_ptr< std::ostream >(new atf::io::postream(fh)); - } - errcode = run_tcs(); - } - - return errcode; -} - -namespace atf { - namespace tests { - int run_tp(int, char* const*, void (*)(tp::tc_vector&)); - } -} - -int -impl::run_tp(int argc, char* const* argv, void (*add_tcs)(tp::tc_vector&)) -{ - return tp(add_tcs).run(argc, argv); -} diff --git a/dist/atf/atf-c++/tests.hpp b/dist/atf/atf-c++/tests.hpp deleted file mode 100644 index 3b68f8779c30..000000000000 --- a/dist/atf/atf-c++/tests.hpp +++ /dev/null @@ -1,134 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_TESTS_HPP_) -#define _ATF_CXX_TESTS_HPP_ - -#include -#include - -extern "C" { -#include -#include -} - -#include -#include - -namespace atf { -namespace tests { - -// ------------------------------------------------------------------------ -// The "vars_map" class. -// ------------------------------------------------------------------------ - -typedef std::map< std::string, std::string > vars_map; - -// ------------------------------------------------------------------------ -// The "tcr" class. -// ------------------------------------------------------------------------ - -//! -//! \brief Holds the results of a test case's execution. -//! -//! The tcr class holds the information that describes the results of a -//! test case's execution. This is composed of an exit code and a reason -//! for that exit code. -//! -//! TODO: Complete documentation for this class. Not done yet because it -//! is worth to investigate if this class could be rewritten as several -//! different classes, one for each status. -//! -class tcr { - atf_tcr_t m_tcr; - -public: - typedef atf_tcr_state_t state; - - static const state passed_state; - static const state failed_state; - static const state skipped_state; - - tcr(state); - tcr(state, const std::string&); - tcr(const tcr&); - ~tcr(void); - - state get_state(void) const; - const std::string get_reason(void) const; - - tcr& operator=(const tcr&); -}; - -// ------------------------------------------------------------------------ -// The "tc" class. -// ------------------------------------------------------------------------ - -class tc : public atf::utils::noncopyable { - std::string m_ident; - atf_map_t m_config; - atf_tc_t m_tc; - -protected: - virtual void head(void) = 0; - virtual void body(void) const = 0; - virtual void cleanup(void) const; - - void require_prog(const std::string&) const; - - static void wrap_head(atf_tc_t *); - static void wrap_body(const atf_tc_t *); - static void wrap_cleanup(const atf_tc_t *); - -public: - tc(const std::string&); - virtual ~tc(void); - - void init(const vars_map&); - - const std::string get_config_var(const std::string&) const; - const std::string get_config_var(const std::string&, const std::string&) - const; - const std::string get_md_var(const std::string&) const; - bool has_config_var(const std::string&) const; - bool has_md_var(const std::string&) const; - void set_md_var(const std::string&, const std::string&); - - tcr run(const fs::path&) const; - - /* To be called from the child process only. */ - static void pass(void); - static void fail(const std::string&); - static void skip(const std::string&); -}; - -} // namespace tests -} // namespace atf - -#endif // !defined(_ATF_CXX_TESTS_HPP_) diff --git a/dist/atf/atf-c++/text.cpp b/dist/atf/atf-c++/text.cpp deleted file mode 100644 index 8b99b95841df..000000000000 --- a/dist/atf/atf-c++/text.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -extern "C" { -#include "atf-c/text.h" -} - -#include "atf-c++/exceptions.hpp" -#include "atf-c++/text.hpp" - -namespace impl = atf::text; -#define IMPL_NAME "atf::text" - -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) -{ - bool b; - - atf_error_t err = atf_text_to_bool(str.c_str(), &b); - if (atf_is_error(err)) - throw_atf_error(err); - - return b; -} diff --git a/dist/atf/atf-c++/text.hpp b/dist/atf/atf-c++/text.hpp deleted file mode 100644 index 54385e59d7f0..000000000000 --- a/dist/atf/atf-c++/text.hpp +++ /dev/null @@ -1,131 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_TEXT_HPP_) -#define _ATF_CXX_TEXT_HPP_ - -#include -#include -#include -#include - -namespace atf { -namespace text { - -//! -//! \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 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 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.good())) - throw std::runtime_error("Cannot convert string to requested type"); - return value; -} - -} // namespace text -} // namespace atf - -#endif // !defined(_ATF_CXX_TEXT_HPP_) diff --git a/dist/atf/atf-c++/ui.cpp b/dist/atf/atf-c++/ui.cpp deleted file mode 100644 index 7259e688c846..000000000000 --- a/dist/atf/atf-c++/ui.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -extern "C" { -#include "atf-c/dynstr.h" -#include "atf-c/ui.h" -} - -#include "atf-c++/env.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/text.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/ui.hpp" - -namespace impl = atf::ui; -#define IMPL_NAME "atf::ui" - -std::string -impl::format_error(const std::string& prog_name, const std::string& error) -{ - return format_text_with_tag("ERROR: " + error, prog_name + ": ", true); -} - -std::string -impl::format_info(const std::string& prog_name, const std::string& msg) -{ - return format_text_with_tag(msg, prog_name + ": ", true); -} - -std::string -impl::format_text(const std::string& text) -{ - return format_text_with_tag(text, "", false, 0); -} - -std::string -impl::format_text_with_tag(const std::string& text, const std::string& tag, - bool repeat, size_t col) -{ - atf_dynstr_t dest; - atf_error_t err; - - err = atf_dynstr_init(&dest); - if (atf_is_error(err)) - throw_atf_error(err); - - try { - err = atf_ui_format_fmt(&dest, tag.c_str(), repeat, col, "%s", - text.c_str()); - if (atf_is_error(err)) - throw_atf_error(err); - - std::string formatted(atf_dynstr_cstring(&dest)); - atf_dynstr_fini(&dest); - return formatted; - } catch (...) { - atf_dynstr_fini(&dest); - throw; - } -} - -std::string -impl::format_warning(const std::string& prog_name, const std::string& error) -{ - return format_text_with_tag("WARNING: " + error, prog_name + ": ", true); -} diff --git a/dist/atf/atf-c++/ui.hpp b/dist/atf/atf-c++/ui.hpp deleted file mode 100644 index c51c839fc40a..000000000000 --- a/dist/atf/atf-c++/ui.hpp +++ /dev/null @@ -1,105 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_UI_HPP_) -#define _ATF_CXX_UI_HPP_ - -#include - -namespace atf { -namespace ui { - -//! -//! \brief Formats an error message to fit on screen. -//! -//! Given the program's name and an error message, properly formats it to -//! fit on screen. -//! -//! The program's name is not stored globally to prevent the usage of this -//! function from inside the library. Making it a explicit parameter -//! restricts its usage to the frontend. -//! -std::string format_error(const std::string&, const std::string&); - -//! -//! \brief Formats an informational message to fit on screen. -//! -//! Given the program's name and an informational message, properly formats -//! it to fit on screen. -//! -//! The program's name is not stored globally to prevent the usage of this -//! function from inside the library. Making it a explicit parameter -//! restricts its usage to the frontend. -//! -std::string format_info(const std::string&, const std::string&); - -//! -//! \brief Formats a block of text to fit nicely on screen. -//! -//! Given a text, which is composed of multiple paragraphs separated by -//! a single '\n' character, reformats it to fill on the current screen's -//! width with proper line wrapping. -//! -//! This is just a special case of format_text_with_tag, provided for -//! simplicity. -//! -std::string format_text(const std::string&); - -//! -//! \brief Formats a block of text to fit nicely on screen, prepending a -//! tag to it. -//! -//! Given a text, which is composed of multiple paragraphs separated by -//! a single '\n' character, reformats it to fill on the current screen's -//! width with proper line wrapping. The text is prepended with a tag; -//! i.e. a word that is printed at the beginning of the first paragraph and -//! optionally repeated at the beginning of each word. The last parameter -//! specifies the column on which the text should start, and that position -//! must be greater than the tag's length or 0, in which case it -//! automatically takes the correct value. -//! -std::string format_text_with_tag(const std::string&, const std::string&, - bool, size_t = 0); - -//! -//! \brief Formats a warning message to fit on screen. -//! -//! Given the program's name and a warning message, properly formats it to -//! fit on screen. -//! -//! The program's name is not stored globally to prevent the usage of this -//! function from inside the library. Making it a explicit parameter -//! restricts its usage to the frontend. -//! -std::string format_warning(const std::string&, const std::string&); - -} // namespace ui -} // namespace atf - -#endif // !defined(_ATF_CXX_UI_HPP_) diff --git a/dist/atf/atf-c++/user.cpp b/dist/atf/atf-c++/user.cpp deleted file mode 100644 index 22ce801d9aa0..000000000000 --- a/dist/atf/atf-c++/user.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c/user.h" -} - -#include "atf-c++/sanity.hpp" -#include "atf-c++/user.hpp" - -namespace impl = atf::user; -#define IMPL_NAME "atf::user" - -uid_t -impl::euid(void) -{ - return atf_user_euid(); -} - -bool -impl::is_member_of_group(gid_t gid) -{ - return atf_user_is_member_of_group(gid); -} - -bool -impl::is_root(void) -{ - return atf_user_is_root(); -} - -bool -impl::is_unprivileged(void) -{ - return atf_user_is_unprivileged(); -} diff --git a/dist/atf/atf-c++/user.hpp b/dist/atf/atf-c++/user.hpp deleted file mode 100644 index fe9291be0315..000000000000 --- a/dist/atf/atf-c++/user.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_USER_HPP_) -#define _ATF_CXX_USER_HPP_ - -extern "C" { -#include -} - -namespace atf { -namespace user { - -uid_t euid(void); -bool is_member_of_group(gid_t); -bool is_root(void); -bool is_unprivileged(void); - -} // namespace user -} // namespace atf - -#endif // !defined(_ATF_CXX_USER_HPP_) diff --git a/dist/atf/atf-c++/utils.hpp b/dist/atf/atf-c++/utils.hpp deleted file mode 100644 index df50fd29b62f..000000000000 --- a/dist/atf/atf-c++/utils.hpp +++ /dev/null @@ -1,148 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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_CXX_UTILS_HPP_) -#define _ATF_CXX_UTILS_HPP_ - -#include - -namespace atf { -namespace utils { - -// ------------------------------------------------------------------------ -// The "auto_array" class. -// ------------------------------------------------------------------------ - -template< class T > -class auto_array { - T* m_ptr; - -public: - auto_array(T* = NULL) throw(); - auto_array(auto_array< T >&) throw(); - ~auto_array(void) throw(); - - T* get(void) throw(); - T* release(void) throw(); - void reset(T* = NULL) throw(); - - auto_array< T >& operator=(auto_array< T >&) throw(); - T& operator[](int) 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(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 > -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 > -T& -auto_array< T >::operator[](int pos) - throw() -{ - return m_ptr[pos]; -} - -// ------------------------------------------------------------------------ -// The "noncopyable" class. -// ------------------------------------------------------------------------ - -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; - - noncopyable(const noncopyable& nc); - noncopyable& operator=(const noncopyable& nc); - -protected: - // Explicitly needed to provide some non-private functions. Otherwise - // we also get some warnings during the build. - noncopyable(void) {} - ~noncopyable(void) {} -}; - -} // namespace utils -} // namespace atf - -#endif // !defined(_ATF_CXX_UTILS_HPP_) diff --git a/dist/atf/atf-c.h b/dist/atf/atf-c.h deleted file mode 100644 index 0e893a2591b8..000000000000 --- a/dist/atf/atf-c.h +++ /dev/null @@ -1,35 +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_H) -#define ATF_C_H - -#include - -#endif /* !defined(ATF_C_H) */ diff --git a/dist/atf/atf-c/atf-c-api.3 b/dist/atf/atf-c/atf-c-api.3 deleted file mode 100644 index 504cfafa2f8b..000000000000 --- a/dist/atf/atf-c/atf-c-api.3 +++ /dev/null @@ -1,269 +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. -.\" -.Dd April 26, 2008 -.Dt ATF-C-API 3 -.Os -.Sh NAME -.Nm ATF_CHECK , -.Nm ATF_CHECK_EQUAL , -.Nm ATF_TC , -.Nm ATF_TC_BODY , -.Nm ATF_TC_BODY_NAME , -.Nm ATF_TC_CLEANUP , -.Nm ATF_TC_CLEANUP_NAME , -.Nm ATF_TC_HEAD , -.Nm ATF_TC_HEAD_NAME , -.Nm ATF_TC_NAME , -.Nm ATF_TC_WITH_CLEANUP , -.Nm ATF_TP_ADD_TC , -.Nm ATF_TP_ADD_TCS , -.Nm atf_no_error , -.Nm atf_tc_fail , -.Nm atf_tc_pass , -.Nm atf_tc_skip -.Nd C API to write ATF-based test programs -.Sh SYNOPSIS -.In atf-c.h -.Fn ATF_CHECK "expression" -.Fn ATF_CHECK_EQUAL "expression_1" "expression_2" -.Fn ATF_TC "name" -.Fn ATF_TC_BODY "name" -.Fn ATF_TC_BODY_NAME "name" -.Fn ATF_TC_CLEANUP "name" -.Fn ATF_TC_CLEANUP_NAME "name" -.Fn ATF_TC_HEAD "name" -.Fn ATF_TC_HEAD_NAME "name" -.Fn ATF_TC_NAME "name" -.Fn ATF_TC_WITH_CLEANUP "name" -.Fn ATF_TP_ADD_TC "tp_name" -.Fn ATF_TP_ADD_TCS "tp_name" "tc_name" -.Fn atf_no_error -.Fn atf_tc_fail "reason" -.Fn atf_tc_pass -.Fn atf_tc_skip "reason" -.Sh DESCRIPTION -The ATF -.Pp -C-based test programs always follow this template: -.Bd -literal -offset indent -.Ns ... C-specific includes go here ... - -#include - -ATF_TC(tc1); -ATF_TC_HEAD(tc1) -{ - ... first test case's header ... -} -ATF_TC_BODY(tc1) -{ - ... first test case's body ... -} - -ATF_TC_WITH_CLEANUP(tc2); -ATF_TC_HEAD(tc2) -{ - ... second test case's header ... -} -ATF_TC_BODY(tc2) -{ - ... second test case's body ... -} -ATF_TC_CLEANUP(tc2) -{ - ... second test case's cleanup ... -} - -.Ns ... additional test cases ... - -ATF_TP_ADD_TCS(tp, tcs) -{ - ATF_TP_ADD_TC(tcs, tc1) - ATF_TP_ADD_TC(tcs, tc2) - ... add additional test cases ... - - return atf_no_error(); -} -.Ed -.Ss Definition of test cases -Test cases have an identifier and are composed of three different parts: -the header, the body and an optional cleanup routine, all of which are -described in -.Xr atf-test-case 8 . -To define test cases, one can use the -.Fn ATF_TC -or the -.Fn ATF_TC_WITH_CLEANUP -macros, which take a single parameter specifiying the test case's name. -The former does not allow the specification of a cleanup routine for the -test case while the latter does. -It is important to note that these -.Em do not -set the test case up for execution when the program is run. -In order to do so, a later registration is needed with the -.Fn ATF_TP_ADD_TC -macro detailed in -.Sx Program initialization . -.Pp -Later on, one must define the three parts of the body by means of three -functions. -Their headers are given by the -.Fn ATF_TC_HEAD , -.Fn ATF_TC_BODY -and -.Fn ATF_TC_CLEANUP -macros, all of which take the test case name provided to the -.Fn ATF_TC -or -.Fn ATF_TC_WITH_CLEANUP -macros. -Following each of these, a block of code is expected, surrounded by the -opening and closing brackets. -.Ss Program initialization -The library provides a way to easily define the test program's -.Fn main -function. -You should never define one on your own, but rely on the -library to do it for you. -This is done by using the -.Fn ATF_TP_ADD_TCS -macro, which is passed the name of the object that will hold the test -cases; i.e. the test program instance. -This name can be whatever you want as long as it is a valid variable -identifier. -.Pp -After the macro, you are supposed to provide the body of a function, which -should only use the -.Fn ATF_TP_ADD_TC -macro to register the test cases the test program will execute and return -a success error code. -The first parameter of this macro matches the name you provided in the -former call. -The success status can be returned using the -.Fn atf_no_error -function. -.Ss Header definitions -The test case's header can define the meta-data by using the -.Fn atf_tc_set_md_var -method, which takes two parameters: the first one specifies the -meta-data variable to be set and the second one specifies its value. -Both of them are strings. -.Ss Configuration variables -The test case has read-only access to the current configuration variables -by means of the -.Ft bool -.Fn atf_tc_has_config_var -and the -.Ft const char * -.Fn atf_tc_get_config_var -methods, which can be called in any of the three parts of a test case. -.Ss Access to the source directory -It is possible to get the path to the test case's source directory from any -of its three components by querying the -.Sq srcdir -configuration variable. -.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_tc_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. -.Ss Test case finalization -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_tc_pass , -.Fn atf_tc_fail -or -.Fn atf_tc_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_tc_pass -does not take any parameters. -.Fn atf_tc_fail -and -.Fn atf_tc_skip -take a single string 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 -the user can quickly know why the test did not pass. -.Ss Helper macros for common checks -The library provides several macros that are very handy in multiple -situations. -These basically check some condition after executing a given statement or -processing a given expression and, if the condition is not met, they -automatically call -.Fn atf_tc_fail -with an appropriate error message. -.Pp -.Fn ATF_CHECK -takes an expression and raises a failure if it evaluates to false. -.Pp -.Fn ATF_CHECK_EQUAL -takes two expressions and raises a failure if the two do not evaluate to -the same exact value. -.Sh EXAMPLES -The following shows a complete test program with a single test case that -validates the addition operator: -.Bd -literal -offset indent -#include - -ATF_TC(addition); -ATF_TC_HEAD(addition) -{ - atf_tc_set_md_var("descr", "Sample tests for the addition operator"); -} -ATF_TC_BODY(addition) -{ - ATF_CHECK_EQUAL(0 + 0, 0); - ATF_CHECK_EQUAL(0 + 1, 1); - ATF_CHECK_EQUAL(1 + 0, 1); - - ATF_CHECK_EQUAL(1 + 1, 2); - - ATF_CHECK_EQUAL(100 + 200, 300); -} - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, addition); - - return atf_no_error(); -} -.Ed -.Sh SEE ALSO -.Xr atf-test-program 1 , -.Xr atf 7 , -.Xr atf-test-case 8 diff --git a/dist/atf/atf-c/config.c b/dist/atf/atf-c/config.c deleted file mode 100644 index c33eab66a690..000000000000 --- a/dist/atf/atf-c/config.c +++ /dev/null @@ -1,135 +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 "atf-c/config.h" -#include "atf-c/env.h" -#include "atf-c/sanity.h" - -static bool initialized = false; -static const char *atf_arch = NULL; -static const char *atf_confdir = NULL; -static const char *atf_libexecdir = NULL; -static const char *atf_machine = NULL; -static const char *atf_pkgdatadir = NULL; -static const char *atf_shell = NULL; -static const char *atf_workdir = NULL; - -/* Only used for unit testing, so this prototype is private. */ -void __atf_config_reinit(void); - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -void -initialize_var(char const **valptr, const char *name, const char *def) -{ - PRE(*valptr == NULL); - - if (atf_env_has(name)) { - const char *val = atf_env_get(name); - if (strlen(val) > 0) - *valptr = val; - else - *valptr = def; - } else - *valptr = def; - - POST(*valptr != NULL); -} - -static -void -initialize(void) -{ - PRE(!initialized); - - initialize_var(&atf_arch, "ATF_ARCH", ATF_ARCH); - initialize_var(&atf_confdir, "ATF_CONFDIR", ATF_CONFDIR); - initialize_var(&atf_libexecdir, "ATF_LIBEXECDIR", ATF_LIBEXECDIR); - initialize_var(&atf_machine, "ATF_MACHINE", ATF_MACHINE); - initialize_var(&atf_pkgdatadir, "ATF_PKGDATADIR", ATF_PKGDATADIR); - initialize_var(&atf_shell, "ATF_SHELL", ATF_SHELL); - initialize_var(&atf_workdir, "ATF_WORKDIR", ATF_WORKDIR); - - initialized = true; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -const char * -atf_config_get(const char *var) -{ - const char *value; - - if (!initialized) { - initialize(); - INV(initialized); - } - - if (strcmp(var, "atf_arch") == 0) - value = atf_arch; - else if (strcmp(var, "atf_confdir") == 0) - value = atf_confdir; - else if (strcmp(var, "atf_libexecdir") == 0) - value = atf_libexecdir; - else if (strcmp(var, "atf_machine") == 0) - value = atf_machine; - else if (strcmp(var, "atf_pkgdatadir") == 0) - value = atf_pkgdatadir; - else if (strcmp(var, "atf_shell") == 0) - value = atf_shell; - else if (strcmp(var, "atf_workdir") == 0) - value = atf_workdir; - else { - UNREACHABLE; - value = NULL; - } - - return value; -} - -void -__atf_config_reinit(void) -{ - initialized = false; - atf_arch = NULL; - atf_confdir = NULL; - atf_libexecdir = NULL; - atf_machine = NULL; - atf_pkgdatadir = NULL; - atf_shell = NULL; - atf_workdir = NULL; -} diff --git a/dist/atf/atf-c/config.h b/dist/atf/atf-c/config.h deleted file mode 100644 index 19b86e2c2f65..000000000000 --- a/dist/atf/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/dist/atf/atf-c/defs.h.in b/dist/atf/atf-c/defs.h.in deleted file mode 100644 index 98ce9da9301d..000000000000 --- a/dist/atf/atf-c/defs.h.in +++ /dev/null @@ -1,35 +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_DEFS_H) -#define ATF_C_DEFS_H - -#define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@ - -#endif /* !defined(ATF_C_DEFS_H) */ diff --git a/dist/atf/atf-c/dynstr.c b/dist/atf/atf-c/dynstr.c deleted file mode 100644 index 911a2b632359..000000000000 --- a/dist/atf/atf-c/dynstr.c +++ /dev/null @@ -1,392 +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 - -#include "atf-c/dynstr.h" -#include "atf-c/sanity.h" -#include "atf-c/text.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -atf_error_t -resize(atf_dynstr_t *ad, size_t newsize) -{ - char *newdata; - atf_error_t err; - - PRE(newsize > ad->m_datasize); - - newdata = (char *)malloc(newsize); - if (newdata == NULL) { - err = atf_no_memory_error(); - } else { - strcpy(newdata, ad->m_data); - free(ad->m_data); - ad->m_data = newdata; - ad->m_datasize = newsize; - err = atf_no_error(); - } - - return err; -} - -static -atf_error_t -prepend_or_append(atf_dynstr_t *ad, const char *fmt, va_list ap, - bool prepend) -{ - char *aux; - atf_error_t err; - size_t newlen; - va_list ap2; - - va_copy(ap2, ap); - err = atf_text_format_ap(&aux, fmt, ap2); - va_end(ap2); - if (atf_is_error(err)) - goto out; - newlen = ad->m_length + strlen(aux); - - if (newlen + sizeof(char) > ad->m_datasize) { - err = resize(ad, newlen + sizeof(char)); - if (atf_is_error(err)) - goto out_free; - } - - if (prepend) { - memmove(ad->m_data + strlen(aux), ad->m_data, ad->m_length + 1); - memcpy(ad->m_data, aux, strlen(aux)); - } else - strcpy(ad->m_data + ad->m_length, aux); - ad->m_length = newlen; - err = atf_no_error(); - -out_free: - free(aux); -out: - return err; -} - -/* --------------------------------------------------------------------- - * The "atf_dynstr" type. - * --------------------------------------------------------------------- */ - -/* - * Constants. - */ - -const size_t atf_dynstr_npos = SIZE_MAX; - -/* - * Constructors and destructors. - */ - -atf_error_t -atf_dynstr_init(atf_dynstr_t *ad) -{ - atf_error_t err; - - atf_object_init(&ad->m_object); - - ad->m_data = (char *)malloc(sizeof(char)); - if (ad->m_data == NULL) { - err = atf_no_memory_error(); - } else { - ad->m_data[0] = '\0'; - ad->m_datasize = 1; - ad->m_length = 0; - err = atf_no_error(); - } - - return err; -} - -atf_error_t -atf_dynstr_init_ap(atf_dynstr_t *ad, const char *fmt, va_list ap) -{ - atf_error_t err; - - atf_object_init(&ad->m_object); - - ad->m_datasize = strlen(fmt) + 1; - ad->m_length = 0; - - err = atf_no_error(); - do { - ad->m_datasize *= 2; - ad->m_data = (char *)malloc(ad->m_datasize); - if (ad->m_data == NULL) { - err = atf_no_memory_error(); - } else { - va_list ap2; - int ret; - - va_copy(ap2, ap); - ret = vsnprintf(ad->m_data, ad->m_datasize, fmt, ap2); - va_end(ap2); - if (ret < 0) { - err = atf_libc_error(errno, "Cannot format string"); - } else { - if (ret >= ad->m_datasize) { - free(ad->m_data); - ad->m_data = NULL; - } - ad->m_length = ret; - } - } - } while (!atf_is_error(err) && ad->m_length >= ad->m_datasize); - - POST(atf_is_error(err) || ad->m_data != NULL); - return err; -} - -atf_error_t -atf_dynstr_init_fmt(atf_dynstr_t *ad, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_dynstr_init_ap(ad, fmt, ap); - va_end(ap); - - return err; -} - -atf_error_t -atf_dynstr_init_raw(atf_dynstr_t *ad, const void *mem, size_t memlen) -{ - atf_error_t err; - - atf_object_init(&ad->m_object); - - ad->m_data = (char *)malloc(memlen + 1); - if (ad->m_data == NULL) - err = atf_no_memory_error(); - else { - ad->m_datasize = memlen + 1; - memcpy(ad->m_data, mem, memlen); - ad->m_data[memlen] = '\0'; - ad->m_length = strlen(ad->m_data); - INV(ad->m_length <= memlen); - err = atf_no_error(); - } - - return err; -} - -atf_error_t -atf_dynstr_init_rep(atf_dynstr_t *ad, size_t len, char ch) -{ - atf_error_t err; - - atf_object_init(&ad->m_object); - - if (len == SIZE_MAX) - err = atf_no_memory_error(); - else { - ad->m_datasize = len + sizeof(char); - ad->m_data = (char *)malloc(ad->m_datasize); - if (ad->m_data == NULL) { - err = atf_no_memory_error(); - } else { - memset(ad->m_data, ch, len); - ad->m_data[len] = '\0'; - ad->m_length = len; - err = atf_no_error(); - } - } - - return err; -} - -atf_error_t -atf_dynstr_init_substr(atf_dynstr_t *ad, const atf_dynstr_t *src, - size_t beg, size_t end) -{ - if (beg > src->m_length) - beg = src->m_length; - - if (end == atf_dynstr_npos || end > src->m_length) - end = src->m_length; - - return atf_dynstr_init_raw(ad, src->m_data + beg, end - beg); -} - -atf_error_t -atf_dynstr_copy(atf_dynstr_t *dest, const atf_dynstr_t *src) -{ - atf_error_t err; - - atf_object_copy(&dest->m_object, &src->m_object); - - dest->m_data = (char *)malloc(src->m_datasize); - if (dest->m_data == NULL) - err = atf_no_memory_error(); - else { - memcpy(dest->m_data, src->m_data, src->m_datasize); - dest->m_datasize = src->m_datasize; - dest->m_length = src->m_length; - err = atf_no_error(); - } - - return err; -} - -void -atf_dynstr_fini(atf_dynstr_t *ad) -{ - INV(ad->m_data != NULL); - free(ad->m_data); - - atf_object_fini(&ad->m_object); -} - -char * -atf_dynstr_fini_disown(atf_dynstr_t *ad) -{ - atf_object_fini(&ad->m_object); - - INV(ad->m_data != NULL); - return ad->m_data; -} - -/* - * Getters. - */ - -const char * -atf_dynstr_cstring(const atf_dynstr_t *ad) -{ - return ad->m_data; -} - -size_t -atf_dynstr_length(atf_dynstr_t *ad) -{ - return ad->m_length; -} - -size_t -atf_dynstr_rfind_ch(const atf_dynstr_t *ad, char ch) -{ - size_t pos; - - for (pos = ad->m_length; pos > 0 && ad->m_data[pos - 1] != ch; pos--) - ; - - return pos == 0 ? atf_dynstr_npos : pos - 1; -} - -/* - * Modifiers. - */ - -atf_error_t -atf_dynstr_append_ap(atf_dynstr_t *ad, const char *fmt, va_list ap) -{ - atf_error_t err; - va_list ap2; - - va_copy(ap2, ap); - err = prepend_or_append(ad, fmt, ap2, false); - va_end(ap2); - - return err; -} - -atf_error_t -atf_dynstr_append_fmt(atf_dynstr_t *ad, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = prepend_or_append(ad, fmt, ap, false); - va_end(ap); - - return err; -} - -void -atf_dynstr_clear(atf_dynstr_t *ad) -{ - ad->m_data[0] = '\0'; - ad->m_length = 0; -} - -atf_error_t -atf_dynstr_prepend_ap(atf_dynstr_t *ad, const char *fmt, va_list ap) -{ - atf_error_t err; - va_list ap2; - - va_copy(ap2, ap); - err = prepend_or_append(ad, fmt, ap2, true); - va_end(ap2); - - return err; -} - -atf_error_t -atf_dynstr_prepend_fmt(atf_dynstr_t *ad, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = prepend_or_append(ad, fmt, ap, true); - va_end(ap); - - return err; -} - -/* - * Operators. - */ - -bool -atf_equal_dynstr_cstring(const atf_dynstr_t *ad, const char *str) -{ - return strcmp(ad->m_data, str) == 0; -} - -bool -atf_equal_dynstr_dynstr(const atf_dynstr_t *s1, const atf_dynstr_t *s2) -{ - return strcmp(s1->m_data, s2->m_data) == 0; -} diff --git a/dist/atf/atf-c/dynstr.h b/dist/atf/atf-c/dynstr.h deleted file mode 100644 index bd596cbb85db..000000000000 --- a/dist/atf/atf-c/dynstr.h +++ /dev/null @@ -1,82 +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_DYNSTR_H) -#define ATF_C_DYNSTR_H - -#include - -#include -#include - -/* --------------------------------------------------------------------- - * The "atf_dynstr" type. - * --------------------------------------------------------------------- */ - -struct atf_dynstr { - atf_object_t m_object; - - char *m_data; - size_t m_datasize; - size_t m_length; -}; -typedef struct atf_dynstr atf_dynstr_t; - -/* Constants */ -extern const size_t atf_dynstr_npos; - -/* Constructors and destructors */ -atf_error_t atf_dynstr_init(atf_dynstr_t *); -atf_error_t atf_dynstr_init_ap(atf_dynstr_t *, const char *, va_list); -atf_error_t atf_dynstr_init_fmt(atf_dynstr_t *, const char *, ...); -atf_error_t atf_dynstr_init_raw(atf_dynstr_t *, const void *, size_t); -atf_error_t atf_dynstr_init_rep(atf_dynstr_t *, size_t, char); -atf_error_t atf_dynstr_init_substr(atf_dynstr_t *, const atf_dynstr_t *, - size_t, size_t); -atf_error_t atf_dynstr_copy(atf_dynstr_t *, const atf_dynstr_t *); -void atf_dynstr_fini(atf_dynstr_t *); -char *atf_dynstr_fini_disown(atf_dynstr_t *); - -/* Getters */ -const char *atf_dynstr_cstring(const atf_dynstr_t *); -size_t atf_dynstr_length(atf_dynstr_t *); -size_t atf_dynstr_rfind_ch(const atf_dynstr_t *, char); - -/* Modifiers */ -atf_error_t atf_dynstr_append_ap(atf_dynstr_t *, const char *, va_list); -atf_error_t atf_dynstr_append_fmt(atf_dynstr_t *, const char *, ...); -void atf_dynstr_clear(atf_dynstr_t *); -atf_error_t atf_dynstr_prepend_ap(atf_dynstr_t *, const char *, va_list); -atf_error_t atf_dynstr_prepend_fmt(atf_dynstr_t *, const char *, ...); - -/* Operators */ -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 */ diff --git a/dist/atf/atf-c/env.c b/dist/atf/atf-c/env.c deleted file mode 100644 index 718d6d726b12..000000000000 --- a/dist/atf/atf-c/env.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include -#include - -#include "atf-c/env.h" -#include "atf-c/sanity.h" -#include "atf-c/text.h" - -const char * -atf_env_get(const char *name) -{ - const char* val = getenv(name); - PRE(val != NULL); - return val; -} - -bool -atf_env_has(const char *name) -{ - return getenv(name) != NULL; -} - -atf_error_t -atf_env_set(const char *name, const char *val) -{ - atf_error_t err; - -#if defined(HAVE_SETENV) - if (setenv(name, val, 1) == -1) - err = atf_libc_error(errno, "Cannot set environment variable " - "'%s' to '%s'", name, val); - else - err = atf_no_error(); -#elif defined(HAVE_PUTENV) - char *buf; - - err = atf_text_format(&buf, "%s=%s", name, val); - if (!atf_is_error(err)) { - if (putenv(buf) == -1) - err = atf_libc_error(errno, "Cannot set environment variable " - "'%s' to '%s'", name, val); - free(buf); - } -#else -# error "Don't know how to set an environment variable." -#endif - - return err; -} - -atf_error_t -atf_env_unset(const char *name) -{ - atf_error_t err; - -#if defined(HAVE_UNSETENV) - unsetenv(name); - err = atf_no_error(); -#elif defined(HAVE_PUTENV) - char *buf; - - err = atf_text_format(&buf, "%s=", name); - if (!atf_is_error(err)) { - if (putenv(buf) == -1) - err = atf_libc_error(errno, "Cannot unset environment variable" - " '%s'", name); - free(buf); - } -#else -# error "Don't know how to unset an environment variable." -#endif - - return err; -} diff --git a/dist/atf/atf-c/env.h b/dist/atf/atf-c/env.h deleted file mode 100644 index 607f778f0552..000000000000 --- a/dist/atf/atf-c/env.h +++ /dev/null @@ -1,42 +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_ENV_H) -#define ATF_C_ENV_H - -#include - -#include - -const char *atf_env_get(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) */ diff --git a/dist/atf/atf-c/error.c b/dist/atf/atf-c/error.c deleted file mode 100644 index 7e3f41487254..000000000000 --- a/dist/atf/atf-c/error.c +++ /dev/null @@ -1,242 +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/error.h" -#include "atf-c/sanity.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -void -error_format(const atf_error_t err, char *buf, size_t buflen) -{ - PRE(err != NULL); - snprintf(buf, buflen, "Error '%s'", err->m_type); -} - -static -bool -error_init(atf_error_t err, const char *type, void *data, size_t datalen, - void (*format)(const atf_error_t, char *, size_t)) -{ - bool ok; - - PRE(data != NULL || datalen == 0); - PRE(datalen != 0 || data == NULL); - - atf_object_init(&err->m_object); - - err->m_free = false; - err->m_type = type; - err->m_format = (format == NULL) ? error_format : format; - - ok = true; - if (data == NULL) { - err->m_data = NULL; - } else { - err->m_data = malloc(datalen); - if (err->m_data == NULL) - ok = false; - else - memcpy(err->m_data, data, datalen); - } - - return ok; -} - -/* --------------------------------------------------------------------- - * The "atf_error" type. - * --------------------------------------------------------------------- */ - -atf_error_t -atf_error_new(const char *type, void *data, size_t datalen, - void (*format)(const atf_error_t, char *, size_t)) -{ - atf_error_t err; - - PRE(data != NULL || datalen == 0); - PRE(datalen != 0 || data == NULL); - - err = malloc(sizeof(*err)); - if (err == NULL) - err = atf_no_memory_error(); - else { - if (!error_init(err, type, data, datalen, format)) { - free(err); - err = atf_no_memory_error(); - } else - err->m_free = true; - } - - INV(err != NULL); - return err; -} - -void -atf_error_free(atf_error_t err) -{ - bool freeit; - - PRE(err != NULL); - - freeit = err->m_free; - - if (err->m_data != NULL) - free(err->m_data); - - atf_object_fini(&err->m_object); - - if (freeit) - free(err); -} - -atf_error_t -atf_no_error(void) -{ - return NULL; -} - -bool -atf_is_error(const atf_error_t err) -{ - return err != NULL; -} - -bool -atf_error_is(const atf_error_t err, const char *type) -{ - PRE(err != NULL); - - return strcmp(err->m_type, type) == 0; -} - -const void * -atf_error_data(const atf_error_t err) -{ - PRE(err != NULL); - - return err->m_data; -} - -void -atf_error_format(const atf_error_t err, char *buf, size_t buflen) -{ - PRE(err != NULL); - err->m_format(err, buf, buflen); -} - -/* --------------------------------------------------------------------- - * Common error types. - * --------------------------------------------------------------------- */ - -/* - * The "libc" error. - */ - -struct atf_libc_error_data { - int m_errno; - char m_what[4096]; -}; -typedef struct atf_libc_error_data atf_libc_error_data_t; - -static -void -libc_format(const atf_error_t err, char *buf, size_t buflen) -{ - const atf_libc_error_data_t *data; - - PRE(atf_error_is(err, "libc")); - - data = atf_error_data(err); - snprintf(buf, buflen, "%s: %s", data->m_what, strerror(data->m_errno)); -} - -atf_error_t -atf_libc_error(int syserrno, const char *fmt, ...) -{ - atf_error_t err; - atf_libc_error_data_t data; - va_list ap; - - data.m_errno = syserrno; - va_start(ap, fmt); - vsnprintf(data.m_what, sizeof(data.m_what), fmt, ap); - va_end(ap); - - err = atf_error_new("libc", &data, sizeof(data), libc_format); - - return err; -} - -int -atf_libc_error_code(const atf_error_t err) -{ - const struct atf_libc_error_data *data; - - PRE(atf_error_is(err, "libc")); - - data = atf_error_data(err); - - return data->m_errno; -} - -/* - * The "no_memory" error. - */ - -static bool no_memory_error_inited = false; -static struct atf_error no_memory_error; - -static -void -no_memory_format(const atf_error_t err, char *buf, size_t buflen) -{ - PRE(atf_error_is(err, "no_memory")); - - snprintf(buf, buflen, "Not enough memory"); -} - -atf_error_t -atf_no_memory_error(void) -{ - if (!no_memory_error_inited) { - error_init(&no_memory_error, "no_memory", NULL, 0, - no_memory_format); - no_memory_error_inited = true; - } - - return &no_memory_error; -} diff --git a/dist/atf/atf-c/error.h b/dist/atf/atf-c/error.h deleted file mode 100644 index 08974a654958..000000000000 --- a/dist/atf/atf-c/error.h +++ /dev/null @@ -1,70 +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_ERROR_H) -#define ATF_C_ERROR_H - -#include - -/* --------------------------------------------------------------------- - * The "atf_error" type. - * --------------------------------------------------------------------- */ - -struct atf_error { - atf_object_t m_object; - - bool m_free; - const char *m_type; - void *m_data; - - void (*m_format)(struct atf_error *, char *, size_t); -}; -typedef struct atf_error *atf_error_t; - -atf_error_t atf_error_new(const char *, void *, size_t, - void (*)(const atf_error_t, char *, size_t)); -void atf_error_free(atf_error_t); - -atf_error_t atf_no_error(void); -bool atf_is_error(const atf_error_t); - -bool atf_error_is(const atf_error_t, const char *); -const void *atf_error_data(const atf_error_t); -void atf_error_format(const atf_error_t, char *, size_t); - -/* --------------------------------------------------------------------- - * Common error types. - * --------------------------------------------------------------------- */ - -atf_error_t atf_libc_error(int, const char *, ...); -int atf_libc_error_code(const atf_error_t); - -atf_error_t atf_no_memory_error(void); - -#endif /* ATF_C_ERROR_H */ diff --git a/dist/atf/atf-c/expand.c b/dist/atf/atf-c/expand.c deleted file mode 100644 index e87c70c06c9b..000000000000 --- a/dist/atf/atf-c/expand.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 "atf-c/dynstr.h" -#include "atf-c/expand.h" -#include "atf-c/sanity.h" - -/* REG_BASIC is just a synonym for 0, provided as a counterpart to - * REG_EXTENDED to improve readability. It is not provided by all - * systems. */ -#if !defined(REG_BASIC) -#define REG_BASIC 0 -#endif /* !defined(REG_BASIC) */ - -/* --------------------------------------------------------------------- - * The "pattern" error type. - * --------------------------------------------------------------------- */ - -struct pattern_error_data { - int m_errcode; - regex_t m_preg; -}; -typedef struct pattern_error_data pattern_error_data_t; - -static -void -pattern_format(const atf_error_t err, char *buf, size_t buflen) -{ - const pattern_error_data_t *data; - char tmp[4096]; - - PRE(atf_error_is(err, "pattern")); - - data = atf_error_data(err); - regerror(data->m_errcode, &data->m_preg, tmp, sizeof(tmp)); - snprintf(buf, buflen, "Regular expression error: %s", tmp); -} - -static -atf_error_t -pattern_error(int errcode, const regex_t* preg) -{ - atf_error_t err; - pattern_error_data_t data; - - data.m_errcode = errcode; - data.m_preg = *preg; - - err = atf_error_new("pattern", &data, sizeof(data), pattern_format); - - return err; -} - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -atf_error_t -glob_to_regex(const char *glob, atf_dynstr_t *regex) -{ - atf_error_t err; - - err = atf_dynstr_init_fmt(regex, "^"); - - for (; !atf_is_error(err) && *glob != '\0'; glob++) { - if (*glob == '*') - err = atf_dynstr_append_fmt(regex, ".*"); - else if (*glob == '?') - err = atf_dynstr_append_fmt(regex, "."); - else - err = atf_dynstr_append_fmt(regex, "%c", *glob); - } - - if (!atf_is_error(err)) - err = atf_dynstr_append_fmt(regex, "$"); - - if (atf_is_error(err)) - atf_dynstr_fini(regex); - - return err; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -bool -atf_expand_is_glob(const char *glob) -{ - /* NOTE: Keep this in sync with glob_to_regex! */ - return (strchr(glob, '*') != NULL) || (strchr(glob, '?') != NULL); -} - -atf_error_t -atf_expand_matches_glob(const char *glob, const char *candidate, - bool *result) -{ - atf_dynstr_t regex; - atf_error_t err; - int res; - regex_t preg; - - /* Special case: regcomp does not like empty patterns. */ - if (glob[0] == '\0') { - *result = candidate[0] == '\0'; - err = atf_no_error(); - goto out; - } - - /* Convert the glob pattern into a regular expression. */ - err = glob_to_regex(glob, ®ex); - if (atf_is_error(err)) - goto out; - - /* Compile the regular expression. */ - res = regcomp(&preg, atf_dynstr_cstring(®ex), REG_BASIC); - if (res != 0) { - err = pattern_error(res, &preg); - goto out; - } - - /* Check match. */ - res = regexec(&preg, candidate, 0, NULL, 0); - if (res != 0 && res != REG_NOMATCH) { - err = pattern_error(res, &preg); - goto out; - } else { - *result = (res == 0); - INV(!atf_is_error(err)); - } - - atf_dynstr_fini(®ex); -out: - return err; -} diff --git a/dist/atf/atf-c/expand.h b/dist/atf/atf-c/expand.h deleted file mode 100644 index 347da01e4a05..000000000000 --- a/dist/atf/atf-c/expand.h +++ /dev/null @@ -1,44 +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_EXPAND_H) -#define ATF_C_EXPAND_H - -#include - -#include - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -bool atf_expand_is_glob(const char *); -atf_error_t atf_expand_matches_glob(const char *, const char *, bool *); - -#endif /* ATF_C_EXPAND_H */ diff --git a/dist/atf/atf-c/fs.c b/dist/atf/atf-c/fs.c deleted file mode 100644 index c973e916f7da..000000000000 --- a/dist/atf/atf-c/fs.c +++ /dev/null @@ -1,828 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "atf-c/fs.h" -#include "atf-c/sanity.h" -#include "atf-c/text.h" -#include "atf-c/user.h" - -/* --------------------------------------------------------------------- - * The "child" error type. - * --------------------------------------------------------------------- */ - -/* XXX The need for this conditional here is extremely ugly. This - * exception should belong to another module with more process-related - * utilities. */ -#if !defined(HAVE_UNMOUNT) -struct child_error_data { - char m_cmd[4096]; - int m_state; -}; -typedef struct child_error_data child_error_data_t; - -static -void -child_format(const atf_error_t err, char *buf, size_t buflen) -{ - const child_error_data_t *data; - - PRE(atf_error_is(err, "child")); - - data = atf_error_data(err); - snprintf(buf, buflen, "Unknown error while executing \"%s\"; " - "exit state was %d", data->m_cmd, data->m_state); -} - -static -atf_error_t -child_error(const char *cmd, int state) -{ - atf_error_t err; - child_error_data_t data; - - snprintf(data.m_cmd, sizeof(data.m_cmd), "%s", cmd); - data.m_state = state; - - err = atf_error_new("child", &data, sizeof(data), child_format); - - return err; -} -#endif /* !defined(HAVE_UNMOUNT) */ - -/* --------------------------------------------------------------------- - * The "unknown_file_type" error type. - * --------------------------------------------------------------------- */ - -struct unknown_type_error_data { - const char *m_path; - int m_type; -}; -typedef struct unknown_type_error_data unknown_type_error_data_t; - -static -void -unknown_type_format(const atf_error_t err, char *buf, size_t buflen) -{ - const unknown_type_error_data_t *data; - - PRE(atf_error_is(err, "unknown_type")); - - data = atf_error_data(err); - snprintf(buf, buflen, "Unknown file type %d of %s", data->m_type, - data->m_path); -} - -static -atf_error_t -unknown_type_error(const char *path, int type) -{ - atf_error_t err; - unknown_type_error_data_t data; - - data.m_path = path; - data.m_type = type; - - err = atf_error_new("unknown_type", &data, sizeof(data), - unknown_type_format); - - return err; -} - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static atf_error_t cleanup_aux(const atf_fs_path_t *, dev_t, bool); -static atf_error_t cleanup_aux_dir(const char *, dev_t, bool); -static atf_error_t do_unmount(const atf_fs_path_t *); -static atf_error_t normalize(atf_dynstr_t *, char *); -static atf_error_t normalize_ap(atf_dynstr_t *, const char *, va_list); - -/* 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 -atf_error_t -cleanup_aux(const atf_fs_path_t *p, dev_t parent_device, bool erase) -{ - const char *pstr = atf_fs_path_cstring(p); - atf_error_t err; - atf_fs_stat_t st; - - err = atf_fs_stat_init(&st, p); - if (atf_is_error(err)) - goto out; - - if (atf_fs_stat_get_type(&st) == atf_fs_stat_dir_type) { - err = cleanup_aux_dir(pstr, atf_fs_stat_get_device(&st), - atf_fs_stat_get_device(&st) == parent_device); - if (atf_is_error(err)) - goto out_st; - } - - if (atf_fs_stat_get_device(&st) != parent_device) { - err = do_unmount(p); - if (atf_is_error(err)) - goto out_st; - } - - if (erase) { - if (atf_fs_stat_get_type(&st) == atf_fs_stat_dir_type) { - if (rmdir(pstr) == -1) - err = atf_libc_error(errno, "Cannot remove directory " - "%s", pstr); - else - INV(!atf_is_error(err)); - } else { - if (unlink(pstr) == -1) - err = atf_libc_error(errno, "Cannot remove file %s", pstr); - else - INV(!atf_is_error(err)); - } - } - -out_st: - atf_fs_stat_fini(&st); -out: - return err; -} - -static -atf_error_t -cleanup_aux_dir(const char *pstr, dev_t this_device, bool erase) -{ - DIR *d; - atf_error_t err; - struct dirent *de; - - d = opendir(pstr); - if (d == NULL) { - err = atf_libc_error(errno, "Cannot open directory %s", pstr); - goto out; - } - - err = atf_no_error(); - while (!atf_is_error(err) && (de = readdir(d)) != NULL) { - atf_fs_path_t p; - - err = atf_fs_path_init_fmt(&p, "%s/%s", pstr, de->d_name); - if (!atf_is_error(err)) { - if (strcmp(de->d_name, ".") != 0 && - strcmp(de->d_name, "..") != 0) - err = cleanup_aux(&p, this_device, erase); - - atf_fs_path_fini(&p); - } - } - - closedir(d); - -out: - return err; -} - -static -atf_error_t -do_unmount(const atf_fs_path_t *p) -{ - atf_error_t err; - atf_fs_path_t pa; - const char *pastr; - - /* 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. */ - - if (!atf_fs_path_is_absolute(p)) - err = atf_fs_path_to_absolute(p, &pa); - else - err = atf_fs_path_copy(&pa, p); - if (atf_is_error(err)) - goto out; - pastr = atf_fs_path_cstring(&pa); - -#if defined(HAVE_UNMOUNT) - if (unmount(pastr, 0) == -1) - err = atf_libc_error(errno, "Cannot unmount %s", pastr); - else - err = atf_no_error(); -#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 - * simpler to just leave the system-specific umount(8) tool deal - * with it, at least for now. */ - char *cmd; - - err = atf_text_format(&cmd, "umount '%s'", pastr); - if (!atf_is_error(err)) { - int state = system(cmd); - if (state == -1) - err = atf_libc_error(errno, "Failed to run \"%s\"", cmd); - else if (!WIFEXITED(state) || WEXITSTATUS(state) != EXIT_SUCCESS) - err = child_error(cmd, state); - free(cmd); - } - } -#endif - - atf_fs_path_fini(&pa); -out: - return err; -} - -static -atf_error_t -normalize(atf_dynstr_t *d, char *p) -{ - const char *ptr; - char *last; - atf_error_t err; - bool first; - - PRE(strlen(p) > 0); - PRE(atf_dynstr_length(d) == 0); - - if (p[0] == '/') - err = atf_dynstr_append_fmt(d, "/"); - else - err = atf_no_error(); - - first = true; - last = NULL; /* Silence GCC warning. */ - ptr = strtok_r(p, "/", &last); - while (!atf_is_error(err) && ptr != NULL) { - if (strlen(ptr) > 0) { - err = atf_dynstr_append_fmt(d, "%s%s", first ? "" : "/", ptr); - first = false; - } - - ptr = strtok_r(NULL, "/", &last); - } - - return err; -} - -static -atf_error_t -normalize_ap(atf_dynstr_t *d, const char *p, va_list ap) -{ - char *str; - atf_error_t err; - va_list ap2; - - err = atf_dynstr_init(d); - if (atf_is_error(err)) - goto out; - - va_copy(ap2, ap); - err = atf_text_format_ap(&str, p, ap2); - va_end(ap2); - if (atf_is_error(err)) - atf_dynstr_fini(d); - else { - err = normalize(d, str); - free(str); - } - -out: - return err; -} - -/* --------------------------------------------------------------------- - * The "atf_fs_path" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_fs_path_init_ap(atf_fs_path_t *p, const char *fmt, va_list ap) -{ - atf_error_t err; - va_list ap2; - - atf_object_init(&p->m_object); - - va_copy(ap2, ap); - err = normalize_ap(&p->m_data, fmt, ap2); - va_end(ap2); - - return err; -} - -atf_error_t -atf_fs_path_init_fmt(atf_fs_path_t *p, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_fs_path_init_ap(p, fmt, ap); - va_end(ap); - - return err; -} - -atf_error_t -atf_fs_path_copy(atf_fs_path_t *dest, const atf_fs_path_t *src) -{ - atf_object_copy(&dest->m_object, &src->m_object); - - return atf_dynstr_copy(&dest->m_data, &src->m_data); -} - -void -atf_fs_path_fini(atf_fs_path_t *p) -{ - atf_dynstr_fini(&p->m_data); - - atf_object_fini(&p->m_object); -} - -/* - * Getters. - */ - -atf_error_t -atf_fs_path_branch_path(const atf_fs_path_t *p, atf_fs_path_t *bp) -{ - const ssize_t endpos = atf_dynstr_rfind_ch(&p->m_data, '/'); - atf_error_t err; - - if (endpos == atf_dynstr_npos) - err = atf_fs_path_init_fmt(bp, "."); - else if (endpos == 0) - err = atf_fs_path_init_fmt(bp, "/"); - else { - atf_object_init(&bp->m_object); - err = atf_dynstr_init_substr(&bp->m_data, &p->m_data, 0, endpos); - } - -#if defined(HAVE_CONST_DIRNAME) - INV(atf_equal_dynstr_cstring(&bp->m_data, - dirname(atf_dynstr_cstring(&p->m_data)))); -#endif /* defined(HAVE_CONST_DIRNAME) */ - - return err; -} - -const char * -atf_fs_path_cstring(const atf_fs_path_t *p) -{ - return atf_dynstr_cstring(&p->m_data); -} - -atf_error_t -atf_fs_path_leaf_name(const atf_fs_path_t *p, atf_dynstr_t *ln) -{ - ssize_t begpos = atf_dynstr_rfind_ch(&p->m_data, '/'); - atf_error_t err; - - if (begpos == atf_dynstr_npos) - begpos = 0; - else - begpos++; - - err = atf_dynstr_init_substr(ln, &p->m_data, begpos, atf_dynstr_npos); - -#if defined(HAVE_CONST_BASENAME) - INV(atf_equal_dynstr_cstring(ln, - basename(atf_dynstr_cstring(&p->m_data)))); -#endif /* defined(HAVE_CONST_BASENAME) */ - - return err; -} - -bool -atf_fs_path_is_absolute(const atf_fs_path_t *p) -{ - return atf_dynstr_cstring(&p->m_data)[0] == '/'; -} - -bool -atf_fs_path_is_root(const atf_fs_path_t *p) -{ - return atf_equal_dynstr_cstring(&p->m_data, "/"); -} - -/* - * Modifiers. - */ - -atf_error_t -atf_fs_path_append_ap(atf_fs_path_t *p, const char *fmt, va_list ap) -{ - atf_dynstr_t aux; - atf_error_t err; - va_list ap2; - - va_copy(ap2, ap); - err = normalize_ap(&aux, fmt, ap2); - va_end(ap2); - if (!atf_is_error(err)) { - const char *auxstr = atf_dynstr_cstring(&aux); - const bool needslash = auxstr[0] != '/'; - - err = atf_dynstr_append_fmt(&p->m_data, "%s%s", - needslash ? "/" : "", auxstr); - - atf_dynstr_fini(&aux); - } - - return err; -} - -atf_error_t -atf_fs_path_append_fmt(atf_fs_path_t *p, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_fs_path_append_ap(p, fmt, ap); - va_end(ap); - - return err; -} - -atf_error_t -atf_fs_path_append_path(atf_fs_path_t *p, const atf_fs_path_t *p2) -{ - return atf_fs_path_append_fmt(p, "%s", atf_dynstr_cstring(&p2->m_data)); -} - -atf_error_t -atf_fs_path_to_absolute(const atf_fs_path_t *p, atf_fs_path_t *pa) -{ - atf_error_t err; - - PRE(!atf_fs_path_is_absolute(p)); - - err = atf_fs_getcwd(pa); - if (atf_is_error(err)) - goto out; - - err = atf_fs_path_append_path(pa, p); - if (atf_is_error(err)) - atf_fs_path_fini(pa); - -out: - return err; -} - -/* - * Operators. - */ - -bool atf_equal_fs_path_fs_path(const atf_fs_path_t *p1, - const atf_fs_path_t *p2) -{ - return atf_equal_dynstr_dynstr(&p1->m_data, &p2->m_data); -} - -/* --------------------------------------------------------------------- - * The "atf_fs_path" type. - * --------------------------------------------------------------------- */ - -/* - * Constants. - */ - -const int atf_fs_stat_blk_type = 1; -const int atf_fs_stat_chr_type = 2; -const int atf_fs_stat_dir_type = 3; -const int atf_fs_stat_fifo_type = 4; -const int atf_fs_stat_lnk_type = 5; -const int atf_fs_stat_reg_type = 6; -const int atf_fs_stat_sock_type = 7; -const int atf_fs_stat_wht_type = 8; - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_fs_stat_init(atf_fs_stat_t *st, const atf_fs_path_t *p) -{ - atf_error_t err; - const char *pstr = atf_fs_path_cstring(p); - - if (lstat(pstr, &st->m_sb) == -1) { - err = atf_libc_error(errno, "Cannot get information of %s; " - "lstat(2) failed", pstr); - } else { - int type = st->m_sb.st_mode & S_IFMT; - err = atf_no_error(); - switch (type) { - case S_IFBLK: st->m_type = atf_fs_stat_blk_type; break; - case S_IFCHR: st->m_type = atf_fs_stat_chr_type; break; - case S_IFDIR: st->m_type = atf_fs_stat_dir_type; break; - case S_IFIFO: st->m_type = atf_fs_stat_fifo_type; break; - case S_IFLNK: st->m_type = atf_fs_stat_lnk_type; break; - case S_IFREG: st->m_type = atf_fs_stat_reg_type; break; - case S_IFSOCK: st->m_type = atf_fs_stat_sock_type; break; -#if defined(S_IFWHT) - case S_IFWHT: st->m_type = atf_fs_stat_wht_type; break; -#endif - default: - err = unknown_type_error(pstr, type); - } - } - - if (!atf_is_error(err)) - atf_object_init(&st->m_object); - - return err; -} - -void -atf_fs_stat_copy(atf_fs_stat_t *dest, const atf_fs_stat_t *src) -{ - atf_object_copy(&dest->m_object, &src->m_object); - - dest->m_type = src->m_type; - dest->m_sb = src->m_sb; -} - -void -atf_fs_stat_fini(atf_fs_stat_t *st) -{ - atf_object_fini(&st->m_object); -} - -/* - * Getters. - */ - -dev_t -atf_fs_stat_get_device(const atf_fs_stat_t *st) -{ - return st->m_sb.st_dev; -} - -ino_t -atf_fs_stat_get_inode(const atf_fs_stat_t *st) -{ - return st->m_sb.st_ino; -} - -int -atf_fs_stat_get_type(const atf_fs_stat_t *st) -{ - return st->m_type; -} - -bool -atf_fs_stat_is_owner_readable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IRUSR; -} - -bool -atf_fs_stat_is_owner_writable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IWUSR; -} - -bool -atf_fs_stat_is_owner_executable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IXUSR; -} - -bool -atf_fs_stat_is_group_readable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IRGRP; -} - -bool -atf_fs_stat_is_group_writable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IWGRP; -} - -bool -atf_fs_stat_is_group_executable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IXGRP; -} - -bool -atf_fs_stat_is_other_readable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IROTH; -} - -bool -atf_fs_stat_is_other_writable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IWOTH; -} - -bool -atf_fs_stat_is_other_executable(const atf_fs_stat_t *st) -{ - return st->m_sb.st_mode & S_IXOTH; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -const int atf_fs_access_f = 1 << 0; -const int atf_fs_access_r = 1 << 1; -const int atf_fs_access_w = 1 << 2; -const int atf_fs_access_x = 1 << 3; - -atf_error_t -atf_fs_cleanup(const atf_fs_path_t *p) -{ - atf_error_t err; - atf_fs_stat_t info; - - err = atf_fs_stat_init(&info, p); - if (atf_is_error(err)) - return err; - - err = cleanup_aux(p, atf_fs_stat_get_device(&info), true); - - atf_fs_stat_fini(&info); - - return err; -} - -/* - * 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. - */ -atf_error_t -atf_fs_eaccess(const atf_fs_path_t *p, int mode) -{ - atf_error_t err; - struct stat st; - bool ok; - - PRE(mode & atf_fs_access_f || mode & atf_fs_access_r || - mode & atf_fs_access_w || mode & atf_fs_access_x); - - if (lstat(atf_fs_path_cstring(p), &st) == -1) { - err = atf_libc_error(errno, "Cannot get information from file %s", - atf_fs_path_cstring(p)); - goto out; - } - - err = atf_no_error(); - - /* Early return if we are only checking for existence and the file - * exists (stat call returned). */ - if (mode & atf_fs_access_f) - goto out; - - ok = false; - if (atf_user_is_root()) { - if (!ok && !(mode & atf_fs_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 && (atf_user_euid() == st.st_uid)) { - ok = ((mode & atf_fs_access_r) && (st.st_mode & S_IRUSR)) || - ((mode & atf_fs_access_w) && (st.st_mode & S_IWUSR)) || - ((mode & atf_fs_access_x) && (st.st_mode & S_IXUSR)); - } - if (!ok && atf_user_is_member_of_group(st.st_gid)) { - ok = ((mode & atf_fs_access_r) && (st.st_mode & S_IRGRP)) || - ((mode & atf_fs_access_w) && (st.st_mode & S_IWGRP)) || - ((mode & atf_fs_access_x) && (st.st_mode & S_IXGRP)); - } - if (!ok && ((atf_user_euid() != st.st_uid) && - !atf_user_is_member_of_group(st.st_gid))) { - ok = ((mode & atf_fs_access_r) && (st.st_mode & S_IROTH)) || - ((mode & atf_fs_access_w) && (st.st_mode & S_IWOTH)) || - ((mode & atf_fs_access_x) && (st.st_mode & S_IXOTH)); - } - } - - if (!ok) - err = atf_libc_error(EACCES, "Access check failed"); - -out: - return err; -} - -atf_error_t -atf_fs_exists(const atf_fs_path_t *p, bool *b) -{ - atf_error_t err; - - err = atf_fs_eaccess(p, atf_fs_access_f); - if (atf_is_error(err)) { - if (atf_error_is(err, "libc") && atf_libc_error_code(err) == ENOENT) { - atf_error_free(err); - err = atf_no_error(); - *b = false; - } - } else - *b = true; - - return err; -} - -atf_error_t -atf_fs_getcwd(atf_fs_path_t *p) -{ - atf_error_t err; - char *cwd; - -#if defined(HAVE_GETCWD_DYN) - cwd = getcwd(NULL, 0); -#else - cwd = getcwd(NULL, MAXPATHLEN); -#endif - if (cwd == NULL) { - err = atf_libc_error(errno, "Cannot determine current directory"); - goto out; - } - - err = atf_fs_path_init_fmt(p, "%s", cwd); - free(cwd); - -out: - return err; -} - -atf_error_t -atf_fs_mkdtemp(atf_fs_path_t *p) -{ - atf_error_t err; - char *tmpl; - - tmpl = p->m_data.m_data; /* XXX: Ugly */ - PRE(strstr(tmpl, "XXXXXX") != NULL); - - if (mkdtemp(tmpl) == NULL) - err = atf_libc_error(errno, "Cannot create temporary directory " - "with template '%s'", tmpl); - else - err = atf_no_error(); - - return err; -} diff --git a/dist/atf/atf-c/fs.h b/dist/atf/atf-c/fs.h deleted file mode 100644 index c598bcae75f9..000000000000 --- a/dist/atf/atf-c/fs.h +++ /dev/null @@ -1,133 +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_FS_H) -#define ATF_C_FS_H - -#include -#include - -#include -#include - -#include -#include -#include - -/* --------------------------------------------------------------------- - * The "atf_fs_path" type. - * --------------------------------------------------------------------- */ - -struct atf_fs_path { - atf_object_t m_object; - - atf_dynstr_t m_data; -}; -typedef struct atf_fs_path atf_fs_path_t; - -/* Constructors/destructors. */ -atf_error_t atf_fs_path_init_ap(atf_fs_path_t *, const char *, va_list); -atf_error_t atf_fs_path_init_fmt(atf_fs_path_t *, const char *, ...); -atf_error_t atf_fs_path_copy(atf_fs_path_t *, const atf_fs_path_t *); -void atf_fs_path_fini(atf_fs_path_t *); - -/* Getters. */ -atf_error_t atf_fs_path_branch_path(const atf_fs_path_t *, atf_fs_path_t *); -const char *atf_fs_path_cstring(const atf_fs_path_t *); -atf_error_t atf_fs_path_leaf_name(const atf_fs_path_t *, atf_dynstr_t *); -bool atf_fs_path_is_absolute(const atf_fs_path_t *); -bool atf_fs_path_is_root(const atf_fs_path_t *); - -/* Modifiers. */ -atf_error_t atf_fs_path_append_ap(atf_fs_path_t *, const char *, va_list); -atf_error_t atf_fs_path_append_fmt(atf_fs_path_t *, const char *, ...); -atf_error_t atf_fs_path_append_path(atf_fs_path_t *, const atf_fs_path_t *); -atf_error_t atf_fs_path_to_absolute(const atf_fs_path_t *, atf_fs_path_t *); - -/* Operators. */ -bool atf_equal_fs_path_fs_path(const atf_fs_path_t *, - const atf_fs_path_t *); - -/* --------------------------------------------------------------------- - * The "atf_fs_stat" type. - * --------------------------------------------------------------------- */ - -struct atf_fs_stat { - atf_object_t m_object; - - int m_type; - struct stat m_sb; -}; -typedef struct atf_fs_stat atf_fs_stat_t; - -/* Constants. */ -extern const int atf_fs_stat_blk_type; -extern const int atf_fs_stat_chr_type; -extern const int atf_fs_stat_dir_type; -extern const int atf_fs_stat_fifo_type; -extern const int atf_fs_stat_lnk_type; -extern const int atf_fs_stat_reg_type; -extern const int atf_fs_stat_sock_type; -extern const int atf_fs_stat_wht_type; - -/* Constructors/destructors. */ -atf_error_t atf_fs_stat_init(atf_fs_stat_t *, const atf_fs_path_t *); -void atf_fs_stat_copy(atf_fs_stat_t *, const atf_fs_stat_t *); -void atf_fs_stat_fini(atf_fs_stat_t *); - -/* Getters. */ -dev_t atf_fs_stat_get_device(const atf_fs_stat_t *); -ino_t atf_fs_stat_get_inode(const atf_fs_stat_t *); -int atf_fs_stat_get_type(const atf_fs_stat_t *); -bool atf_fs_stat_is_owner_readable(const atf_fs_stat_t *); -bool atf_fs_stat_is_owner_writable(const atf_fs_stat_t *); -bool atf_fs_stat_is_owner_executable(const atf_fs_stat_t *); -bool atf_fs_stat_is_group_readable(const atf_fs_stat_t *); -bool atf_fs_stat_is_group_writable(const atf_fs_stat_t *); -bool atf_fs_stat_is_group_executable(const atf_fs_stat_t *); -bool atf_fs_stat_is_other_readable(const atf_fs_stat_t *); -bool atf_fs_stat_is_other_writable(const atf_fs_stat_t *); -bool atf_fs_stat_is_other_executable(const atf_fs_stat_t *); - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -extern const int atf_fs_access_f; -extern const int atf_fs_access_r; -extern const int atf_fs_access_w; -extern const int atf_fs_access_x; - -atf_error_t atf_fs_cleanup(const atf_fs_path_t *); -atf_error_t atf_fs_eaccess(const atf_fs_path_t *, int); -atf_error_t atf_fs_exists(const atf_fs_path_t *, bool *); -atf_error_t atf_fs_getcwd(atf_fs_path_t *); -atf_error_t atf_fs_mkdtemp(atf_fs_path_t *); - -#endif /* !defined(ATF_C_FS_H) */ diff --git a/dist/atf/atf-c/io.c b/dist/atf/atf-c/io.c deleted file mode 100644 index 1b88d1231e74..000000000000 --- a/dist/atf/atf-c/io.c +++ /dev/null @@ -1,99 +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/dynstr.h" -#include "atf-c/io.h" -#include "atf-c/sanity.h" - -atf_error_t -atf_io_readline(int fd, atf_dynstr_t *dest) -{ - char ch[2]; - ssize_t cnt; - atf_error_t err; - - ch[1] = '\0'; - while ((cnt = read(fd, &ch[0], sizeof(ch[0]))) == sizeof(ch[0]) && - ch[0] != '\n') { - atf_dynstr_append_fmt(dest, ch); - } - - if (cnt == -1) - err = atf_libc_error(errno, "Failed to read line from file " - "descriptor %d", fd); - else - err = atf_no_error(); - - return err; -} - -atf_error_t -atf_io_write_ap(int fd, const char *fmt, va_list ap) -{ - atf_error_t err; - atf_dynstr_t str; - - err = atf_dynstr_init_ap(&str, fmt, ap); - if (!atf_is_error(err)) { - ssize_t cnt = write(fd, atf_dynstr_cstring(&str), - atf_dynstr_length(&str)); - - if (cnt == -1) - err = atf_libc_error(errno, "Failed to write '%s' to file " - "descriptor %d", atf_dynstr_cstring(&str), - fd); - else { - INV(cnt == atf_dynstr_length(&str)); - err = atf_no_error(); - } - - atf_dynstr_fini(&str); - } - - return err; -} - -atf_error_t -atf_io_write_fmt(int fd, const char *fmt, ...) -{ - atf_error_t err; - va_list ap; - - va_start(ap, fmt); - err = atf_io_write_ap(fd, fmt, ap); - va_end(ap); - - return err; -} diff --git a/dist/atf/atf-c/io.h b/dist/atf/atf-c/io.h deleted file mode 100644 index 4af68c313654..000000000000 --- a/dist/atf/atf-c/io.h +++ /dev/null @@ -1,46 +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_IO_H) -#define ATF_C_IO_H - -#include - -#include - -struct atf_dynstr; - -/* TODO: It would be nice to have an 'atf_io_file_t' type and avoid using - * raw file descriptors. */ - -atf_error_t atf_io_readline(int, struct atf_dynstr *); -atf_error_t atf_io_write_ap(int, const char *, va_list); -atf_error_t atf_io_write_fmt(int, const char *, ...); - -#endif /* !defined(ATF_C_IO_H) */ diff --git a/dist/atf/atf-c/list.c b/dist/atf/atf-c/list.c deleted file mode 100644 index 51c688782d09..000000000000 --- a/dist/atf/atf-c/list.c +++ /dev/null @@ -1,291 +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 "atf-c/list.h" -#include "atf-c/sanity.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -struct list_entry { - struct list_entry *m_prev; - struct list_entry *m_next; - void *m_object; -}; - -static -atf_list_citer_t -entry_to_citer(const atf_list_t *l, const struct list_entry *le) -{ - atf_list_citer_t iter; - iter.m_list = l; - iter.m_entry = le; - return iter; -} - -static -atf_list_iter_t -entry_to_iter(atf_list_t *l, struct list_entry *le) -{ - atf_list_iter_t iter; - iter.m_list = l; - iter.m_entry = le; - return iter; -} - -static -struct list_entry * -new_entry(void *object) -{ - struct list_entry *le; - - le = (struct list_entry *)malloc(sizeof(*le)); - if (le != NULL) { - le->m_prev = le->m_next = NULL; - le->m_object = object; - } - - return le; -} - -static -struct list_entry * -new_entry_and_link(void *object, struct list_entry *prev, - struct list_entry *next) -{ - struct list_entry *le; - - le = new_entry(object); - if (le != NULL) { - le->m_prev = prev; - le->m_next = next; - - prev->m_next = le; - next->m_prev = le; - } - - return le; -} - -/* --------------------------------------------------------------------- - * The "atf_list_citer" type. - * --------------------------------------------------------------------- */ - -/* - * Getters. - */ - -const void * -atf_list_citer_data(const atf_list_citer_t citer) -{ - const struct list_entry *le = citer.m_entry; - PRE(le != NULL); - return le->m_object; -} - -atf_list_citer_t -atf_list_citer_next(const atf_list_citer_t citer) -{ - const struct list_entry *le = citer.m_entry; - atf_list_citer_t newciter; - - PRE(le != NULL); - - newciter = citer; - newciter.m_entry = le->m_next; - - return newciter; -} - -bool -atf_equal_list_citer_list_citer(const atf_list_citer_t i1, - const atf_list_citer_t i2) -{ - return i1.m_list == i2.m_list && i1.m_entry == i2.m_entry; -} - -/* --------------------------------------------------------------------- - * The "atf_list_iter" type. - * --------------------------------------------------------------------- */ - -/* - * Getters. - */ - -void * -atf_list_iter_data(const atf_list_iter_t iter) -{ - const struct list_entry *le = iter.m_entry; - PRE(le != NULL); - return le->m_object; -} - -atf_list_iter_t -atf_list_iter_next(const atf_list_iter_t iter) -{ - const struct list_entry *le = iter.m_entry; - atf_list_iter_t newiter; - - PRE(le != NULL); - - newiter = iter; - newiter.m_entry = le->m_next; - - return newiter; -} - -bool -atf_equal_list_iter_list_iter(const atf_list_iter_t i1, - const atf_list_iter_t i2) -{ - return i1.m_list == i2.m_list && i1.m_entry == i2.m_entry; -} - -/* --------------------------------------------------------------------- - * The "atf_list" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors and destructors. - */ - -atf_error_t -atf_list_init(atf_list_t *l) -{ - struct list_entry *lebeg, *leend; - - lebeg = new_entry(NULL); - if (lebeg == NULL) { - return atf_no_memory_error(); - } - - leend = new_entry(NULL); - if (leend == NULL) { - free(lebeg); - return atf_no_memory_error(); - } - - lebeg->m_next = leend; - lebeg->m_prev = NULL; - - leend->m_next = NULL; - leend->m_prev = lebeg; - - l->m_size = 0; - l->m_begin = lebeg; - l->m_end = leend; - - atf_object_init(&l->m_object); - - return atf_no_error(); -} - -void -atf_list_fini(atf_list_t *l) -{ - struct list_entry *le; - size_t freed; - - le = (struct list_entry *)l->m_begin; - freed = 0; - while (le != NULL) { - struct list_entry *lenext; - - lenext = le->m_next; - free(le); - le = lenext; - - freed++; - } - INV(freed == l->m_size + 2); - - atf_object_fini(&l->m_object); -} - -/* - * Getters. - */ - -atf_list_iter_t -atf_list_begin(atf_list_t *l) -{ - struct list_entry *le = l->m_begin; - return entry_to_iter(l, le->m_next); -} - -atf_list_citer_t -atf_list_begin_c(const atf_list_t *l) -{ - const struct list_entry *le = l->m_begin; - return entry_to_citer(l, le->m_next); -} - -atf_list_iter_t -atf_list_end(atf_list_t *l) -{ - return entry_to_iter(l, l->m_end); -} - -atf_list_citer_t -atf_list_end_c(const atf_list_t *l) -{ - return entry_to_citer(l, l->m_end); -} - -size_t -atf_list_size(const atf_list_t *l) -{ - return l->m_size; -} - -/* - * Modifiers. - */ - -atf_error_t -atf_list_append(atf_list_t *l, void *data) -{ - struct list_entry *le, *next, *prev; - atf_error_t err; - - next = (struct list_entry *)l->m_end; - prev = next->m_prev; - le = new_entry_and_link(data, prev, next); - if (le == NULL) - err = atf_no_memory_error(); - else { - l->m_size++; - err = atf_no_error(); - } - - return err; -} diff --git a/dist/atf/atf-c/list.h b/dist/atf/atf-c/list.h deleted file mode 100644 index 67415a9a5bbf..000000000000 --- a/dist/atf/atf-c/list.h +++ /dev/null @@ -1,112 +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_LIST_H) -#define ATF_C_LIST_H - -#include - -#include -#include - -/* --------------------------------------------------------------------- - * The "atf_list_citer" type. - * --------------------------------------------------------------------- */ - -struct atf_list_citer { - const struct atf_list *m_list; - const void *m_entry; -}; -typedef struct atf_list_citer atf_list_citer_t; - -/* Getters. */ -const void *atf_list_citer_data(const atf_list_citer_t); -atf_list_citer_t atf_list_citer_next(const atf_list_citer_t); - -/* Operators. */ -bool atf_equal_list_citer_list_citer(const atf_list_citer_t, - const atf_list_citer_t); - -/* --------------------------------------------------------------------- - * The "atf_list_iter" type. - * --------------------------------------------------------------------- */ - -struct atf_list_iter { - struct atf_list *m_list; - void *m_entry; -}; -typedef struct atf_list_iter atf_list_iter_t; - -/* Getters. */ -void *atf_list_iter_data(const atf_list_iter_t); -atf_list_iter_t atf_list_iter_next(const atf_list_iter_t); - -/* Operators. */ -bool atf_equal_list_iter_list_iter(const atf_list_iter_t, - const atf_list_iter_t); - -/* --------------------------------------------------------------------- - * The "atf_list" type. - * --------------------------------------------------------------------- */ - -struct atf_list { - atf_object_t m_object; - - void *m_begin; - void *m_end; - - size_t m_size; -}; -typedef struct atf_list atf_list_t; - -/* Constructors and destructors */ -atf_error_t atf_list_init(atf_list_t *); -void atf_list_fini(atf_list_t *); - -/* Getters. */ -atf_list_iter_t atf_list_begin(atf_list_t *); -atf_list_citer_t atf_list_begin_c(const atf_list_t *); -atf_list_iter_t atf_list_end(atf_list_t *); -atf_list_citer_t atf_list_end_c(const atf_list_t *); -size_t atf_list_size(const atf_list_t *); - -/* Modifiers. */ -atf_error_t atf_list_append(atf_list_t *, void *); - -/* Macros. */ -#define atf_list_for_each(iter, list) \ - for (iter = atf_list_begin(list); \ - !atf_equal_list_iter_list_iter((iter), atf_list_end(list)); \ - iter = atf_list_iter_next(iter)) -#define atf_list_for_each_c(iter, list) \ - for (iter = atf_list_begin_c(list); \ - !atf_equal_list_citer_list_citer((iter), atf_list_end_c(list)); \ - iter = atf_list_citer_next(iter)) - -#endif /* ATF_C_LIST_H */ diff --git a/dist/atf/atf-c/macros.h b/dist/atf/atf-c/macros.h deleted file mode 100644 index 3e4d978b5c3f..000000000000 --- a/dist/atf/atf-c/macros.h +++ /dev/null @@ -1,124 +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_MACROS_H) -#define ATF_C_MACROS_H - -#include -#include - -#define ATF_TC(tc) \ - static void atfu_ ## tc ## _head(atf_tc_t *); \ - static void atfu_ ## tc ## _body(const atf_tc_t *); \ - static atf_tc_t atfu_ ## tc ## _tc; \ - static atf_tc_pack_t atfu_ ## tc ## _tc_pack = { \ - .m_ident = #tc, \ - .m_head = atfu_ ## tc ## _head, \ - .m_body = atfu_ ## tc ## _body, \ - .m_cleanup = NULL, \ - } - -#define ATF_TC_NAME(tc) \ - (atfu_ ## tc ## _tc) - -#define ATF_TC_WITH_CLEANUP(tc) \ - static void atfu_ ## tc ## _head(atf_tc_t *); \ - static void atfu_ ## tc ## _body(const atf_tc_t *); \ - static void atfu_ ## tc ## _cleanup(const atf_tc_t *); \ - static atf_tc_t atfu_ ## tc ## _tc; \ - static atf_tc_pack_t atfu_ ## tc ## _tc_pack = { \ - .m_ident = #tc, \ - .m_head = atfu_ ## tc ## _head, \ - .m_body = atfu_ ## tc ## _body, \ - .m_cleanup = atfu_ ## tc ## _cleanup, \ - } - -#define ATF_TC_HEAD(tc, tcptr) \ - static \ - void \ - atfu_ ## tc ## _head(atf_tc_t *tcptr) - -#define ATF_TC_HEAD_NAME(tc) \ - (atfu_ ## tc ## _head) - -#define ATF_TC_BODY(tc, tcptr) \ - static \ - void \ - atfu_ ## tc ## _body(const atf_tc_t *tcptr) - -#define ATF_TC_BODY_NAME(tc) \ - (atfu_ ## tc ## _body) - -#define ATF_TC_CLEANUP(tc, tcptr) \ - static \ - void \ - atfu_ ## tc ## _cleanup(const atf_tc_t *tcptr) - -#define ATF_TC_CLEANUP_NAME(tc) \ - (atfu_ ## tc ## _cleanup) - -#define ATF_TP_ADD_TCS(tps) \ - static atf_error_t atfu_tp_add_tcs(atf_tp_t *); \ - int atf_tp_main(int, char **, atf_error_t (*)(atf_tp_t *)); \ - \ - int \ - main(int argc, char **argv) \ - { \ - return atf_tp_main(argc, argv, atfu_tp_add_tcs); \ - } \ - static \ - atf_error_t \ - atfu_tp_add_tcs(atf_tp_t *tps) - -#define ATF_TP_ADD_TC(tp, tc) \ - do { \ - atf_error_t atfu_err; \ - atfu_err = atf_tc_init_pack(&atfu_ ## tc ## _tc, \ - &atfu_ ## tc ## _tc_pack, \ - atf_tp_get_config(tp)); \ - if (atf_is_error(atfu_err)) \ - return atfu_err; \ - atfu_err = atf_tp_add_tc(tp, &atfu_ ## tc ## _tc); \ - if (atf_is_error(atfu_err)) \ - return atfu_err; \ - } while (0) - -#define ATF_CHECK(x) \ - do { \ - if (!(x)) \ - atf_tc_fail("Line %d: %s not met", __LINE__, #x); \ - } while (0) - -#define ATF_CHECK_EQUAL(x, y) \ - do { \ - if ((x) != (y)) \ - atf_tc_fail("Line %d: %s != %s", __LINE__, #x, #y); \ - } while (0) - -#endif /* !defined(ATF_C_MACROS_H) */ diff --git a/dist/atf/atf-c/map.c b/dist/atf/atf-c/map.c deleted file mode 100644 index 4cd4f34abe41..000000000000 --- a/dist/atf/atf-c/map.c +++ /dev/null @@ -1,257 +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 "atf-c/map.h" -#include "atf-c/sanity.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -struct map_entry { - char *m_key; - void *m_value; - bool m_managed; -}; - -static -struct map_entry * -new_entry(const char *key, void *value, bool managed) -{ - struct map_entry *me; - - me = (struct map_entry *)malloc(sizeof(*me)); - if (me != NULL) { - me->m_key = strdup(key); - if (me->m_key == NULL) { - free(me); - me = NULL; - } else { - me->m_value = value; - me->m_managed = managed; - } - } - - return me; -} - -/* --------------------------------------------------------------------- - * The "atf_map_citer" type. - * --------------------------------------------------------------------- */ - -/* - * Getters. - */ - -const void * -atf_map_citer_data(const atf_map_citer_t citer) -{ - const struct map_entry *me = citer.m_entry; - PRE(me != NULL); - return me->m_value; -} - -bool -atf_equal_map_citer_map_citer(const atf_map_citer_t i1, - const atf_map_citer_t i2) -{ - return i1.m_map == i2.m_map && i1.m_entry == i2.m_entry; -} - -/* --------------------------------------------------------------------- - * The "atf_map_iter" type. - * --------------------------------------------------------------------- */ - -/* - * Getters. - */ - -void * -atf_map_iter_data(const atf_map_iter_t iter) -{ - const struct map_entry *me = iter.m_entry; - PRE(me != NULL); - return me->m_value; -} - -bool -atf_equal_map_iter_map_iter(const atf_map_iter_t i1, - const atf_map_iter_t i2) -{ - return i1.m_map == i2.m_map && i1.m_entry == i2.m_entry; -} - -/* --------------------------------------------------------------------- - * The "atf_map" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors and destructors. - */ - -atf_error_t -atf_map_init(atf_map_t *m) -{ - atf_error_t err; - - err = atf_list_init(&m->m_list); - if (atf_is_error(err)) - goto out; - - atf_object_init(&m->m_object); - -out: - return err; -} - -void -atf_map_fini(atf_map_t *m) -{ - atf_list_iter_t iter; - - atf_list_for_each(iter, &m->m_list) { - struct map_entry *me = atf_list_iter_data(iter); - - if (me->m_managed) - free(me->m_value); - free(me->m_key); - free(me); - } - atf_list_fini(&m->m_list); - - atf_object_fini(&m->m_object); -} - -/* - * Getters. - */ - -atf_map_iter_t -atf_map_end(atf_map_t *m) -{ - atf_map_iter_t iter; - iter.m_map = m; - iter.m_entry = NULL; - return iter; -} - -atf_map_citer_t -atf_map_end_c(const atf_map_t *m) -{ - atf_map_citer_t iter; - iter.m_map = m; - iter.m_entry = NULL; - return iter; -} - -atf_map_iter_t -atf_map_find(atf_map_t *m, const char *key) -{ - atf_list_iter_t iter; - - atf_list_for_each(iter, &m->m_list) { - struct map_entry *me = atf_list_iter_data(iter); - - if (strcmp(me->m_key, key) == 0) { - atf_map_iter_t i; - i.m_map = m; - i.m_entry = me; - return i; - } - } - - return atf_map_end(m); -} - -atf_map_citer_t -atf_map_find_c(const atf_map_t *m, const char *key) -{ - atf_list_citer_t iter; - - atf_list_for_each_c(iter, &m->m_list) { - const struct map_entry *me = atf_list_citer_data(iter); - - if (strcmp(me->m_key, key) == 0) { - atf_map_citer_t i; - i.m_map = m; - i.m_entry = me; - return i; - } - } - - return atf_map_end_c(m); -} - -size_t -atf_map_size(const atf_map_t *m) -{ - return atf_list_size(&m->m_list); -} - -/* - * Modifiers. - */ - -atf_error_t -atf_map_insert(atf_map_t *m, const char *key, void *value, bool managed) -{ - struct map_entry *me; - atf_error_t err; - atf_map_iter_t iter; - - iter = atf_map_find(m, key); - if (atf_equal_map_iter_map_iter(iter, atf_map_end(m))) { - me = new_entry(key, value, managed); - if (me == NULL) - err = atf_no_memory_error(); - else { - err = atf_list_append(&m->m_list, me); - if (atf_is_error(err)) { - if (managed) - free(value); - free(me); - } - } - } else { - me = iter.m_entry; - if (me->m_managed) - free(me->m_value); - - INV(strcmp(me->m_key, key) == 0); - me->m_value = value; - me->m_managed = managed; - - err = atf_no_error(); - } - - return err; -} diff --git a/dist/atf/atf-c/map.h b/dist/atf/atf-c/map.h deleted file mode 100644 index 0afa2274b1dd..000000000000 --- a/dist/atf/atf-c/map.h +++ /dev/null @@ -1,101 +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_MAP_H) -#define ATF_C_MAP_H - -#include -#include - -#include -#include -#include - -/* --------------------------------------------------------------------- - * The "atf_map_citer" type. - * --------------------------------------------------------------------- */ - -struct atf_map_citer { - const struct atf_map *m_map; - const void *m_entry; -}; -typedef struct atf_map_citer atf_map_citer_t; - -/* Getters. */ -const void *atf_map_citer_data(const atf_map_citer_t); - -/* Operators. */ -bool atf_equal_map_citer_map_citer(const atf_map_citer_t, - const atf_map_citer_t); - -/* --------------------------------------------------------------------- - * The "atf_map_iter" type. - * --------------------------------------------------------------------- */ - -struct atf_map_iter { - struct atf_map *m_map; - void *m_entry; -}; -typedef struct atf_map_iter atf_map_iter_t; - -/* Getters. */ -void *atf_map_iter_data(const atf_map_iter_t); - -/* Operators. */ -bool atf_equal_map_iter_map_iter(const atf_map_iter_t, - const atf_map_iter_t); - -/* --------------------------------------------------------------------- - * The "atf_map" type. - * --------------------------------------------------------------------- */ - -/* A list-based map. Typically very inefficient, but our maps are small - * enough. */ -struct atf_map { - atf_object_t m_object; - - atf_list_t m_list; -}; -typedef struct atf_map atf_map_t; - -/* Constructors and destructors */ -atf_error_t atf_map_init(atf_map_t *); -void atf_map_fini(atf_map_t *); - -/* Getters. */ -atf_map_iter_t atf_map_end(atf_map_t *); -atf_map_citer_t atf_map_end_c(const atf_map_t *); -atf_map_iter_t atf_map_find(atf_map_t *, const char *); -atf_map_citer_t atf_map_find_c(const atf_map_t *, const char *); -size_t atf_map_size(const atf_map_t *); - -/* Modifiers. */ -atf_error_t atf_map_insert(atf_map_t *, const char *, void *, bool); - -#endif /* ATF_C_MAP_H */ diff --git a/dist/atf/atf-c/object.c b/dist/atf/atf-c/object.c deleted file mode 100644 index 127624c902f1..000000000000 --- a/dist/atf/atf-c/object.c +++ /dev/null @@ -1,109 +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 "atf-c/object.h" -#include "atf-c/sanity.h" - -static size_t balance = 0; -static bool initialized = false; -static bool exit_checks = true; - -/* --------------------------------------------------------------------- - * The "atf_object" type. - * --------------------------------------------------------------------- */ - -static const uint32_t atf_object_magic_alive = 0xcafebabe; -static const uint32_t atf_object_magic_dead = 0xdeadbeef; - -void -atf_object_init(atf_object_t *o) -{ - PRE(initialized); - - o->m_magic = atf_object_magic_alive; - o->m_finis = 0; - - balance++; -} - -void -atf_object_copy(atf_object_t *dest, const atf_object_t *src) -{ - atf_object_init(dest); -} - -void -atf_object_fini(atf_object_t *o) -{ - PRE(initialized); - - PRE(o->m_magic == atf_object_magic_alive); - PRE(o->m_finis == 0); - PRE(balance > 0); - - o->m_magic = atf_object_magic_dead; - o->m_finis++; - - balance--; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -static -void -check_balance(void) -{ - PRE(initialized); - - if (exit_checks && balance > 0) { - warnx("FATAL ERROR: Invalid balance: %zd objects were not " - "released", balance); - abort(); - } -} - -void -atf_init_objects(void) -{ - initialized = true; - - if (atexit(check_balance) == -1) - err(EXIT_FAILURE, "FATAL ERROR: Cannot initialize object system"); -} - -void -atf_disable_exit_checks(void) -{ - exit_checks = false; -} diff --git a/dist/atf/atf-c/object.h b/dist/atf/atf-c/object.h deleted file mode 100644 index fe19032a4fb0..000000000000 --- a/dist/atf/atf-c/object.h +++ /dev/null @@ -1,58 +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_OBJECT_H) -#define ATF_C_OBJECT_H - -#include -#include -#include - -/* --------------------------------------------------------------------- - * The "atf_object" type. - * --------------------------------------------------------------------- */ - -struct atf_object { - uint32_t m_magic; - size_t m_finis; -}; -typedef struct atf_object atf_object_t; - -void atf_object_init(atf_object_t *); -void atf_object_copy(atf_object_t *, const atf_object_t *); -void atf_object_fini(atf_object_t *); - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -void atf_init_objects(void); -void atf_disable_exit_checks(void); - -#endif /* ATF_C_OBJECT_H */ diff --git a/dist/atf/atf-c/sanity.c b/dist/atf/atf-c/sanity.c deleted file mode 100644 index db8d516206d1..000000000000 --- a/dist/atf/atf-c/sanity.c +++ /dev/null @@ -1,78 +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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include -#include -#include -#include - -#include "atf-c/sanity.h" - -static -void -fail(const char *fmt, ...) -{ - va_list ap; - char buf[4096]; - - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - warnx("%s", buf); - warnx("%s", ""); - 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 " - "possible describing how you got to this condition."); - - abort(); -} - -void -atf_sanity_inv(const char *file, int line, const char *cond) -{ - fail("Invariant check failed at %s:%d: %s", file, line, cond); -} - -void -atf_sanity_pre(const char *file, int line, const char *cond) -{ - fail("Precondition check failed at %s:%d: %s", file, line, cond); -} - -void -atf_sanity_post(const char *file, int line, const char *cond) -{ - fail("Postcondition check failed at %s:%d: %s", file, line, cond); -} diff --git a/dist/atf/atf-c/sanity.h b/dist/atf/atf-c/sanity.h deleted file mode 100644 index 0b4f3e4756ce..000000000000 --- a/dist/atf/atf-c/sanity.h +++ /dev/null @@ -1,73 +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_SANITY_H) -#define ATF_C_SANITY_H - -void atf_sanity_inv(const char *, int, const char *); -void atf_sanity_pre(const char *, int, const char *); -void atf_sanity_post(const char *, int, const char *); - -#if !defined(NDEBUG) - -#define INV(x) \ - do { \ - if (!(x)) \ - atf_sanity_inv(__FILE__, __LINE__, #x); \ - } while (0) -#define PRE(x) \ - do { \ - if (!(x)) \ - atf_sanity_pre(__FILE__, __LINE__, #x); \ - } while (0) -#define POST(x) \ - do { \ - if (!(x)) \ - atf_sanity_post(__FILE__, __LINE__, #x); \ - } while (0) - -#else /* defined(NDEBUG) */ - -#define INV(x) \ - do { \ - } while (0) - -#define PRE(x) \ - do { \ - } while (0) - -#define POST(x) \ - do { \ - } while (0) - -#endif /* !defined(NDEBUG) */ - -#define UNREACHABLE INV(0) - -#endif /* ATF_C_SANITY_H */ diff --git a/dist/atf/atf-c/signals.c b/dist/atf/atf-c/signals.c deleted file mode 100644 index fdfec239aed3..000000000000 --- a/dist/atf/atf-c/signals.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include - -#include -#include -#include - -#include "atf-c/sanity.h" -#include "atf-c/signals.h" - -const int atf_signals_last_signo = LAST_SIGNO; - -/* --------------------------------------------------------------------- - * The "atf_signal_holder" type. - * --------------------------------------------------------------------- */ - -static bool happened[LAST_SIGNO + 1]; - -static -void -holder_handler(int signo) -{ - happened[signo] = true; -} - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_signal_holder_init(atf_signal_holder_t *sh, int signo) -{ - atf_error_t err; - - err = atf_signal_programmer_init(&sh->m_sp, signo, holder_handler); - if (atf_is_error(err)) - goto out; - - atf_object_init(&sh->m_object); - sh->m_signo = signo; - happened[signo] = false; - - INV(!atf_is_error(err)); -out: - return err; -} - -void -atf_signal_holder_fini(atf_signal_holder_t *sh) -{ - atf_signal_programmer_fini(&sh->m_sp); - - if (happened[sh->m_signo]) - kill(getpid(), sh->m_signo); - - atf_object_fini(&sh->m_object); -} - -/* - * Getters. - */ - -void -atf_signal_holder_process(atf_signal_holder_t *sh) -{ - if (happened[sh->m_signo]) { - int ret; - atf_error_t err; - - atf_signal_programmer_fini(&sh->m_sp); - happened[sh->m_signo] = false; - - ret = kill(getpid(), sh->m_signo); - INV(ret != -1); - - err = atf_signal_programmer_init(&sh->m_sp, sh->m_signo, - holder_handler); - INV(!atf_is_error(err)); - } -} - -/* --------------------------------------------------------------------- - * The "atf_signal_programmer" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_signal_programmer_init(atf_signal_programmer_t *sp, int signo, - atf_signal_handler_t handler) -{ - atf_error_t err; - struct sigaction sa; - - sa.sa_handler = handler; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - - if (sigaction(signo, &sa, &sp->m_oldsa) == -1) - err = atf_libc_error(errno, "Failed to program signal %d", signo); - else { - atf_object_init(&sp->m_object); - sp->m_signo = signo; - err = atf_no_error(); - } - - return err; -} - -void -atf_signal_programmer_fini(atf_signal_programmer_t *sp) -{ - if (sigaction(sp->m_signo, &sp->m_oldsa, NULL) == -1) - UNREACHABLE; - - atf_object_fini(&sp->m_object); -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -void -atf_signal_reset(int signo) -{ - struct sigaction sa; - - sa.sa_handler = SIG_DFL; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - - (void)sigaction(signo, &sa, NULL); -} diff --git a/dist/atf/atf-c/signals.h b/dist/atf/atf-c/signals.h deleted file mode 100644 index 9ddc2844fec0..000000000000 --- a/dist/atf/atf-c/signals.h +++ /dev/null @@ -1,85 +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_SIGNALS_H) -#define ATF_C_SIGNALS_H - -#include -#include - -#include -#include - -extern const int atf_signals_last_signo; -typedef void (*atf_signal_handler_t)(int); - -/* --------------------------------------------------------------------- - * The "atf_signal_programmer" type. - * --------------------------------------------------------------------- */ - -struct atf_signal_programmer { - atf_object_t m_object; - - int m_signo; - atf_signal_handler_t m_handler; - struct sigaction m_oldsa; -}; -typedef struct atf_signal_programmer atf_signal_programmer_t; - -/* Constructors/destructors. */ -atf_error_t atf_signal_programmer_init(atf_signal_programmer_t *, int, - atf_signal_handler_t); -void atf_signal_programmer_fini(atf_signal_programmer_t *); - -/* --------------------------------------------------------------------- - * The "atf_signal_holder" type. - * --------------------------------------------------------------------- */ - -struct atf_signal_holder { - atf_object_t m_object; - - int m_signo; - atf_signal_programmer_t m_sp; -}; -typedef struct atf_signal_holder atf_signal_holder_t; - -/* Constructors/destructors. */ -atf_error_t atf_signal_holder_init(atf_signal_holder_t *, int); -void atf_signal_holder_fini(atf_signal_holder_t *); - -/* Modifiers. */ -void atf_signal_holder_process(atf_signal_holder_t *); - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -void atf_signal_reset(int); - -#endif /* ATF_C_SIGNALS_H */ diff --git a/dist/atf/atf-c/tc.c b/dist/atf/atf-c/tc.c deleted file mode 100644 index 5c3331b278a6..000000000000 --- a/dist/atf/atf-c/tc.c +++ /dev/null @@ -1,1040 +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 -#include -#include -#include -#include -#include -#include -#include - -#include "atf-c/config.h" -#include "atf-c/env.h" -#include "atf-c/fs.h" -#include "atf-c/io.h" -#include "atf-c/sanity.h" -#include "atf-c/signals.h" -#include "atf-c/tc.h" -#include "atf-c/tcr.h" -#include "atf-c/text.h" -#include "atf-c/user.h" - -/* --------------------------------------------------------------------- - * Auxiliary types and functions. - * --------------------------------------------------------------------- */ - -/* Parent-only stuff. */ -struct timeout_data; -static atf_error_t body_parent(const atf_tc_t *, const atf_fs_path_t *, - pid_t, atf_tcr_t *); -static atf_error_t cleanup_parent(const atf_tc_t *, pid_t); -static atf_error_t fork_body(const atf_tc_t *, const atf_fs_path_t *, - atf_tcr_t *); -static atf_error_t fork_cleanup(const atf_tc_t *, const atf_fs_path_t *); -static atf_error_t get_tc_result(const atf_fs_path_t *, atf_tcr_t *); -static atf_error_t parse_tc_result(int, atf_tcr_t *); -static atf_error_t program_timeout(pid_t, const atf_tc_t *, - struct timeout_data *); -static void unprogram_timeout(struct timeout_data *); -static void sigalrm_handler(int); - -/* Child-only stuff. */ -static void body_child(const atf_tc_t *, const atf_fs_path_t *) - ATF_DEFS_ATTRIBUTE_NORETURN; -static atf_error_t check_arch(const char *, void *); -static atf_error_t check_config(const char *, void *); -static atf_error_t check_machine(const char *, void *); -static atf_error_t check_prog(const char *, void *); -static atf_error_t check_prog_in_dir(const char *, void *); -static atf_error_t check_requirements(const atf_tc_t *); -static void cleanup_child(const atf_tc_t *, const atf_fs_path_t *) - ATF_DEFS_ATTRIBUTE_NORETURN; -static void fatal_atf_error(const char *, atf_error_t) - ATF_DEFS_ATTRIBUTE_NORETURN; -static void fatal_libc_error(const char *, int) - ATF_DEFS_ATTRIBUTE_NORETURN; -static atf_error_t prepare_child(const atf_tc_t *, const atf_fs_path_t *); -static void write_tcr(const atf_tc_t *, const atf_tcr_t *); - -/* --------------------------------------------------------------------- - * The "atf_tc" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_tc_init(atf_tc_t *tc, const char *ident, atf_tc_head_t head, - atf_tc_body_t body, atf_tc_cleanup_t cleanup, - const atf_map_t *config) -{ - atf_error_t err; - - atf_object_init(&tc->m_object); - - tc->m_ident = ident; - tc->m_head = head; - tc->m_body = body; - tc->m_cleanup = cleanup; - tc->m_config = config; - - err = atf_map_init(&tc->m_vars); - if (atf_is_error(err)) - goto err_object; - - err = atf_tc_set_md_var(tc, "ident", ident); - if (atf_is_error(err)) - goto err_map; - - err = atf_tc_set_md_var(tc, "timeout", "300"); - if (atf_is_error(err)) - goto err_map; - - /* XXX Should the head be able to return error codes? */ - tc->m_head(tc); - - if (strcmp(atf_tc_get_md_var(tc, "ident"), ident) != 0) - atf_tc_fail("Test case head modified the read-only 'ident' " - "property"); - - INV(!atf_is_error(err)); - return err; - -err_map: - atf_map_fini(&tc->m_vars); -err_object: - atf_object_fini(&tc->m_object); - - return err; -} - -atf_error_t -atf_tc_init_pack(atf_tc_t *tc, const atf_tc_pack_t *pack, - const atf_map_t *config) -{ - return atf_tc_init(tc, pack->m_ident, pack->m_head, pack->m_body, - pack->m_cleanup, config); -} - -void -atf_tc_fini(atf_tc_t *tc) -{ - atf_map_fini(&tc->m_vars); - - atf_object_fini(&tc->m_object); -} - -/* - * Getters. - */ - -const char * -atf_tc_get_ident(const atf_tc_t *tc) -{ - return tc->m_ident; -} - -const char * -atf_tc_get_config_var(const atf_tc_t *tc, const char *name) -{ - const char *val; - atf_map_citer_t iter; - - PRE(atf_tc_has_config_var(tc, name)); - iter = atf_map_find_c(tc->m_config, name); - val = atf_map_citer_data(iter); - INV(val != NULL); - - return val; -} - -const char * -atf_tc_get_config_var_wd(const atf_tc_t *tc, const char *name, - const char *defval) -{ - const char *val; - - if (!atf_tc_has_config_var(tc, name)) - val = defval; - else - val = atf_tc_get_config_var(tc, name); - - return val; -} - -const char * -atf_tc_get_md_var(const atf_tc_t *tc, const char *name) -{ - const char *val; - atf_map_citer_t iter; - - PRE(atf_tc_has_md_var(tc, name)); - iter = atf_map_find_c(&tc->m_vars, name); - val = atf_map_citer_data(iter); - INV(val != NULL); - - return val; -} - -bool -atf_tc_has_config_var(const atf_tc_t *tc, const char *name) -{ - bool found; - atf_map_citer_t end, iter; - - if (tc->m_config == NULL) - found = false; - else { - iter = atf_map_find_c(tc->m_config, name); - end = atf_map_end_c(tc->m_config); - found = !atf_equal_map_citer_map_citer(iter, end); - } - - return found; -} - -bool -atf_tc_has_md_var(const atf_tc_t *tc, const char *name) -{ - atf_map_citer_t end, iter; - - iter = atf_map_find_c(&tc->m_vars, name); - end = atf_map_end_c(&tc->m_vars); - return !atf_equal_map_citer_map_citer(iter, end); -} - -/* - * Modifiers. - */ - -atf_error_t -atf_tc_set_md_var(atf_tc_t *tc, const char *name, const char *fmt, ...) -{ - atf_error_t err; - char *value; - va_list ap; - - va_start(ap, fmt); - err = atf_text_format_ap(&value, fmt, ap); - va_end(ap); - - if (!atf_is_error(err)) - err = atf_map_insert(&tc->m_vars, name, value, true); - else - free(value); - - return err; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -atf_error_t -atf_tc_run(const atf_tc_t *tc, atf_tcr_t *tcr, - const atf_fs_path_t *workdirbase) -{ - atf_error_t err, cleanuperr; - atf_fs_path_t workdir; - - err = atf_fs_path_copy(&workdir, workdirbase); - if (atf_is_error(err)) - goto out; - - err = atf_fs_path_append_fmt(&workdir, "atf.XXXXXX"); - if (atf_is_error(err)) - goto out_workdir; - - err = atf_fs_mkdtemp(&workdir); - if (atf_is_error(err)) - goto out_workdir; - - err = fork_body(tc, &workdir, tcr); - cleanuperr = fork_cleanup(tc, &workdir); - if (!atf_is_error(cleanuperr)) - (void)atf_fs_cleanup(&workdir); - if (!atf_is_error(err)) - err = cleanuperr; - else if (atf_is_error(cleanuperr)) - atf_error_free(cleanuperr); - -out_workdir: - atf_fs_path_fini(&workdir); -out: - return err; -} - -/* - * Parent-only stuff. - */ - -static bool sigalrm_killed = false; -static pid_t sigalrm_pid = -1; - -static -void -sigalrm_handler(int signo) -{ - INV(signo == SIGALRM); - - if (sigalrm_pid != -1) { - killpg(sigalrm_pid, SIGTERM); - sigalrm_killed = true; - } -} - -struct timeout_data { - bool m_programmed; - atf_signal_programmer_t m_sigalrm; -}; - -static -atf_error_t -program_timeout(pid_t pid, const atf_tc_t *tc, struct timeout_data *td) -{ - atf_error_t err; - long timeout; - - err = atf_text_to_long(atf_tc_get_md_var(tc, "timeout"), &timeout); - if (atf_is_error(err)) - goto out; - - if (timeout != 0) { - sigalrm_pid = pid; - sigalrm_killed = false; - - err = atf_signal_programmer_init(&td->m_sigalrm, SIGALRM, - sigalrm_handler); - if (atf_is_error(err)) - goto out; - - struct itimerval itv; - timerclear(&itv.it_interval); - timerclear(&itv.it_value); - itv.it_value.tv_sec = timeout; - if (setitimer(ITIMER_REAL, &itv, NULL) == -1) { - atf_signal_programmer_fini(&td->m_sigalrm); - err = atf_libc_error(errno, "Failed to program timeout " - "with %ld seconds", timeout); - } - - td->m_programmed = !atf_is_error(err); - } else - td->m_programmed = false; - -out: - return err; -} - -static -void -unprogram_timeout(struct timeout_data *td) -{ - if (td->m_programmed) { - atf_signal_programmer_fini(&td->m_sigalrm); - sigalrm_pid = -1; - sigalrm_killed = false; - } -} - -static -atf_error_t -body_parent(const atf_tc_t *tc, const atf_fs_path_t *workdir, pid_t pid, - atf_tcr_t *tcr) -{ - atf_error_t err; - int state; - struct timeout_data td; - - err = program_timeout(pid, tc, &td); - if (atf_is_error(err)) { - char buf[4096]; - - atf_error_format(err, buf, sizeof(buf)); - fprintf(stderr, "Error programming test case's timeout: %s", buf); - atf_error_free(err); - killpg(pid, SIGKILL); - } - - if (waitpid(pid, &state, 0) == -1) { - if (errno == EINTR && sigalrm_killed) - err = atf_tcr_init_reason_fmt(tcr, atf_tcr_failed_state, - "Test case timed out after %s " - "seconds", - atf_tc_get_md_var(tc, "timeout")); - else - err = atf_libc_error(errno, "Error waiting for child process " - "%d", pid); - } else { - if (!WIFEXITED(state) || WEXITSTATUS(state) != EXIT_SUCCESS) - err = atf_tcr_init_reason_fmt(tcr, atf_tcr_failed_state, - "Test case did not exit cleanly; " - "state was %d", state); - else - err = get_tc_result(workdir, tcr); - } - - unprogram_timeout(&td); - - return err; -} - -static -atf_error_t -cleanup_parent(const atf_tc_t *tc, pid_t pid) -{ - atf_error_t err; - int state; - - if (waitpid(pid, &state, 0) == -1) { - err = atf_libc_error(errno, "Error waiting for child process " - "%d", pid); - goto out; - } - - if (!WIFEXITED(state) || WEXITSTATUS(state) != EXIT_SUCCESS) - /* XXX Not really a libc error. */ - err = atf_libc_error(EINVAL, "Child process did not exit cleanly"); - else - err = atf_no_error(); - -out: - return err; -} - -static -atf_error_t -fork_body(const atf_tc_t *tc, const atf_fs_path_t *workdir, atf_tcr_t *tcr) -{ - atf_error_t err; - pid_t pid; - - pid = fork(); - if (pid == -1) { - err = atf_libc_error(errno, "Cannot fork to run test case body " - "of %s", tc->m_ident); - } else if (pid == 0) { - body_child(tc, workdir); - UNREACHABLE; - abort(); - } else { - err = body_parent(tc, workdir, pid, tcr); - } - - return err; -} - -static -atf_error_t -fork_cleanup(const atf_tc_t *tc, const atf_fs_path_t *workdir) -{ - atf_error_t err; - pid_t pid; - - if (tc->m_cleanup == NULL) - err = atf_no_error(); - else { - pid = fork(); - if (pid == -1) { - err = atf_libc_error(errno, "Cannot fork to run test case " - "cleanup of %s", tc->m_ident); - } else if (pid == 0) { - cleanup_child(tc, workdir); - UNREACHABLE; - abort(); - } else { - err = cleanup_parent(tc, pid); - } - } - - return err; -} - -static -atf_error_t -get_tc_result(const atf_fs_path_t *workdir, atf_tcr_t *tcr) -{ - atf_error_t err; - int fd; - atf_fs_path_t tcrfile; - - err = atf_fs_path_copy(&tcrfile, workdir); - if (atf_is_error(err)) - goto out; - - err = atf_fs_path_append_fmt(&tcrfile, "tc-result"); - if (atf_is_error(err)) - goto out_tcrfile; - - fd = open(atf_fs_path_cstring(&tcrfile), O_RDONLY); - if (fd == -1) { - err = atf_libc_error(errno, "Cannot retrieve test case result"); - goto out_tcrfile; - } - - err = parse_tc_result(fd, tcr); - - close(fd); -out_tcrfile: - atf_fs_path_fini(&tcrfile); -out: - return err; -} - -static -atf_error_t -parse_tc_result(int fd, atf_tcr_t *tcr) -{ - atf_error_t err; - atf_dynstr_t state, reason; - - err = atf_dynstr_init(&state); - if (atf_is_error(err)) - goto out; - - err = atf_dynstr_init(&reason); - if (atf_is_error(err)) - goto out_state; - - err = atf_io_readline(fd, &state); - if (atf_is_error(err)) - goto out_reason; - - if (atf_equal_dynstr_cstring(&state, "passed")) - err = atf_tcr_init(tcr, atf_tcr_passed_state); - else { - err = atf_io_readline(fd, &reason); - if (atf_is_error(err)) - goto out_reason; - - if (atf_equal_dynstr_cstring(&state, "failed")) - err = atf_tcr_init_reason_fmt(tcr, atf_tcr_failed_state, "%s", - atf_dynstr_cstring(&reason)); - else if (atf_equal_dynstr_cstring(&state, "skipped")) - err = atf_tcr_init_reason_fmt(tcr, atf_tcr_skipped_state, "%s", - atf_dynstr_cstring(&reason)); - else - UNREACHABLE; - } - -out_reason: - atf_dynstr_fini(&reason); -out_state: - atf_dynstr_fini(&state); -out: - return err; -} - -/* - * Child-only stuff. - */ - -static const atf_tc_t *current_tc = NULL; -static const atf_fs_path_t *current_workdir = NULL; - -static -atf_error_t -prepare_child(const atf_tc_t *tc, const atf_fs_path_t *workdir) -{ - atf_error_t err; - int i, ret; - - current_tc = tc; - current_workdir = workdir; - - ret = setpgid(getpid(), 0); - INV(ret != -1); - - umask(S_IWGRP | S_IWOTH); - - for (i = 1; i <= atf_signals_last_signo; i++) - atf_signal_reset(i); - - err = atf_env_set("HOME", atf_fs_path_cstring(workdir)); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LANG"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_ALL"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_COLLATE"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_CTYPE"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_MESSAGES"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_MONETARY"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_NUMERIC"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("LC_TIME"); - if (atf_is_error(err)) - goto out; - - err = atf_env_unset("TZ"); - if (atf_is_error(err)) - goto out; - - if (chdir(atf_fs_path_cstring(workdir)) == -1) { - err = atf_libc_error(errno, "Cannot enter work directory '%s'", - atf_fs_path_cstring(workdir)); - goto out; - } - - err = atf_no_error(); - -out: - return err; -} - -static -void -body_child(const atf_tc_t *tc, const atf_fs_path_t *workdir) -{ - atf_error_t err; - - atf_disable_exit_checks(); - - err = prepare_child(tc, workdir); - if (atf_is_error(err)) - goto print_err; - err = check_requirements(tc); - if (atf_is_error(err)) - goto print_err; - tc->m_body(tc); - atf_tc_pass(); - - UNREACHABLE; - abort(); - -print_err: - INV(atf_is_error(err)); - { - char buf[4096]; - - atf_error_format(err, buf, sizeof(buf)); - atf_error_free(err); - - atf_tc_fail("Error while preparing child process: %s", buf); - } - - UNREACHABLE; - abort(); -} - -static -atf_error_t -check_arch(const char *arch, void *data) -{ - bool *found = data; - - if (strcmp(arch, atf_config_get("atf_arch")) == 0) - *found = true; - - return atf_no_error(); -} - -static -atf_error_t -check_config(const char *var, void *data) -{ - if (!atf_tc_has_config_var(current_tc, var)) - atf_tc_skip("Required configuration variable %s not defined", var); - - return atf_no_error(); -} - -static -atf_error_t -check_machine(const char *machine, void *data) -{ - bool *found = data; - - if (strcmp(machine, atf_config_get("atf_machine")) == 0) - *found = true; - - return atf_no_error(); -} - -struct prog_found_pair { - const char *prog; - bool found; -}; - -static -atf_error_t -check_prog(const char *prog, void *data) -{ - atf_error_t err; - atf_fs_path_t p; - - err = atf_fs_path_init_fmt(&p, "%s", prog); - if (atf_is_error(err)) - goto out; - - if (atf_fs_path_is_absolute(&p)) { - if (atf_is_error(atf_fs_eaccess(&p, atf_fs_access_x))) - atf_tc_skip("The required program %s could not be found", prog); - } else { - const char *path = atf_env_get("PATH"); - struct prog_found_pair pf; - atf_fs_path_t bp; - - err = atf_fs_path_branch_path(&p, &bp); - if (atf_is_error(err)) - goto out_p; - - if (strcmp(atf_fs_path_cstring(&bp), ".") != 0) - atf_tc_fail("Relative paths are not allowed when searching for " - "a program (%s)", prog); - - pf.prog = prog; - pf.found = false; - err = atf_text_for_each_word(path, ":", check_prog_in_dir, &pf); - if (atf_is_error(err)) - goto out_bp; - - if (!pf.found) - atf_tc_skip("The required program %s could not be found in " - "the PATH", prog); - -out_bp: - atf_fs_path_fini(&bp); - } - -out_p: - atf_fs_path_fini(&p); -out: - return err; -} - -static -atf_error_t -check_prog_in_dir(const char *dir, void *data) -{ - struct prog_found_pair *pf = data; - atf_error_t err; - - if (pf->found) - err = atf_no_error(); - else { - atf_fs_path_t p; - - err = atf_fs_path_init_fmt(&p, "%s/%s", dir, pf->prog); - if (atf_is_error(err)) - goto out_p; - - if (!atf_is_error(atf_fs_eaccess(&p, atf_fs_access_x))) - pf->found = true; - -out_p: - atf_fs_path_fini(&p); - } - - return err; -} - -static -atf_error_t -check_requirements(const atf_tc_t *tc) -{ - atf_error_t err; - - err = atf_no_error(); - - if (atf_tc_has_md_var(tc, "require.arch")) { - const char *arches = atf_tc_get_md_var(tc, "require.arch"); - bool found = false; - - if (strlen(arches) == 0) - atf_tc_fail("Invalid value in the require.arch property"); - else { - err = atf_text_for_each_word(arches, " ", check_arch, &found); - if (atf_is_error(err)) - goto out; - - if (!found) - atf_tc_skip("Requires one of the '%s' architectures", - arches); - } - } - - if (atf_tc_has_md_var(tc, "require.config")) { - const char *vars = atf_tc_get_md_var(tc, "require.config"); - - if (strlen(vars) == 0) - atf_tc_fail("Invalid value in the require.config property"); - else { - err = atf_text_for_each_word(vars, " ", check_config, NULL); - if (atf_is_error(err)) - goto out; - } - } - - if (atf_tc_has_md_var(tc, "require.machine")) { - const char *machines = atf_tc_get_md_var(tc, "require.machine"); - bool found = false; - - if (strlen(machines) == 0) - atf_tc_fail("Invalid value in the require.machine property"); - else { - err = atf_text_for_each_word(machines, " ", check_machine, - &found); - if (atf_is_error(err)) - goto out; - - if (!found) - atf_tc_skip("Requires one of the '%s' machine types", - machines); - } - } - - if (atf_tc_has_md_var(tc, "require.progs")) { - const char *progs = atf_tc_get_md_var(tc, "require.progs"); - - if (strlen(progs) == 0) - atf_tc_fail("Invalid value in the require.progs property"); - else { - err = atf_text_for_each_word(progs, " ", check_prog, NULL); - if (atf_is_error(err)) - goto out; - } - } - - if (atf_tc_has_md_var(tc, "require.user")) { - const char *u = atf_tc_get_md_var(tc, "require.user"); - - if (strcmp(u, "root") == 0) { - if (!atf_user_is_root()) - atf_tc_skip("Requires root privileges"); - } else if (strcmp(u, "unprivileged") == 0) { - if (atf_user_is_root()) - atf_tc_skip("Requires an unprivileged user"); - } else - atf_tc_fail("Invalid value in the require.user property"); - } - - INV(!atf_is_error(err)); -out: - return err; -} - -static -void -cleanup_child(const atf_tc_t *tc, const atf_fs_path_t *workdir) -{ - atf_error_t err; - - atf_disable_exit_checks(); - - err = prepare_child(tc, workdir); - if (atf_is_error(err)) - exit(EXIT_FAILURE); - else { - tc->m_cleanup(tc); - exit(EXIT_SUCCESS); - } - - UNREACHABLE; - abort(); -} - -static -void -fatal_atf_error(const char *prefix, atf_error_t err) -{ - char buf[1024]; - - INV(atf_is_error(err)); - - atf_error_format(err, buf, sizeof(buf)); - atf_error_free(err); - - fprintf(stderr, "%s: %s", prefix, buf); - - abort(); -} - -static -void -fatal_libc_error(const char *prefix, int err) -{ - fprintf(stderr, "%s: %s", prefix, strerror(err)); - - abort(); -} - -static -void -write_tcr(const atf_tc_t *tc, const atf_tcr_t *tcr) -{ - atf_error_t err; - int fd; - atf_fs_path_t tcrfile; - - err = atf_fs_path_copy(&tcrfile, current_workdir); - if (atf_is_error(err)) - fatal_atf_error("Cannot write test case results", err); - - err = atf_fs_path_append_fmt(&tcrfile, "tc-result"); - if (atf_is_error(err)) - fatal_atf_error("Cannot write test case results", err); - - fd = open(atf_fs_path_cstring(&tcrfile), - O_WRONLY | O_CREAT | O_TRUNC, 0755); - if (fd == -1) - fatal_libc_error("Cannot write test case results", errno); - - { - const atf_tcr_state_t s = atf_tcr_get_state(tcr); - const char *str; - - if (s == atf_tcr_passed_state) - str = "passed"; - else if (s == atf_tcr_failed_state) - str = "failed"; - else if (s == atf_tcr_skipped_state) - str = "skipped"; - else { - UNREACHABLE; - str = NULL; - } - - err = atf_io_write_fmt(fd, "%s\n", str); - if (atf_is_error(err)) - fatal_atf_error("Cannot write test case results", err); - } - - { - if (atf_tcr_has_reason(tcr)) { - const atf_dynstr_t *r = atf_tcr_get_reason(tcr); - err = atf_io_write_fmt(fd, "%s\n", atf_dynstr_cstring(r)); - if (atf_is_error(err)) - fatal_atf_error("Cannot write test case results", err); - } - } - - close(fd); -} - -void -atf_tc_fail(const char *fmt, ...) -{ - va_list ap; - atf_tcr_t tcr; - atf_error_t err; - - PRE(current_tc != NULL); - - va_start(ap, fmt); - err = atf_tcr_init_reason_ap(&tcr, atf_tcr_failed_state, fmt, ap); - va_end(ap); - if (atf_is_error(err)) - abort(); - - write_tcr(current_tc, &tcr); - - atf_tcr_fini(&tcr); - - exit(EXIT_SUCCESS); -} - -void -atf_tc_pass(void) -{ - atf_tcr_t tcr; - atf_error_t err; - - PRE(current_tc != NULL); - - err = atf_tcr_init(&tcr, atf_tcr_passed_state); - if (atf_is_error(err)) - abort(); - - write_tcr(current_tc, &tcr); - - atf_tcr_fini(&tcr); - - exit(EXIT_SUCCESS); -} - -void -atf_tc_require_prog(const char *prog) -{ - atf_error_t err; - - err = check_prog(prog, NULL); - if (atf_is_error(err)) - atf_tc_fail("atf_tc_require_prog failed"); /* XXX Correct? */ -} - -void -atf_tc_skip(const char *fmt, ...) -{ - va_list ap; - atf_tcr_t tcr; - atf_error_t err; - - PRE(current_tc != NULL); - - va_start(ap, fmt); - err = atf_tcr_init_reason_ap(&tcr, atf_tcr_skipped_state, fmt, ap); - va_end(ap); - if (atf_is_error(err)) - abort(); - - write_tcr(current_tc, &tcr); - - atf_tcr_fini(&tcr); - - exit(EXIT_SUCCESS); -} diff --git a/dist/atf/atf-c/tc.h b/dist/atf/atf-c/tc.h deleted file mode 100644 index 903cde24200d..000000000000 --- a/dist/atf/atf-c/tc.h +++ /dev/null @@ -1,114 +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_TC_H) -#define ATF_C_TC_H - -#include -#include -#include -#include - -struct atf_dynstr; -struct atf_fs_path; -struct atf_tc; -struct atf_tcr; - -typedef void (*atf_tc_head_t)(struct atf_tc *); -typedef void (*atf_tc_body_t)(const struct atf_tc *); -typedef void (*atf_tc_cleanup_t)(const struct atf_tc *); - -/* --------------------------------------------------------------------- - * The "atf_tc_pack" type. - * --------------------------------------------------------------------- */ - -/* For static initialization only. */ -struct atf_tc_pack { - const char *m_ident; - - const atf_map_t *m_config; - - atf_tc_head_t m_head; - atf_tc_body_t m_body; - atf_tc_cleanup_t m_cleanup; -}; -typedef const struct atf_tc_pack atf_tc_pack_t; - -/* --------------------------------------------------------------------- - * The "atf_tc" type. - * --------------------------------------------------------------------- */ - -struct atf_tc { - atf_object_t m_object; - - const char *m_ident; - - atf_map_t m_vars; - const atf_map_t *m_config; - - atf_tc_head_t m_head; - atf_tc_body_t m_body; - atf_tc_cleanup_t m_cleanup; -}; -typedef struct atf_tc atf_tc_t; - -/* Constructors/destructors. */ -atf_error_t atf_tc_init(atf_tc_t *, const char *, atf_tc_head_t, - atf_tc_body_t, atf_tc_cleanup_t, - const atf_map_t *); -atf_error_t atf_tc_init_pack(atf_tc_t *, atf_tc_pack_t *, - const atf_map_t *); -void atf_tc_fini(atf_tc_t *); - -/* Getters. */ -const char *atf_tc_get_ident(const atf_tc_t *); -const char *atf_tc_get_config_var(const atf_tc_t *, const char *); -const char *atf_tc_get_config_var_wd(const atf_tc_t *, const char *, - const char *); -const char *atf_tc_get_md_var(const atf_tc_t *, const char *); -bool atf_tc_has_config_var(const atf_tc_t *, const char *); -bool atf_tc_has_md_var(const atf_tc_t *, const char *); - -/* Modifiers. */ -atf_error_t atf_tc_set_md_var(atf_tc_t *, const char *, const char *, ...); - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -atf_error_t atf_tc_run(const atf_tc_t *, struct atf_tcr *, - const struct atf_fs_path *); - -/* To be run from test case bodies only. */ -void atf_tc_fail(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN; -void atf_tc_pass(void) ATF_DEFS_ATTRIBUTE_NORETURN; -void atf_tc_require_prog(const char *); -void atf_tc_skip(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN; - -#endif /* ATF_C_TC_H */ diff --git a/dist/atf/atf-c/tcr.c b/dist/atf/atf-c/tcr.c deleted file mode 100644 index bd5cd95b753b..000000000000 --- a/dist/atf/atf-c/tcr.c +++ /dev/null @@ -1,200 +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 "atf-c/sanity.h" -#include "atf-c/tcr.h" - -/* --------------------------------------------------------------------- - * Auxiliary types and functions. - * --------------------------------------------------------------------- */ - -static -bool -state_allows_reason(atf_tcr_state_t state) -{ - return state == atf_tcr_failed_state || state == atf_tcr_skipped_state; -} - -static -atf_error_t -format_reason(atf_dynstr_t *reason, const char *fmt, va_list ap) -{ - atf_error_t err; - atf_dynstr_t tmp; - va_list ap2; - - va_copy(ap2, ap); - err = atf_dynstr_init_ap(&tmp, fmt, ap2); - va_end(ap2); - if (atf_is_error(err)) - goto out; - - /* There is no reason for calling rfind instead of find other than - * find is not implemented. */ - if (atf_dynstr_rfind_ch(&tmp, '\n') == atf_dynstr_npos) { - err = atf_dynstr_copy(reason, &tmp); - } else { - const char *iter; - - err = atf_dynstr_init_fmt(reason, "BOGUS REASON (THE ORIGINAL " - "HAD NEWLINES): "); - if (atf_is_error(err)) - goto out_tmp; - - for (iter = atf_dynstr_cstring(&tmp); *iter != '\0'; iter++) { - if (*iter == '\n') - err = atf_dynstr_append_fmt(reason, "<>"); - else - err = atf_dynstr_append_fmt(reason, "%c", *iter); - - if (atf_is_error(err)) { - atf_dynstr_fini(reason); - break; - } - } - } - -out_tmp: - atf_dynstr_fini(&tmp); -out: - return err; -} - -/* --------------------------------------------------------------------- - * The "atf_tcr" type. - * --------------------------------------------------------------------- */ - -/* - * Constants. - */ -const atf_tcr_state_t atf_tcr_passed_state = 0; -const atf_tcr_state_t atf_tcr_failed_state = 1; -const atf_tcr_state_t atf_tcr_skipped_state = 2; - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_tcr_init(atf_tcr_t *tcr, atf_tcr_state_t state) -{ - atf_error_t err; - - PRE(!state_allows_reason(state)); - - atf_object_init(&tcr->m_object); - - tcr->m_state = state; - - err = atf_dynstr_init(&tcr->m_reason); - if (atf_is_error(err)) - goto err_object; - - INV(!atf_is_error(err)); - return err; - -err_object: - atf_object_fini(&tcr->m_object); - - return err; -} - -atf_error_t -atf_tcr_init_reason_ap(atf_tcr_t *tcr, atf_tcr_state_t state, - const char *fmt, va_list ap) -{ - va_list ap2; - atf_error_t err; - - PRE(state_allows_reason(state)); - - atf_object_init(&tcr->m_object); - - tcr->m_state = state; - - va_copy(ap2, ap); - err = format_reason(&tcr->m_reason, fmt, ap2); - va_end(ap2); - if (atf_is_error(err)) - goto err_object; - - INV(!atf_is_error(err)); - return err; - -err_object: - atf_object_fini(&tcr->m_object); - - return err; -} - -atf_error_t -atf_tcr_init_reason_fmt(atf_tcr_t *tcr, atf_tcr_state_t state, - const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_tcr_init_reason_ap(tcr, state, fmt, ap); - va_end(ap); - - return err; -} - -void -atf_tcr_fini(atf_tcr_t *tcr) -{ - atf_dynstr_fini(&tcr->m_reason); - - atf_object_fini(&tcr->m_object); -} - -/* - * Getters. */ - -atf_tcr_state_t -atf_tcr_get_state(const atf_tcr_t *tcr) -{ - return tcr->m_state; -} - -const atf_dynstr_t * -atf_tcr_get_reason(const atf_tcr_t *tcr) -{ - PRE(state_allows_reason(tcr->m_state)); - return &tcr->m_reason; -} - -bool -atf_tcr_has_reason(const atf_tcr_t *tcr) -{ - return state_allows_reason(tcr->m_state); -} diff --git a/dist/atf/atf-c/tcr.h b/dist/atf/atf-c/tcr.h deleted file mode 100644 index d245bd9a9a49..000000000000 --- a/dist/atf/atf-c/tcr.h +++ /dev/null @@ -1,72 +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_TCR_H) -#define ATF_C_TCR_H - -#include -#include - -#include -#include -#include - -/* --------------------------------------------------------------------- - * The "atf_tcr" type. - * --------------------------------------------------------------------- */ - -typedef int atf_tcr_state_t; - -struct atf_tcr { - atf_object_t m_object; - - atf_tcr_state_t m_state; - atf_dynstr_t m_reason; -}; -typedef struct atf_tcr atf_tcr_t; - -/* Constants. */ -extern const atf_tcr_state_t atf_tcr_passed_state; -extern const atf_tcr_state_t atf_tcr_failed_state; -extern const atf_tcr_state_t atf_tcr_skipped_state; - -/* Constructors/destructors. */ -atf_error_t atf_tcr_init(atf_tcr_t *, int); -atf_error_t atf_tcr_init_reason_ap(atf_tcr_t *, atf_tcr_state_t, - const char *, va_list); -atf_error_t atf_tcr_init_reason_fmt(atf_tcr_t *, atf_tcr_state_t, - const char *, ...); -void atf_tcr_fini(atf_tcr_t *); - -/* Getters. */ -atf_tcr_state_t atf_tcr_get_state(const atf_tcr_t *); -const atf_dynstr_t *atf_tcr_get_reason(const atf_tcr_t *); -bool atf_tcr_has_reason(const atf_tcr_t *); - -#endif /* ATF_C_TCR_H */ diff --git a/dist/atf/atf-c/text.c b/dist/atf/atf-c/text.c deleted file mode 100644 index 261d02752120..000000000000 --- a/dist/atf/atf-c/text.c +++ /dev/null @@ -1,134 +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/dynstr.h" -#include "atf-c/text.h" - -atf_error_t -atf_text_for_each_word(const char *instr, const char *sep, - atf_error_t (*func)(const char *, void *), - void *data) -{ - atf_error_t err; - char *str, *str2, *last; - - str = strdup(instr); - if (str == NULL) { - err = atf_no_memory_error(); - goto out; - } - - err = atf_no_error(); - str2 = strtok_r(str, sep, &last); - while (str2 != NULL && !atf_is_error(err)) { - err = func(str2, data); - str2 = strtok_r(NULL, sep, &last); - } - - free(str); -out: - return err; -} - -atf_error_t -atf_text_format(char **dest, const char *fmt, ...) -{ - atf_error_t err; - va_list ap; - - va_start(ap, fmt); - err = atf_text_format_ap(dest, fmt, ap); - va_end(ap); - - return err; -} - -atf_error_t -atf_text_format_ap(char **dest, const char *fmt, va_list ap) -{ - atf_error_t err; - atf_dynstr_t tmp; - va_list ap2; - - va_copy(ap2, ap); - err = atf_dynstr_init_ap(&tmp, fmt, ap2); - va_end(ap2); - if (!atf_is_error(err)) - *dest = atf_dynstr_fini_disown(&tmp); - - return err; -} - -atf_error_t -atf_text_to_bool(const char *str, bool *b) -{ - atf_error_t err; - - if (strcasecmp(str, "yes") == 0 || - strcasecmp(str, "true") == 0) { - *b = true; - err = atf_no_error(); - } else if (strcasecmp(str, "no") == 0 || - strcasecmp(str, "false") == 0) { - *b = false; - err = atf_no_error(); - } else { - /* XXX Not really a libc error. */ - err = atf_libc_error(EINVAL, "Cannot convert string '%s' " - "to boolean", str); - } - - return err; -} - -atf_error_t -atf_text_to_long(const char *str, long *l) -{ - atf_error_t err; - char *endptr; - long tmp; - - errno = 0; - tmp = strtol(str, &endptr, 10); - if (str[0] == '\0' || *endptr != '\0') - err = atf_libc_error(EINVAL, "'%s' is not a number", str); - else if (errno == ERANGE || (tmp == LONG_MAX || tmp == LONG_MIN)) - err = atf_libc_error(ERANGE, "'%s' is out of range", str); - else { - *l = tmp; - err = atf_no_error(); - } - - return err; -} diff --git a/dist/atf/atf-c/text.h b/dist/atf/atf-c/text.h deleted file mode 100644 index 803e6b19bc61..000000000000 --- a/dist/atf/atf-c/text.h +++ /dev/null @@ -1,45 +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_TEXT_H) -#define ATF_C_TEXT_H - -#include - -#include - -atf_error_t atf_text_for_each_word(const char *, const char *, - atf_error_t (*)(const char *, void *), - void *); -atf_error_t atf_text_format(char **, const char *, ...); -atf_error_t atf_text_format_ap(char **, const char *, va_list); -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 */ diff --git a/dist/atf/atf-c/tp.c b/dist/atf/atf-c/tp.c deleted file mode 100644 index 01c00d945de8..000000000000 --- a/dist/atf/atf-c/tp.c +++ /dev/null @@ -1,217 +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 "atf-c/fs.h" -#include "atf-c/io.h" -#include "atf-c/sanity.h" -#include "atf-c/tc.h" -#include "atf-c/tcr.h" -#include "atf-c/tp.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -const atf_tc_t * -find_tc(const atf_tp_t *tp, const char *ident) -{ - const atf_tc_t *tc; - atf_list_citer_t iter; - - tc = NULL; - atf_list_for_each_c(iter, &tp->m_tcs) { - const atf_tc_t *tc2; - tc2 = atf_list_citer_data(iter); - if (strcmp(tc2->m_ident, ident) == 0) { - tc = tc2; - break; - } - } - return tc; -} - -/* --------------------------------------------------------------------- - * The "atf_tp" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors/destructors. - */ - -atf_error_t -atf_tp_init(atf_tp_t *tp, struct atf_map *config) -{ - atf_error_t err; - - PRE(config != NULL); - - atf_object_init(&tp->m_object); - - err = atf_list_init(&tp->m_tcs); - if (atf_is_error(err)) - goto err_object; - - tp->m_config = config; - - INV(!atf_is_error(err)); - return err; - -err_object: - atf_object_fini(&tp->m_object); - return err; -} - -void -atf_tp_fini(atf_tp_t *tp) -{ - atf_list_iter_t iter; - - atf_list_for_each(iter, &tp->m_tcs) { - atf_tc_t *tc = atf_list_iter_data(iter); - atf_tc_fini(tc); - } - atf_list_fini(&tp->m_tcs); - - atf_object_fini(&tp->m_object); -} - -/* - * Getters. - */ - -const struct atf_map * -atf_tp_get_config(const atf_tp_t *tp) -{ - return tp->m_config; -} - -const atf_tc_t * -atf_tp_get_tc(const atf_tp_t *tp, const char *id) -{ - const atf_tc_t *tc = find_tc(tp, id); - PRE(tc != NULL); - return tc; -} - -const atf_list_t * -atf_tp_get_tcs(const atf_tp_t *tp) -{ - return &tp->m_tcs; -} - -/* - * Modifiers. - */ - -atf_error_t -atf_tp_add_tc(atf_tp_t *tp, atf_tc_t *tc) -{ - atf_error_t err; - - PRE(find_tc(tp, tc->m_ident) == NULL); - - err = atf_list_append(&tp->m_tcs, tc); - - POST(find_tc(tp, tc->m_ident) != NULL); - - return err; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -atf_error_t -atf_tp_run(const atf_tp_t *tp, const atf_list_t *ids, int fd, - const atf_fs_path_t *workdir, size_t *failcount) -{ - atf_error_t err; - atf_list_citer_t iter; - size_t count; - - err = atf_io_write_fmt(fd, "Content-Type: application/X-atf-tcs; " - "version=\"1\"\n\n"); - if (atf_is_error(err)) - goto out; - err = atf_io_write_fmt(fd, "tcs-count: %d\n", atf_list_size(ids)); - if (atf_is_error(err)) - goto out; - - *failcount = count = 0; - atf_list_for_each_c(iter, ids) { - const char *ident = atf_list_citer_data(iter); - const atf_tc_t *tc; - atf_tcr_t tcr; - int state; - - err = atf_io_write_fmt(fd, "tc-start: %s\n", ident); - if (atf_is_error(err)) - goto out; - - tc = find_tc(tp, ident); - PRE(tc != NULL); - - err = atf_tc_run(tc, &tcr, workdir); - if (atf_is_error(err)) - goto out; - - count++; - if (count < atf_list_size(ids)) { - fprintf(stdout, "__atf_tc_separator__\n"); - fprintf(stderr, "__atf_tc_separator__\n"); - } - fflush(stdout); - fflush(stderr); - - state = atf_tcr_get_state(&tcr); - if (state == atf_tcr_passed_state) { - err = atf_io_write_fmt(fd, "tc-end: %s, passed\n", ident); - } else if (state == atf_tcr_failed_state) { - const atf_dynstr_t *reason = atf_tcr_get_reason(&tcr); - err = atf_io_write_fmt(fd, "tc-end: %s, failed, %s\n", ident, - atf_dynstr_cstring(reason)); - (*failcount)++; - } else if (state == atf_tcr_skipped_state) { - const atf_dynstr_t *reason = atf_tcr_get_reason(&tcr); - err = atf_io_write_fmt(fd, "tc-end: %s, skipped, %s\n", ident, - atf_dynstr_cstring(reason)); - } else - UNREACHABLE; - atf_tcr_fini(&tcr); - if (atf_is_error(err)) - goto out; - } - -out: - return err; -} diff --git a/dist/atf/atf-c/tp.h b/dist/atf/atf-c/tp.h deleted file mode 100644 index d90e9f5a0751..000000000000 --- a/dist/atf/atf-c/tp.h +++ /dev/null @@ -1,72 +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_TP_H) -#define ATF_C_TP_H - -#include -#include -#include - -struct atf_fs_path; -struct atf_map; -struct atf_tc; - -/* --------------------------------------------------------------------- - * The "atf_tp" type. - * --------------------------------------------------------------------- */ - -struct atf_tp { - atf_object_t m_object; - - atf_list_t m_tcs; - const struct atf_map *m_config; -}; -typedef struct atf_tp atf_tp_t; - -/* Constructors/destructors. */ -atf_error_t atf_tp_init(atf_tp_t *, struct atf_map *); -void atf_tp_fini(atf_tp_t *); - -/* Getters. */ -const struct atf_map *atf_tp_get_config(const atf_tp_t *); -const struct atf_tc *atf_tp_get_tc(const atf_tp_t *, const char *); -const atf_list_t *atf_tp_get_tcs(const atf_tp_t *); - -/* Modifiers. */ -atf_error_t atf_tp_add_tc(atf_tp_t *, struct atf_tc *); - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -atf_error_t atf_tp_run(const atf_tp_t *, const atf_list_t *, int, - const struct atf_fs_path *, size_t *); - -#endif /* ATF_C_TP_H */ diff --git a/dist/atf/atf-c/tp_main.c b/dist/atf/atf-c/tp_main.c deleted file mode 100644 index 4cc81bf092de..000000000000 --- a/dist/atf/atf-c/tp_main.c +++ /dev/null @@ -1,648 +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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include "atf-c/config.h" -#include "atf-c/dynstr.h" -#include "atf-c/expand.h" -#include "atf-c/fs.h" -#include "atf-c/object.h" -#include "atf-c/map.h" -#include "atf-c/sanity.h" -#include "atf-c/tc.h" -#include "atf-c/tp.h" -#include "atf-c/ui.h" - -#if defined(HAVE_GNU_GETOPT) -# define GETOPT_POSIX "+" -#else -# define GETOPT_POSIX "" -#endif - -static const char *progname = NULL; - -/* This prototype is provided by macros.h during instantiation of the test - * program, so it can be kept private. Don't know if that's the best idea - * though. */ -int atf_tp_main(int, char **, atf_error_t (*)(atf_tp_t *)); - -/* --------------------------------------------------------------------- - * The "usage" and "user" error types. - * --------------------------------------------------------------------- */ - -#define FREE_FORM_ERROR(name) \ - struct name ## _error_data { \ - char m_what[2048]; \ - }; \ - \ - static \ - void \ - name ## _format(const atf_error_t err, char *buf, size_t buflen) \ - { \ - const struct name ## _error_data *data; \ - \ - PRE(atf_error_is(err, #name)); \ - \ - data = atf_error_data(err); \ - snprintf(buf, buflen, "%s", data->m_what); \ - } \ - \ - static \ - atf_error_t \ - name ## _error(const char *fmt, ...) \ - { \ - atf_error_t err; \ - struct name ## _error_data data; \ - va_list ap; \ - \ - va_start(ap, fmt); \ - vsnprintf(data.m_what, sizeof(data.m_what), fmt, ap); \ - va_end(ap); \ - \ - err = atf_error_new(#name, &data, sizeof(data), name ## _format); \ - \ - return err; \ - } - -FREE_FORM_ERROR(usage); -FREE_FORM_ERROR(user); - -/* --------------------------------------------------------------------- - * Printing functions. - * --------------------------------------------------------------------- */ - -/* XXX: Why are these functions here? We have got a ui module, and it - * seems the correct place to put these. Otherwise, the functions that - * currently live there only format text, so they'd be moved to the text - * module instead and kill ui completely. */ - -static -atf_error_t -print_tag(FILE *f, const char *tag, bool repeat, size_t col, - const char *fmt, ...) -{ - atf_error_t err; - va_list ap; - atf_dynstr_t dest; - - err = atf_dynstr_init(&dest); - if (atf_is_error(err)) - goto out; - - va_start(ap, fmt); - err = atf_ui_format_ap(&dest, tag, repeat, col, fmt, ap); - va_end(ap); - if (atf_is_error(err)) - goto out_dest; - - fprintf(f, "%s\n", atf_dynstr_cstring(&dest)); - -out_dest: - atf_dynstr_fini(&dest); -out: - return err; -} - -static -void -print_error(const atf_error_t err) -{ - PRE(atf_is_error(err)); - - if (atf_error_is(err, "no_memory")) { - char buf[1024]; - - atf_error_format(err, buf, sizeof(buf)); - - fprintf(stderr, "%s: %s\n", progname, buf); - } else { - atf_dynstr_t tag; - char buf[4096]; - - atf_error_format(err, buf, sizeof(buf)); - - atf_dynstr_init_fmt(&tag, "%s: ", progname); - print_tag(stderr, atf_dynstr_cstring(&tag), true, 0, - "ERROR: %s", buf); - - if (atf_error_is(err, "usage")) - print_tag(stderr, atf_dynstr_cstring(&tag), true, 0, - "Type `%s -h' for more details.", progname); - - atf_dynstr_fini(&tag); - } -} - -/* --------------------------------------------------------------------- - * Options handling. - * --------------------------------------------------------------------- */ - -struct params { - bool m_do_list; - bool m_do_usage; - int m_fd; - const char *m_srcdir; - const char *m_workdir; - atf_list_t m_tcglobs; - atf_map_t m_config; -}; - -static -atf_error_t -params_init(struct params *p) -{ - atf_error_t err; - - p->m_do_list = false; - p->m_do_usage = false; - p->m_fd = STDOUT_FILENO; - p->m_srcdir = "."; - p->m_workdir = atf_config_get("atf_workdir"); - - err = atf_list_init(&p->m_tcglobs); - if (atf_is_error(err)) - goto out; - - err = atf_map_init(&p->m_config); - if (atf_is_error(err)) - atf_list_fini(&p->m_tcglobs); - -out: - return err; -} - -static -void -params_fini(struct params *p) -{ - atf_list_iter_t iter; - - atf_map_fini(&p->m_config); - - atf_list_for_each(iter, &p->m_tcglobs) - free(atf_list_iter_data(iter)); - - atf_list_fini(&p->m_tcglobs); -} - -static -atf_error_t -parse_rflag(const char *arg, int *value) -{ - atf_error_t err; - - if (strlen(arg) != 1 || !isdigit((int)arg[0])) { - err = usage_error("Invalid value for -r; must be a single digit."); - goto out; - } - - *value = arg[0] - '0'; - INV(*value >= 0 && *value <= 9); - err = atf_no_error(); - -out: - return err; -} - -static -atf_error_t -parse_vflag(char *arg, atf_map_t *config) -{ - atf_error_t err; - char *split; - - split = strchr(arg, '='); - if (split == NULL) { - err = usage_error("-v requires an argument of the form var=value"); - goto out; - } - - *split = '\0'; - split++; - - err = atf_map_insert(config, arg, split, false); - -out: - return err; -} - -/* --------------------------------------------------------------------- - * Test case filtering. - * --------------------------------------------------------------------- */ - -static -atf_error_t -match_tcs(const atf_tp_t *tp, const char *glob, atf_list_t *ids) -{ - atf_error_t err; - bool found; - atf_list_citer_t iter; - - err = atf_no_error(); - found = false; - atf_list_for_each_c(iter, atf_tp_get_tcs(tp)) { - const atf_tc_t *tc = atf_list_citer_data(iter); - const char *ident = atf_tc_get_ident(tc); - - if (atf_expand_is_glob(glob)) { - bool matches; - - err = atf_expand_matches_glob(glob, ident, &matches); - if (!atf_is_error(err) && matches) { - err = atf_list_append(ids, strdup(ident)); - found = true; - } - } else { - if (strcmp(glob, tc->m_ident) == 0) { - err = atf_list_append(ids, strdup(ident)); - found = true; - } - } - - if (atf_is_error(err)) - break; - } - - if (!atf_is_error(err) && !found) - err = user_error("Unknown test case `%s'", glob); - - return err; -} - -static -atf_error_t -filter_tcs(const atf_tp_t *tp, const atf_list_t *globs, atf_list_t *ids) -{ - atf_error_t err; - atf_list_citer_t iter; - - err = atf_list_init(ids); - if (atf_is_error(err)) - goto out; - - atf_list_for_each_c(iter, globs) { - const char *glob = atf_list_citer_data(iter); - err = match_tcs(tp, glob, ids); - if (atf_is_error(err)) { - atf_list_fini(ids); - goto out; - } - } - -out: - return err; -} - -static -atf_error_t -list_tcs(const atf_tp_t *tp, const atf_list_t *tcids) -{ - atf_error_t err; - size_t col; - atf_list_citer_t iter; - - PRE(atf_list_size(tcids) > 0); - - err = atf_no_error(); - - /* Calculate column where to start descriptions. */ - col = 0; - atf_list_for_each_c(iter, tcids) { - const char *id = atf_list_citer_data(iter); - const atf_tc_t *tc = atf_tp_get_tc(tp, id); - const size_t len = strlen(atf_tc_get_ident(tc)); - - if (col < len) - col = len; - } - col += 4; - - /* Pretty-print test case identifiers and descriptions. */ - atf_list_for_each_c(iter, tcids) { - const char *id = atf_list_citer_data(iter); - const atf_tc_t *tc = atf_tp_get_tc(tp, id); - const char *descr = atf_tc_get_md_var(tc, "descr"); - - err = print_tag(stdout, id, false, col, "%s", descr); - if (atf_is_error(err)) - break; - } - - return err; -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -static -void -usage(void) -{ - print_tag(stdout, "Usage: ", false, 0, - "%s [options] [test_case1 [.. test_caseN]]", progname); - printf("\n"); - print_tag(stdout, "", false, 0, "This is an independent atf test " - "program."); - printf("\n"); - print_tag(stdout, "", false, 0, "Available options:"); - print_tag(stdout, " -h ", false, 0, - "Shows this help message"); - print_tag(stdout, " -l ", false, 0, - "List test cases and their purpose"); - print_tag(stdout, " -r fd ", false, 0, - "The file descriptor to which the test program " - "will send the results of the test cases"); - print_tag(stdout, " -s srcdir ", false, 0, - "Directory where the test's data files are " - "located"); - print_tag(stdout, " -v var=value ", false, 0, - "Sets the configuration variable `var' to `value'"); - print_tag(stdout, " -w workdir ", false, 0, - "Directory where the test's temporary files are " - "located"); - printf("\n"); - print_tag(stdout, "", false, 0, "For more details please see " - "atf-test-program(1) and atf(7)."); -} - -static -atf_error_t -process_params(int argc, char **argv, struct params *p) -{ - atf_error_t err; - int ch; - - err = params_init(p); - if (atf_is_error(err)) - goto out; - - opterr = 0; - while (!atf_is_error(err) && - (ch = getopt(argc, argv, GETOPT_POSIX ":hlr:s:v:w:")) != -1) { - switch (ch) { - case 'h': - p->m_do_usage = true; - break; - - case 'l': - p->m_do_list = true; - break; - - case 'r': - err = parse_rflag(optarg, &p->m_fd); - break; - - case 's': - p->m_srcdir = optarg; - break; - - case 'v': - err = parse_vflag(optarg, &p->m_config); - break; - - case 'w': - p->m_workdir = optarg; - break; - - case ':': - err = usage_error("Option -%c requires an argument.", optopt); - break; - - case '?': - default: - err = usage_error("Unknown option -%c.", optopt); - } - } - argc -= optind; - argv += optind; - - if (!atf_is_error(err)) { - char **arg; - for (arg = argv; !atf_is_error(err) && *arg != NULL; arg++) - err = atf_list_append(&p->m_tcglobs, strdup(*arg)); - - if (!atf_is_error(err) && atf_list_size(&p->m_tcglobs) == 0) - err = atf_list_append(&p->m_tcglobs, strdup("*")); - } - - if (atf_is_error(err)) - params_fini(p); - -out: - return err; -} - -static -atf_error_t -handle_srcdir(struct params *p) -{ - atf_error_t err; - atf_fs_path_t exe, srcdir; - bool b; - - err = atf_fs_path_init_fmt(&srcdir, "%s", p->m_srcdir); - if (atf_is_error(err)) - goto out; - - if (!atf_fs_path_is_absolute(&srcdir)) { - atf_fs_path_t srcdirabs; - - err = atf_fs_path_to_absolute(&srcdir, &srcdirabs); - if (atf_is_error(err)) - goto out_srcdir; - - atf_fs_path_fini(&srcdir); - srcdir = srcdirabs; - } - - err = atf_fs_path_copy(&exe, &srcdir); - if (atf_is_error(err)) - goto out_srcdir; - - err = atf_fs_path_append_fmt(&exe, "%s", progname); - if (atf_is_error(err)) - goto out_exe; - - err = atf_fs_exists(&exe, &b); - if (!atf_is_error(err)) { - if (b) { - err = atf_map_insert(&p->m_config, "srcdir", - strdup(atf_fs_path_cstring(&srcdir)), true); - } else { - err = user_error("Cannot find the test program in the source " - "directory `%s'", p->m_srcdir); - } - } - -out_exe: - atf_fs_path_fini(&exe); -out_srcdir: - atf_fs_path_fini(&srcdir); -out: - return err; -} - -static -atf_error_t -handle_workdir(struct params *p, atf_fs_path_t *workdir) -{ - atf_error_t err; - bool b; - - err = atf_fs_path_init_fmt(workdir, "%s", p->m_workdir); - if (atf_is_error(err)) - goto out; - - err = atf_fs_exists(workdir, &b); - if (atf_is_error(err)) { - atf_fs_path_fini(workdir); - goto out; - } - - if (!b) { - atf_fs_path_fini(workdir); - err = user_error("Cannot find the work directory `%s'", - p->m_workdir); - } else - INV(!atf_is_error(err)); - -out: - return err; -} - -static -atf_error_t -controlled_main(int argc, char **argv, - atf_error_t (*add_tcs_hook)(atf_tp_t *), - int *exitcode) -{ - atf_error_t err; - struct params p; - atf_tp_t tp; - atf_list_t tcids; - atf_fs_path_t workdir; - - err = process_params(argc, argv, &p); - if (atf_is_error(err)) - goto out; - - if (p.m_do_usage) { - if (argc != 2) { - err = usage_error("-h must be given alone."); - } else { - usage(); - *exitcode = EXIT_SUCCESS; - } - goto out_p; - } - - err = handle_srcdir(&p); - if (atf_is_error(err)) - goto out_p; - - err = handle_workdir(&p, &workdir); - if (atf_is_error(err)) - goto out_p; - - err = atf_tp_init(&tp, &p.m_config); - if (atf_is_error(err)) - goto out_workdir; - - err = add_tcs_hook(&tp); - if (atf_is_error(err)) - goto out_tp; - - err = filter_tcs(&tp, &p.m_tcglobs, &tcids); - if (atf_is_error(err)) - goto out_tp; - - if (p.m_do_list) { - err = list_tcs(&tp, &tcids); - if (!atf_is_error(err)) - *exitcode = EXIT_SUCCESS; - } else { - size_t failed; - err = atf_tp_run(&tp, &tcids, p.m_fd, &workdir, &failed); - if (!atf_is_error(err)) - *exitcode = failed > 0 ? EXIT_FAILURE : EXIT_SUCCESS; - } - - { - atf_list_iter_t iter; - - atf_list_for_each(iter, &tcids) - free(atf_list_iter_data(iter)); - - atf_list_fini(&tcids); - } -out_tp: - atf_tp_fini(&tp); -out_workdir: - atf_fs_path_fini(&workdir); -out_p: - params_fini(&p); -out: - return err; -} - -int -atf_tp_main(int argc, char **argv, atf_error_t (*add_tcs_hook)(atf_tp_t *)) -{ - atf_error_t err; - int exitcode; - - atf_init_objects(); - - progname = strrchr(argv[0], '/'); - if (progname == NULL) - progname = argv[0]; - else - progname++; - - exitcode = EXIT_FAILURE; /* Silence GCC warning. */ - err = controlled_main(argc, argv, add_tcs_hook, &exitcode); - if (atf_is_error(err)) { - print_error(err); - atf_error_free(err); - exitcode = EXIT_FAILURE; - } - - return exitcode; -} diff --git a/dist/atf/atf-c/ui.c b/dist/atf/atf-c/ui.c deleted file mode 100644 index 02dff599aafa..000000000000 --- a/dist/atf/atf-c/ui.c +++ /dev/null @@ -1,212 +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 -#include -#include - -#include "atf-c/dynstr.h" -#include "atf-c/env.h" -#include "atf-c/sanity.h" -#include "atf-c/text.h" -#include "atf-c/ui.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -size_t -terminal_width(void) -{ - static bool done = false; - static size_t width = 0; - - if (!done) { - if (atf_env_has("COLUMNS")) { - const char *cols = atf_env_get("COLUMNS"); - if (strlen(cols) > 0) { - width = atoi(cols); /* XXX No error checking */ - } - } else { - struct winsize ws; - if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) != -1) - width = ws.ws_col; - } - - if (width >= 80) - width -= 5; - - done = true; - } - - return width; -} - -static -atf_error_t -format_paragraph(atf_dynstr_t *dest, - const char *tag, bool repeat, size_t col, bool firstp, - char *str) -{ - const size_t maxcol = terminal_width(); - size_t curcol; - char *last, *str2; - atf_dynstr_t pad, fullpad; - atf_error_t err; - - err = atf_dynstr_init_rep(&pad, col - strlen(tag), ' '); - if (atf_is_error(err)) - goto out; - - err = atf_dynstr_init_rep(&fullpad, col, ' '); - if (atf_is_error(err)) - goto out_pad; - - if (firstp || repeat) - err = atf_dynstr_append_fmt(dest, "%s%s", tag, - atf_dynstr_cstring(&pad)); - else - err = atf_dynstr_append_fmt(dest, atf_dynstr_cstring(&fullpad)); - if (atf_is_error(err)) - goto out_pads; - - last = NULL; /* Silence GCC warning. */ - str2 = strtok_r(str, " ", &last); - curcol = col; - do { - const bool firstw = (str == str2); - - if (!firstw) { - if (maxcol > 0 && curcol + strlen(str2) + 1 > maxcol) { - if (repeat) - err = atf_dynstr_append_fmt - (dest, "\n%s%s", tag, atf_dynstr_cstring(&pad)); - else - err = atf_dynstr_append_fmt - (dest, "\n%s", atf_dynstr_cstring(&fullpad)); - curcol = col; - } else { - err = atf_dynstr_append_fmt(dest, " "); - curcol++; - } - } - - if (!atf_is_error(err)) { - err = atf_dynstr_append_fmt(dest, str2); - curcol += strlen(str2); - - str2 = strtok_r(NULL, " ", &last); - } - } while (!atf_is_error(err) && str2 != NULL); - -out_pads: - atf_dynstr_fini(&fullpad); -out_pad: - atf_dynstr_fini(&pad); -out: - return err; -} - -static -atf_error_t -format_aux(atf_dynstr_t *dest, - const char *tag, bool repeat, size_t col, char *str) -{ - char *last, *str2; - atf_error_t err; - - PRE(col == 0 || col >= strlen(tag)); - if (col == 0) - col = strlen(tag); - - str2 = str + strlen(str); - while (str2 != str && *--str2 == '\n') - *str2 = '\0'; - - last = NULL; /* Silence GCC warning. */ - str2 = strtok_r(str, "\n", &last); - do { - const bool first = (str2 == str); - err = format_paragraph(dest, tag, repeat, col, first, str2); - str2 = strtok_r(NULL, "\n", &last); - if (!atf_is_error(err) && str2 != NULL) { - if (repeat) - err = atf_dynstr_append_fmt(dest, "\n%s\n", tag); - else - err = atf_dynstr_append_fmt(dest, "\n\n"); - } - } while (str2 != NULL && !atf_is_error(err)); - - return 0; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -atf_error_t -atf_ui_format_ap(atf_dynstr_t *dest, - const char *tag, bool repeat, size_t col, - const char *fmt, va_list ap) -{ - char *src; - atf_error_t err; - va_list ap2; - - va_copy(ap2, ap); - err = atf_text_format_ap(&src, fmt, ap2); - va_end(ap2); - if (!atf_is_error(err)) { - err = format_aux(dest, tag, repeat, col, src); - free(src); - } - - return err; -} - -atf_error_t -atf_ui_format_fmt(atf_dynstr_t *dest, - const char *tag, bool repeat, size_t col, - const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_ui_format_ap(dest, tag, repeat, col, fmt, ap); - va_end(ap); - - return err; -} diff --git a/dist/atf/atf-c/ui.h b/dist/atf/atf-c/ui.h deleted file mode 100644 index 35f46b792c1d..000000000000 --- a/dist/atf/atf-c/ui.h +++ /dev/null @@ -1,48 +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_UI_H) -#define ATF_C_UI_H - -#include -#include -#include - -#include - -struct atf_dynstr; - -atf_error_t atf_ui_format_ap(struct atf_dynstr *, - const char *, bool, size_t, - const char *, va_list); -atf_error_t atf_ui_format_fmt(struct atf_dynstr *, - const char *, bool, size_t, - const char *, ...); - -#endif /* ATF_C_UI_H */ diff --git a/dist/atf/atf-c/user.c b/dist/atf/atf-c/user.c deleted file mode 100644 index ebbbfd76c63a..000000000000 --- a/dist/atf/atf-c/user.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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/sanity.h" -#include "atf-c/user.h" - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -uid_t -atf_user_euid(void) -{ - return geteuid(); -} - -bool -atf_user_is_member_of_group(gid_t gid) -{ - static gid_t groups[NGROUPS_MAX]; - static int ngroups = -1; - bool found; - int i; - - if (ngroups == -1) { - ngroups = getgroups(NGROUPS_MAX, groups); - INV(ngroups >= 0); - } - - found = false; - for (i = 0; !found && i < ngroups; i++) - if (groups[i] == gid) - found = true; - return found; -} - -bool -atf_user_is_root(void) -{ - return geteuid() == 0; -} - -bool -atf_user_is_unprivileged(void) -{ - return geteuid() != 0; -} diff --git a/dist/atf/atf-c/user.h b/dist/atf/atf-c/user.h deleted file mode 100644 index dea7d26f3d37..000000000000 --- a/dist/atf/atf-c/user.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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_USER_H) -#define ATF_C_USER_H - -#include - -#include - -/* TODO: Would be nice to have an atf_user_t type and transform all of - * the functions below to methods. */ - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -uid_t atf_user_euid(void); -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) */ diff --git a/dist/atf/atf-sh/atf-sh-api.3 b/dist/atf/atf-sh/atf-sh-api.3 deleted file mode 100644 index 096ecd584bc6..000000000000 --- a/dist/atf/atf-sh/atf-sh-api.3 +++ /dev/null @@ -1,307 +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. -.\" -.Dd February 29, 2008 -.Dt ATF-SH-API 3 -.Os -.Sh NAME -.Nm atf_add_test_case , -.Nm atf_check , -.Nm atf_check_equal , -.Nm atf_config_get , -.Nm atf_config_has , -.Nm atf_fail , -.Nm atf_get , -.Nm atf_get_srcdir , -.Nm atf_pass , -.Nm atf_require_prog , -.Nm atf_set , -.Nm atf_skip -.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_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" -.Sh DESCRIPTION -ATF -provides a simple but powerful interface to easily write test programs in -the POSIX shell language. -These are extremely helpful given that they are trivial to write due to the -language simplicity and the great deal of available external tools, so they -are often ideal to test other applications at the user level. -.Pp -Test programs written using this library must be preprocessed by the -.Xr atf-compile 1 -tool, which includes some boilerplate code and generates the final -(installable) test program. -.Pp -Shell-based test programs always follow this template: -.Bd -literal -offset indent -atf_test_case tc1 -tc1_head() { - ... first test case's header ... -} -tc1_body() { - ... first test case's body ... -} - -atf_test_case tc2 -tc2_head() { - ... second test case's header ... -} -tc2_body() { - ... second test case's body ... -} -tc2_cleanup() { - ... second test case's cleanup ... -} - -.Ns ... additional test cases ... - -atf_init_test_cases() { - atf_add_test_case tc1 - atf_add_test_case tc2 - ... add additional test cases ... -} -.Ed -.Ss Definition of test cases -Test cases have an identifier and are composed of three different parts: -the header, the body and an optional cleanup routine, all of which are -described in -.Xr atf-test-case 8 . -To define test cases, one can use the -.Fn atf_test_case -function, which takes a single parameter specifiying the test case's -name and instructs the library to set things up to accept it as a valid -test case. -It is important to note that it -.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 -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 -and -.Fn _cleanup. -None of these take parameters when executed. -.Ss Program initialization -The test program must define an -.Fn 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 -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 -and -.Fn 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. -The latter can take one or two parameters. -If it takes only one, it specifies the variable from which to get the -value, and this variable must be defined. -If it takes two, the second one specifies a default value to be returned -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 -function. -It is interesting to note that this can be used inside -.Fn 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 -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. -.Ss Test case finalization -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 -or -.Fn 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 -does not take any parameters. -.Fn atf_fail -and -.Fn 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 -the user can quickly know why the test did not pass. -.Ss Helper functions for common checks -.Fn atf_check cmd expcode expout experr -.Pp -This function takes four parameters: the command to execute, the expected -numerical exit code, the expected behavior of -.Dv stdout -and the expected -behavior of -.Dv stderr . -.Fa expout -can be one of the following: -.Bl -tag -width expoutXX -.It Li expout -What the command writes to the -.Dv stdout -channel must match exactly what is -found in the -.Pa expout -file. -.It Li ignore -The test does not check what the command writes to the -.Dv stdout -channel. -.It Li null -The command must not write anything to the -.Dv stdout -channel. -.It Li stdout -What the command writes to the -.Dv stdout -channel is written to a -.Pa stdout -file, available for further inspection. -.El -.Pp -Similarly, -.Fa experr -can be one of -.Sq Li experr , -.Sq Li ignore , -.Sq Li null , -or -.Sq Li stderr , -all of which follow the same semantics of their corresponding counterparts -for the -.Fa expout -case. -.Pp -It is important to note that when a failure is detected, this function will -print as much information as possible to be able to identify the cause of -the failure. -For example, if the -.Dv stdout -does not match with the expected contents, a -diff will be printed. -.Pp -.Fn atf_check_equal expr1 expr2 -.Pp -This function takes two expressions, evaluates them and, if their -results differ, aborts the test case with an appropriate failure message. -.Sh EXAMPLES -The following shows a complete test program with a single test case that -validates the addition operator: -.Bd -literal -offset indent -atf_test_case addition -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 $((1 + 1)) 2 - - atf_check_equal $((100 + 200)) 300 -} - -atf_init_test_cases() { - atf_add_test_case addition -} -.Ed -.Pp -This other example shows how to include a file with extra helper functions -in the test program: -.Bd -literal -offset indent -.Ns ... definition of test cases ... - -atf_init_test_cases() { - . $(atf_get_srcdir)/helper_functions.sh - - atf_add_test_case foo1 - atf_add_test_case foo2 -} -.Ed -.Pp -This example demonstrates the use of the very useful -.Fn atf_check -function: -.Bd -literal -offset indent -# Check for silent output -atf_check 'true' 0 null null - -# Check for silent output and failure -atf_check 'false' 1 null null - -# Check for known stdout and silent stderr -echo foo >expout -atf_check 'echo foo' 0 expout null - -# Generate a file for later inspection -atf_check 'ls' 0 stdout null -grep foo ls || atf_fail "foo file not found in listing" -.Ed -.Sh SEE ALSO -.Xr atf-compile 1 , -.Xr atf-test-program 1 , -.Xr atf 7 , -.Xr atf-test-case 8 diff --git a/dist/atf/atf-sh/atf.footer.subr b/dist/atf/atf-sh/atf.footer.subr deleted file mode 100644 index a4db7042ce2c..000000000000 --- a/dist/atf/atf-sh/atf.footer.subr +++ /dev/null @@ -1,1180 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# -# File: atf.footer.subr -# -# This file provides the test program's entry point and auxiliary -# functions used during testing. -# - -# ------------------------------------------------------------------------ -# GLOBAL VARIABLES -# ------------------------------------------------------------------------ - -# Values of configuration variables obtained from atf-config. -Atf_Arch=$(atf-config -t atf_arch) -Atf_Cleanup=$(atf-config -t atf_libexecdir)/atf-cleanup -Atf_Exec=$(atf-config -t atf_libexecdir)/atf-exec -Atf_Format=$(atf-config -t atf_libexecdir)/atf-format -Atf_Killpg=$(atf-config -t atf_libexecdir)/atf-killpg -Atf_Machine=$(atf-config -t atf_machine) - -# List of configuration variables set through the command line. Needed -# during shortcut execution. -Config_Vars= - -# List of blocked signals, to be processed when unblocked. -Held_Signals= - -# A boolean variable that indicates whether we are parsing a test case's -# head or not. -Parsing_Head=false - -# The file descriptor on which the test program will print the results of -# the test cases. -Results_Fd=1 - -# The file to which the test case will print its result. -Results_File= - -# The test program's source directory: i.e. where its auxiliary data files -# and helper utilities can be found. Defaults to the current directory -# but can be overriden through the '-s' flag. -Source_Dir=. - -# Indicates the test case we are currently processing. -Test_Case= - -# The list of all test cases provided by the test program. -# Subset of ${Defined_Test_Cases}. -Test_Cases= - -# The test case's work directory. The semantics of this variable are a -# bit screwed. When running the parent program (not the test case's body), -# this points to the test _program_'s directory. When we have reexecuted -# the code through _atf_shortcut_exec, this points to the test _case_'s -# work directory, which is a subdirectory of the other one. -Work_Dir= - -# ------------------------------------------------------------------------ -# PUBLIC INTERFACE -# ------------------------------------------------------------------------ - -# -# atf_add_test_case tc-name -# -# Adds the given test case to the list of test cases that form the test -# program. The name provided here must be accompanied by two functions -# named after it: _head and _body, and optionally by -# a _cleanup function. -# -atf_add_test_case() -{ - _atf_is_tc_defined "${1}" || \ - _atf_error 128 "Test case ${1} was not correctly defined by" \ - "this test program" - Test_Cases="${Test_Cases} ${1}" -} - -# -# atf_check cmd expcode expout experr -# -# Executes a command and checks its error code, stdout and stderr against -# the expected values for each. -# -# 'expcode' specifies the numeric error code the program is supposed to -# return. -# -# 'expout' is one of 'expout', 'ignore', 'null' or 'stdout'. The meaning -# of these parameters is as follows: -# expout - What the command writes to the stdout channel must match -# exactly what is found in the 'expout' file. -# ignore - The test does not check what the command writes to the -# stdout channel. -# null - The command must not write anything to the stdout channel. -# stdout - What the command writes to the stdout channel is written -# to a 'stdout' file, available for further inspection. -# -# 'experr' is one of 'experr', 'ignore', 'null' or 'stderr'. The meaning -# of these parameters is the same as their corresponding ones in the -# stdout case. -# -atf_check() -{ - test ${#} -eq 4 || atf_fail "Incorrect number of parameters" - - _cmd="${1}" - _expcode="${2}" - _expout="${3}" - _experr="${4}" - - echo "Checking command [${_cmd}]" - - # Sanity-check the expout parameter and prepare the work directory for - # the test. - case ${_expout} in - expout) - test -f ${Work_Dir}/expout || atf_fail "No expout file found" - ;; - ignore) - ;; - null) - ;; - stdout) - ;; - *) - atf_fail "Invalid value in atf_check's expout parameter" - ;; - esac - - # Sanity-check the experr parameter and prepare the work directory for - # the test. - case ${_experr} in - experr) - test -f ${Work_Dir}/experr || atf_fail "No experr file found" - ;; - ignore) - ;; - null) - ;; - stderr) - ;; - *) - atf_fail "Invalid value in atf_check's experr parameter" - ;; - esac - - # Run the command and capture its error code, output and error - # channels. - ( eval ${_cmd} >${Work_Dir}/aux-stdout 2>${Work_Dir}/aux-stderr ) - _code=${?} - - # Check the command's error code. - if [ ${_code} -ne ${_expcode} ]; then - echo "stdout:" - cat aux-stdout - echo "stderr:" - cat aux-stderr - atf_fail "Exit code ${_code} does not match the expected" \ - "code ${_expcode}" - fi - - # Check what the command wrote to stdout. - case ${_expout} in - expout) - if cmp -s ${Work_Dir}/expout ${Work_Dir}/aux-stdout; then - : - else - echo "stdout:" - diff -u ${Work_Dir}/expout ${Work_Dir}/aux-stdout - atf_fail "stdout does not match" - fi - ;; - ignore) - ;; - null) - touch ${Work_Dir}/empty-file - if cmp -s ${Work_Dir}/empty-file ${Work_Dir}/aux-stdout; then - : - else - echo "stdout:" - cat ${Work_Dir}/aux-stdout - atf_fail "stdout was not silent" - fi - ;; - stdout) - test -f ${Work_Dir}/stdout && rm -f ${Work_Dir}/stdout - test -f ${Work_Dir}/stdout && \ - atf_fail "Could not delete stale stdout file" - mv ${Work_Dir}/aux-stdout ${Work_Dir}/stdout - ;; - *) - _atf_error 128 "Internal error in the atf_check function" - ;; - esac - - # Check what the command wrote to stderr. - case ${_experr} in - experr) - if cmp -s ${Work_Dir}/experr ${Work_Dir}/aux-stderr; then - : - else - echo "stderr:" - diff -u ${Work_Dir}/experr ${Work_Dir}/aux-stderr - atf_fail "stderr does not match" - fi - ;; - ignore) - ;; - null) - touch ${Work_Dir}/empty-file - if cmp -s ${Work_Dir}/empty-file ${Work_Dir}/aux-stderr; then - : - else - echo "stderr:" - cat ${Work_Dir}/aux-stderr - atf_fail "stderr was not silent" - fi - ;; - stderr) - test -f ${Work_Dir}/stderr && rm -f ${Work_Dir}/stderr - test -f ${Work_Dir}/stderr && \ - atf_fail "Could not delete stale stderr file" - mv ${Work_Dir}/aux-stderr ${Work_Dir}/stderr - ;; - *) - _atf_error 128 "Internal error in the atf_check function" - ;; - esac -} - -# -# atf_check_equal expr1 expr2 -# -# Checks that expr1's value matches expr2's and, if not, raises an -# error. Ideally expr1 and expr2 should be provided quoted (not -# expanded) so that the error message is helpful; otherwise it will -# only show the values, not the expressions themselves. -# -atf_check_equal() -{ - eval _val1=\"${1}\" - eval _val2=\"${2}\" - test "${_val1}" = "${_val2}" || \ - atf_fail "${1} != ${2} (${_val1} != ${_val2})" -} - -# -# atf_config_get varname [defvalue] -# -# Prints the value of a configuration variable. If it is not -# defined, prints the given default value. -# -atf_config_get() -{ - _varname="__tc_config_var_$(_atf_normalize ${1})" - if [ ${#} -eq 1 ]; then - eval _value=\"\${${_varname}-__unset__}\" - [ "${_value}" = __unset__ ] && \ - _atf_error 1 "Could not find configuration variable \`${1}'" - echo ${_value} - elif [ ${#} -eq 2 ]; then - eval echo \${${_varname}-${2}} - else - _atf_error 1 "Incorrect number of parameters for atf_config_get" - fi -} - -# -# atf_config_has varname -# -# Returns a boolean indicating if the given configuration variable is -# defined or not. -# -atf_config_has() -{ - _varname="__tc_config_var_$(_atf_normalize ${1})" - eval _value=\"\${${_varname}-__unset__}\" - [ "${_value}" != __unset__ ] -} - -# -# atf_fail msg1 [.. msgN] -# -# Makes the test case fail with the given error message. Multiple -# words can be provided, in which case they are joined by a single -# blank space. -# -atf_fail() -{ - echo "failed, ${*}" >>${Results_File} - exit 1 -} - -# -# atf_get varname -# -# Prints the value of a test case-specific variable. Given that one -# should not get the value of non-existent variables, it is fine to -# always use this function as 'val=$(atf_get var)'. -# -atf_get() -{ - eval echo \${__tc_var_${Test_Case}_$(_atf_normalize ${1})} -} - -# -# atf_get_srcdir -# -# Prints the value of the test case's source directory. -# -atf_get_srcdir() -{ - _atf_internal_get srcdir -} - -# -# atf_pass msg1 [.. msgN] -# -# Makes the test case pass. Shouldn't be used in general, as a test -# case that does not explicitly fail is assumed to pass. -# -atf_pass() -{ - echo "passed" >>${Results_File} - exit 0 -} - -# -# atf_require_prog prog -# -# Checks that the given program name (either provided as an absolute -# path or as a plain file name) can be found. If it is not available, -# automatically skips the test case with an appropriate message. -# -# Relative paths are not allowed because the test case cannot predict -# where it will be executed from. -# -atf_require_prog() -{ - _prog= - case ${1} in - /*) - _prog="${1}" - [ -x ${_prog} ] || \ - atf_skip "The required program ${1} could not be found" - ;; - */*) - _atf_error 128 "atf_require_prog does not accept relative" \ - "path names \`${1}'" - ;; - *) - _prog=$(_atf_find_in_path "${1}") - [ -n "${_prog}" ] || \ - atf_skip "The required program ${1} could not be found" \ - "in the PATH" - ;; - esac -} - -# -# atf_set varname val1 [.. valN] -# -# Sets the test case's variable 'varname' to the specified values -# which are concatenated using a single blank space. This function -# is supposed to be called form the test case's head only. -# -atf_set() -{ - ${Parsing_Head} || \ - _atf_error 128 "atf_set called from the test case's body" - - _var=$(_atf_normalize ${1}); shift - eval __tc_var_${Test_Case}_${_var}=\"\${*}\" -} - -# -# atf_skip msg1 [.. msgN] -# -# Skips the test case because of the reason provided. Multiple words -# can be given, in which case they are joined by a single blank space. -# -atf_skip() -{ - echo "skipped, ${*}" >>${Results_File} - exit 0 -} - -# ------------------------------------------------------------------------ -# PRIVATE INTERFACE -# ------------------------------------------------------------------------ - -# -# _atf_config_set varname val1 [.. valN] -# -# Sets the test case's private variable 'varname' to the specified -# values which are concatenated using a single blank space. -# -_atf_config_set() -{ - _var=$(_atf_normalize ${1}); shift - eval __tc_config_var_${_var}=\"\${*}\" - Config_Vars="${Config_Vars} __tc_config_var_${_var}" -} - -# -# _atf_config_set_str varname=val -# -# Sets the test case's private variable 'varname' to the specified -# value. The parameter is of the form 'varname=val'. -# -_atf_config_set_from_str() -{ - _oldifs=${IFS} - IFS='=' - set -- ${*} - _var=${1} - shift - _val="${@}" - IFS=${_oldifs} - _atf_config_set "${_var}" "${_val}" -} - -# -# _atf_echo [-l indent] [-t tag] [msg1 [.. msgN]] -# -# Prints a formatted message using atf-format(1). See its manual -# page for details on the syntax of this function. -# -_atf_echo() -{ - ${Atf_Format} "${@}" -} - -# -# _atf_ensure_boolean var -# -# Ensures that the test case defined the variable 'var' to a boolean -# value. -# -_atf_ensure_boolean() -{ - _atf_ensure_not_empty ${1} - - case $(atf_get ${1}) in - [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]) - atf_set ${1} true - ;; - [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]) - atf_set ${1} false - ;; - *) - _atf_error 128 "Invalid value for boolean variable \`${1}'" - ;; - esac -} - -# -# _atf_ensure_integral var -# -# Ensures that the test case defined the variable 'var' to an integral -# value. -# -_atf_ensure_integral() -{ - _atf_ensure_not_empty ${1} - - case $(atf_get ${1}) in - [0-9]*) - ;; - *) - _atf_error 128 "Invalid value for integral variable \`${1}'" - ;; - esac -} - -# -# _atf_ensure_not_empty var -# -# Ensures that the test case defined the variable 'var' to a non-empty -# value. -# -_atf_ensure_not_empty() -{ - [ -n "$(atf_get ${1})" ] || \ - _atf_error 128 "Undefined or empty variable \`${1}'" -} - -# -# _atf_error error_code [msg1 [.. msgN]] -# -# Prints the given error message (which can be composed of multiple -# arguments, in which case are joined by a single space) and exits -# with the specified error code. -# -# This must not be used by test programs themselves (hence making -# the function private) to indicate a test case's failure. They -# have to use the atf_fail function. -# -_atf_error() -{ - _error_code="${1}"; shift - - _atf_echo -r -t "${Prog_Name}: " "ERROR:" "$@" 1>&2 - exit ${_error_code} -} - -# -# _atf_expand_glob glob -# -# Prints all test case identifiers that match the provided glob -# pattern. -# -_atf_expand_glob() -{ - _glob="${1}" - _matched="" - set -- ${Test_Cases} - while [ ${#} -gt 0 ]; do - case "${1}" in - ${_glob}) _matched="${_matched} ${1}" ;; - *) ;; - esac - - shift - done - - set -- ${_matched} - while [ ${#} -gt 0 ]; do - echo ${1} - shift - done -} - -# -# _atf_get_bool varname -# -# Evaluates a test case-specific variable as a boolean and returns its -# value. -# -_atf_get_bool() -{ - eval $(atf_get ${1}) -} - -# -# _atf_init_output [tc1 .. tcN] -# -# Initializes the descriptor where we will send the test case's -# results. -# -_atf_init_output() -{ - echo "Content-Type: application/X-atf-tcs; version=\"1\"" \ - >&${Results_Fd} - echo "" >&${Results_Fd} - echo "tcs-count: ${#}" >&${Results_Fd} -} - -# -# _atf_internal_get varname -# -# Prints the value of a test case-specific internal variable. Given -# that one should not get the value of non-existent variables, it is -# fine to always use this function as 'val=$(_atf_internal_get var)'. -# -_atf_internal_get() -{ - eval echo \${__tc_internal_var_${Test_Case}_${1}} -} - -# -# _atf_internal_set varname val1 [.. valN] -# -# Sets the test case's private variable 'varname' to the specified -# values which are concatenated using a single blank space. -# -_atf_internal_set() -{ - _var=${1}; shift - eval __tc_internal_var_${Test_Case}_${_var}=\"\${*}\" -} - -# -# _atf_list_tcs [tc1 .. tcN] -# -# Describes all given test cases and prints the list to the standard -# output. -# -_atf_list_tcs() -{ - # Calculate the length of the longest test case name. Needed for - # correct indentation later on. - _maxlen=0 - for _tc in ${*}; do - if [ ${#_tc} -gt ${_maxlen} ]; then - _maxlen=${#_tc} - fi - done - - # Print the list of test cases. - _maxlen=$((${_maxlen} + 4)) - for _tc in ${*}; do - _atf_parse_head ${_tc} - _atf_echo -t ${_tc} -l ${_maxlen} $(atf_get descr) - done -} - -# -# _atf_normalize str -# -# Normalizes a string so that it is a valid shell variable name. -# -_atf_normalize() -{ - echo ${1} | tr .- __ -} - -# -# _atf_parse_head tcname -# -# Evaluates a test case's head to gather its variables and prepares the -# test program to run it. -# -_atf_parse_head() -{ - ${Parsing_Head} && _atf_error 128 "_atf_parse_head called recursively" - Parsing_Head=true - - Test_Case="${1}" - - atf_set ident "${1}" - atf_set timeout 300 - ${1}_head - _atf_ensure_not_empty descr - _atf_ensure_not_empty ident - _atf_ensure_integral timeout - test $(atf_get ident) = "${1}" || \ - _atf_error 128 "Test case redefined ident" - - Parsing_Head=false -} - -# -# _atf_parse_props tc -# -# Runs a test case's body but, before that, handles the default -# properties. This function must be run in a subshell because the -# test case is designed to abruptly exit the shell when any of -# atf_pass, atf_skip or atf_fail are executed. -# -_atf_run_body() -{ - HOME=$(pwd) - export HOME - unset LANG - unset LC_ALL - unset LC_COLLATE - unset LC_CTYPE - unset LC_MESSAGES - unset LC_MONETARY - unset LC_NUMERIC - unset LC_TIME - unset TZ - - umask 0022 - - _arches=$(atf_get require.arch) - if [ -n "${_arches}" ]; then - found=no - for _a in ${_arches}; do - if [ ${_a} = ${Atf_Arch} ]; then - found=yes - break - fi - done - [ ${found} = yes ] || \ - atf_skip "Requires one of the '${_arches}' architectures" - fi - - _machines=$(atf_get require.machine) - if [ -n "${_machines}" ]; then - found=no - for _m in ${_machines}; do - if [ ${_m} = ${Atf_Machine} ]; then - found=yes - break - fi - done - [ ${found} = yes ] || \ - atf_skip "Requires one of the '${_machines}' machine types" - fi - - _vars="$(atf_get require.config)" - if [ -n "${_vars}" ]; then - for _v in ${_vars}; do - if ! atf_config_has ${_v}; then - atf_skip "Required configuration variable ${_v} not defined" - fi - done - fi - - _progs="$(atf_get require.progs)" - if [ -n "${_progs}" ]; then - for _p in ${_progs}; do - atf_require_prog ${_p} - done - fi - - case $(atf_get require.user) in - root) - [ $(id -u) -eq 0 ] || \ - atf_skip "Requires root privileges" - ;; - unprivileged) - [ $(id -u) -ne 0 ] || \ - atf_skip "Requires an unprivileged user" - ;; - "") - ;; - *) - atf_fail "Invalid value in the require.user property" - ;; - esac - - # Previous versions of this code reverted all signal handlers to their - # default behavior at this point. We do not need to do this any more - # because this piece of code is run in a clean sub-shell (through the - # _atf_shortcut_exec call), i.e. a completely re-executed shell, and - # we have not messed with signal handlers at all until this point. - - ${1}_body -} - -# -# _atf_program_timeout pid workdir -# -# Prepares and launches in the background a script that will kill the -# current test case's body (specified by the pid) after it times out. -# -_atf_program_timeout() -{ - _timeout=$(atf_get timeout) - - if [ ${_timeout} -gt 0 ]; then - cat >${2}/timeout.sh </dev/null 2>&1 -EOF - - ${Atf_Exec} -g /bin/sh ${2}/timeout.sh >/dev/null 2>&1 & - echo $! - else - echo none - fi -} - -# -# _atf_run_tc tc nrest -# -# Runs the specified test case. Prints its exit status to the -# standard output and returns a boolean indicating if the test was -# successful or not. The 'nrest' parameter indicates how many test -# cases are left for execution. -# -_atf_run_tc() -{ - _atf_parse_head ${1} - - # Block some signals while we mess with temporary files so that we can - # clean them up later on. - Held_Signals= - trap _atf_sighup_handler SIGHUP - trap _atf_sigint_handler SIGINT - trap _atf_sigterm_handler SIGTERM - - echo "tc-start: ${Test_Case}" >&${Results_Fd} - - _atf_internal_set srcdir "${Source_Dir}" - - Results_File=$(mktemp ${Work_Dir}/atf.XXXXXX) - - _workdir=$(mktemp -d ${Work_Dir}/atf.XXXXXX) - if [ ${?} -eq 0 ]; then - _atf_shortcut_exec ${1} ${_workdir}; _body_pid=$! - _timeout_pid=$(_atf_program_timeout ${_body_pid} ${_workdir}) - wait ${_body_pid} - _ret=$? - if [ -f ${_workdir}/atf.timed.out ]; then - [ ${_timeout_pid} != none ] || \ - _atf_error 128 "Inconsistent status in timeout handling" - ( atf_fail "Test case timed out after $(atf_get timeout) seconds" ) - _ret=${?} - else - [ ${_timeout_pid} != none ] && \ - ${Atf_Killpg} ${_timeout_pid} >/dev/null 2>&1 - fi - ( cd ${_workdir} ; ${1}_cleanup ) - if [ ${2} -gt 1 ]; then - echo __atf_tc_separator__ - echo __atf_tc_separator__ 1>&2 - fi - ${Atf_Cleanup} ${_workdir} - else - ( atf_fail "Could not create the work directory" ) - _ret=${?} - fi - - # Set a default exit status if the test case did not report any. - if [ -z "$(cat ${Results_File})" ]; then - if [ -n "${Held_Signals}" ]; then - ( atf_fail "Test case was interrupted by${Held_Signals}" ) - else - ( atf_fail "Test case did not report any status; bogus test" ) - fi - fi - - # Print the result of the test case and clean up the temporary file. - echo "tc-end: ${Test_Case}, $(cat ${Results_File})" >&${Results_Fd} - rm -f ${Results_File} - Results_File= - - Test_Case= - - # Restore blocked signals and process them. - trap - SIGHUP SIGINT SIGTERM - for s in ${Held_Signals}; do - kill -s ${s} $$ - done - - return ${_ret} -} - -# -# _atf_run_tcs [tc1 .. tcN] -# -# Executes all the given test cases. Returns 0 if all tests were -# successful, or 1 otherwise. -# -_atf_run_tcs() -{ - # Now check that the base work directory exists. We do not want to - # bother creating it. - [ -d "${Work_Dir}" ] || \ - _atf_error 1 "Cannot find the work directory \`${Work_Dir}'" - - _atf_init_output "${@}" - - _ok=true - while [ ${#} -gt 0 ]; do - _atf_run_tc ${1} ${#} || _ok=false - shift - done - - ${_ok} -} - -# -# _atf_shortcut_entry -# -# Secondary entry point for the program. This is only called internally -# to process a test case's body. We must do a full re-exec of the script -# in order to change its process group by means of an external tool. -# Yes, this is ugly, but there is no other way to do it -- unless we -# modified the shell interpreter to provide a built-in for changing the -# process group of the current process... -# -# Keep in sync with _atf_shortcut_exec. -# -_atf_shortcut_entry() -{ - # Set global program status. - _config_file=${_ATF_CONFIG_FILE}; unset _ATF_CONFIG_FILE - Results_Fd=${_ATF_RESULTS_FD}; unset _ATF_RESULTS_FD - Results_File=${_ATF_RESULTS_FILE}; unset _ATF_RESULTS_FILE - Source_Dir=${_ATF_SOURCE_DIR}; unset _ATF_SOURCE_DIR - Work_Dir=${_ATF_WORK_DIR}; unset _ATF_WORK_DIR - - # Gather specific details of this re-exec. - _shortcut_tc=${_ATF_SHORTCUT}; unset _ATF_SHORTCUT - - # Global initialization, as found in main. - if [ -n "${_config_file}" -a -f "${_config_file}" ]; then - . ${_config_file} - rm ${_config_file} - fi - _atf_internal_set srcdir "${Source_Dir}" - atf_init_test_cases - - # Test-case specific initialization, as found in _atf_run_tc. - _atf_parse_head ${_shortcut_tc} - _atf_internal_set srcdir "${Source_Dir}" - - # Really run the test case's body. This is the only part that - # should remain if we were really able to change the process group - # of a sub-shell. - cd ${Work_Dir} - _atf_run_body ${_shortcut_tc} - atf_pass -} - -# -# _atf_shortcut_exec tc -# -# Re-executes the current script in a different process group in order -# to process the given test case's body. $! is set to the child process -# on return. -# -# Keep in sync with _atf_shortcut_entry. -# -_atf_shortcut_exec() -{ - # Save the value of the configuration variables set through -v. - # We must do this through a files as there is no other easy way to - # preserve spaces in them. But this can bring raise problems... - if [ -n "${Config_Vars}" ]; then - _config_file=${Work_Dir}/atf.config.vars - for _var in ${Config_Vars}; do - _val=$(eval echo \${${_var}}) - echo ${_var}=\'${_val}\' >>${_config_file} - done - fi - - # Now do the real re-execution. - ${Atf_Exec} -g env \ - _ATF_CONFIG_FILE=${_config_file} \ - _ATF_RESULTS_FD=${Results_Fd} \ - _ATF_RESULTS_FILE=${Results_File} \ - _ATF_SHORTCUT=${1} \ - _ATF_SOURCE_DIR=${Source_Dir} \ - _ATF_WORK_DIR=${2} \ - ${Source_Dir}/${Prog_Name} & -} - -# -# _atf_sighup_handler -# -# Handler for the SIGHUP signal that registers its occurrence so that -# it can be processed at a later stage. -# -_atf_sighup_handler() -{ - Held_Signals="${Held_Signals} SIGHUP" -} - -# -# _atf_sigint_handler -# -# Handler for the SIGINT signal that registers its occurrence so that -# it can be processed at a later stage. -# -_atf_sigint_handler() -{ - Held_Signals="${Held_Signals} SIGINT" -} - -# -# _atf_sigterm_handler -# -# Handler for the SIGTERM signal that registers its occurrence so that -# it can be processed at a later stage. -# -_atf_sigterm_handler() -{ - Held_Signals="${Held_Signals} SIGTERM" -} - -# -# _atf_syntax_error msg1 [.. msgN] -# -# Formats and prints a syntax error message and terminates the -# program prematurely. -# -_atf_syntax_error() -{ - _atf_echo -r -t "${Prog_Name}: " "ERROR: ${@}" 1>&2 - _atf_echo -r -t "${Prog_Name}: " "Type \`${Prog_Name} -h' for more" \ - "details." 1>&2 - exit 1 -} - -# -# _atf_is_tc_defined tc-name -# -# Returns a boolean indicating if the given test case was defined by the -# test program or not. -# -_atf_is_tc_defined() -{ - for _tc in ${Defined_Test_Cases}; do - [ ${_tc} = ${1} ] && return 0 - done - return 1 -} - -# -# _atf_usage -# -# Prints usage information and exits the program. -# -_atf_usage() -{ - _atf_echo -t "Usage: " "${Prog_Name} [options] [test_case1" \ - "[.. test_caseN]]" - echo - _atf_echo "This is an independent atf test program." - echo - _atf_echo "Available options:" - _atf_echo -t " -h " "Shows this help message" - _atf_echo -t " -l " "List test cases and their purpose" - _atf_echo -t " -r fd " "The file descriptor to which the" \ - "test program will send the results" \ - "of the test cases" - _atf_echo -t " -s srcdir " "Directory where the test's data" \ - "files are located" - _atf_echo -t " -v var=value " "Sets the configuration variable" \ - "\`var' to \`value'" - _atf_echo -t " -w workdir " "Directory where the test's" \ - "temporary files are located" - echo - _atf_echo "For more details please see atf-test-program(1) and atf(7)." -} - -# -# _atf_warning [msg1 [.. msgN]] -# -# Prints the given warning message (which can be composed of multiple -# arguments, in which case are joined by a single space). -# -# This must not be used by test programs themselves (hence making -# the function private). -# -_atf_warning() -{ - _atf_echo -r -t "${Prog_Name}: " "WARNING:" "$@" 1>&2 -} - -# -# main [options] [test_case1 [.. test_caseN]] -# -# Test program's entry point. -# -main() -{ - # Handle shortcut execution path as early as possible. - if [ ${_ATF_SHORTCUT-__unset__} != __unset__ ]; then - _atf_shortcut_entry - # NOTREACHED - fi - - # The test program's base directory where it will put temporary files. - Work_Dir=$(atf-config -t atf_workdir) - - # Process command-line options first. - _numargs=${#} - _hflag=false - _lflag=false - while getopts :hlr:s:v:w: arg; do - case ${arg} in - h) - _hflag=true - ;; - - l) - _lflag=true - ;; - - r) - Results_Fd=${OPTARG} - ;; - - s) - Source_Dir=${OPTARG} - ;; - - v) - _atf_config_set_from_str "${OPTARG}" - ;; - - w) - Work_Dir=${OPTARG} - ;; - - \?) - _atf_syntax_error "Unknown option -${OPTARG}." - # NOTREACHED - ;; - esac - done - shift `expr ${OPTIND} - 1` - - if [ ${_hflag} = true ]; then - [ ${_numargs} -eq 1 ] || _atf_syntax_error "-h must be given alone." - _atf_usage - true - return - fi - - # First of all, make sure that the source directory is correct. It - # doesn't matter if the user did not change it, because the default - # value may not work. (TODO: It possibly should, even though it is - # not a big deal because atf-run deals with this.) - case ${Source_Dir} in - /*) - ;; - *) - Source_Dir=$(pwd)/${Source_Dir} - ;; - esac - [ -f ${Source_Dir}/${Prog_Name} ] || \ - _atf_error 1 "Cannot find the test program in the source" \ - "directory \`${Source_Dir}'" - - # Set some global variables useful to the user. Not specific to the - # test case because they may be needed during initialization too. - # XXX I'm not too fond on this though. Sure, it is very useful in some - # situations -- such as in NetBSD's fs/tmpfs/* tests where each test - # program includes a helper subroutines file -- but there are also - # other, maybe better ways to achieve the same. Because, for example, - # at the moment it is not possible to detect failures in the inclusion - # and report them nicely. Plus this change is difficult to implement - # in the current C++ API. - _atf_internal_set srcdir "${Source_Dir}" - - # Call the test program's hook to register all available test cases. - atf_init_test_cases - - # Set _tcs to the test cases to run. - if [ ${#} -gt 0 ]; then - # Expand glob patterns and report erroneous test cases. - _tcs= - while [ ${#} -gt 0 ]; do - _matches=$(_atf_expand_glob "${1}") - [ ${#_matches} -eq 0 ] && - _atf_error 1 "Unknown test case \`${1}'" - - _tcs="${_tcs} ${_matches}" - shift - done - else - _tcs=${Test_Cases} - fi - - # Run or list test cases, restricting them to _tcs. - if `${_lflag}`; then - _atf_list_tcs ${_tcs} - else - _atf_run_tcs ${_tcs} - fi -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/atf-sh/atf.header.subr b/dist/atf/atf-sh/atf.header.subr deleted file mode 100644 index e64f22b13b0b..000000000000 --- a/dist/atf/atf-sh/atf.header.subr +++ /dev/null @@ -1,77 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# -# File: atf.header.subr -# -# This file provides default contents for the hooks that must be -# redefined by test programs and other stuff that has to be defined -# before the test program's code is parsed. -# - -# ------------------------------------------------------------------------ -# GLOBAL VARIABLES -# ------------------------------------------------------------------------ - -# The list of all test cases defined by the test program. -Defined_Test_Cases= - -# ------------------------------------------------------------------------ -# PUBLIC INTERFACE -# ------------------------------------------------------------------------ - -# -# atf_init_test_cases -# -# The function in charge of registering the test cases that have to -# be made available to the user. Must be redefined. -# -atf_init_test_cases() -{ - _atf_error 128 "No test cases defined" -} - -# -# atf_test_case tc-name -# -# Defines a new test case named tc-name. The name provided here must be -# accompanied by two functions named after it: _head and -# _body, and may also be accompanied by a _cleanup -# function. -# -atf_test_case() -{ - Defined_Test_Cases="${Defined_Test_Cases} ${1}" - - eval "${1}_head() { _atf_error 128 '${1}_head not defined'; }" - eval "${1}_body() { :; }" - eval "${1}_cleanup() { :; }" -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/atf-sh/atf.init.subr b/dist/atf/atf-sh/atf.init.subr deleted file mode 100644 index 1807310e8c65..000000000000 --- a/dist/atf/atf-sh/atf.init.subr +++ /dev/null @@ -1,79 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# -# File: atf.init.subr -# -# Initialization for a test program. A verbatim copy of this file is -# stuck at the very beginning of each test program, so it has to be -# kept as simple as possible to minimize the possible need of rebuilding -# a huge amount of test programs, which could happen after modifying -# this file. -# - -Prog_Name=${0##*/} - -# -# _atf_find_in_path program -# -# Looks for a program in the path and prints the full path to it or -# nothing if it could not be found. It also returns true in case of -# success. -# -_atf_find_in_path() -{ - _prog="${1}" - - _oldifs=${IFS} - IFS=: - for _dir in ${PATH} - do - if [ -x ${_dir}/${_prog} ]; then - IFS=${_oldifs} - echo ${_dir}/${_prog} - return 0 - fi - done - IFS=${_oldifs} - - return 1 -} - -# -# Look for atf-config to deduce where the atf.*.subr files are stored -# in the system. -# -Atf_Config=`_atf_find_in_path atf-config` -if [ -z "${Atf_Config}" ]; then - echo "${Prog_Name}: ERROR: Cannot locate atf-config in PATH" 1>&2 - exit 128 -fi -Atf_Pkgdatadir=`${Atf_Config} -t atf_pkgdatadir` - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/bconfig.h.in b/dist/atf/bconfig.h.in deleted file mode 100644 index f28aa1a36e4a..000000000000 --- a/dist/atf/bconfig.h.in +++ /dev/null @@ -1,103 +0,0 @@ -/* bconfig.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 you have the `putenv' function. */ -#undef HAVE_PUTENV - -/* Define to 1 if putenv is in std */ -#undef HAVE_PUTENV_IN_STD - -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if setenv is in std */ -#undef HAVE_SETENV_IN_STD - -/* Define to 1 if snprintf is in std */ -#undef HAVE_SNPRINTF_IN_STD - -/* 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 `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 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* 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 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/dist/atf/configure b/dist/atf/configure deleted file mode 100755 index 814fa820f75f..000000000000 --- a/dist/atf/configure +++ /dev/null @@ -1,23506 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for Automated Testing Framework 0.5. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -# -# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -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 - # 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 - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -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 - # 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 - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -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 - # 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 - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -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$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${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 </dev/null 2>&1 && unset CDPATH - -if test -z "$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 && - echo_test_string=`eval $cmd` && - (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. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='Automated Testing Framework' -PACKAGE_TARNAME='atf' -PACKAGE_VERSION='0.5' -PACKAGE_STRING='Automated Testing Framework 0.5' -PACKAGE_BUGREPORT='atf-devel@NetBSD.org' - -ac_unique_file="atf-c.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -target -target_cpu -target_vendor -target_os -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -SED -GREP -EGREP -LN_S -ECHO -AR -RANLIB -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL -ATTRIBUTE_NORETURN -atf_arch -atf_machine -ATF_CONFSUBDIR -atf_confdir -ATF_WORKDIR -atf_cssdir -atf_dtddir -atf_egdir -atf_pkgconfigdir -atf_xsldir -ATF_SHELL -MTN -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS -ATF_CONFSUBDIR -ATF_WORKDIR -ATF_SHELL' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -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.5 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/atf] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Automated Testing Framework 0.5:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-unstable-shared - Enables the build of shared libraries with unstable - ABIs/APIs - --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-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-developer enable developer features - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-tags[=TAGS] include additional configurations [automatic] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - 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 . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -Automated Testing Framework configure 0.5 -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. - -Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. -_ACEOF - exit -fi -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.5, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -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 - - - - - -cat >>confdefs.h <<\_ACEOF -#define PACKAGE_COPYRIGHT "Copyright (c) 2007, 2008 The NetBSD Foundation, Inc." -_ACEOF - -ac_aux_dir= -for ac_dir in admin "$srcdir"/admin; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in admin \"$srcdir\"/admin" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in admin \"$srcdir\"/admin" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -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_commands="$ac_config_commands tests/bootstrap/atconfig" - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6; } -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -am__api_version='1.10' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='atf' - VERSION='0.5' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -# Check whether --enable-unstable-shared was given. -if test "${enable_unstable_shared+set}" = set; then - enableval=$enable_unstable_shared; case $enableval in - yes|no) enable_shared=${enableval} ;; - *) enable_shared=${enableval} ;; - esac -else - enable_shared=no -fi - - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - 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," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -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 -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -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_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -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= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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'. - 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_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - 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 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -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 - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $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 - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - -fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_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$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"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" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_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$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - -# 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 -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-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` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - 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" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - 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" - # 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 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - 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 - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - 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 - # Check to see if the nm accepts a BSD-compat flag. - # 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'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -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. -# '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. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - 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)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - 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_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_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# 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 - -# 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. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 4417 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - - -esac - -need_locks="$enable_libtool_lock" - - -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 -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -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 - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ----------------------------------- ## -## Report this to atf-devel@NetBSD.org ## -## ----------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - 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 -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -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 -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$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= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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'. - 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 - 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 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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 -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$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 - 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 -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -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 - -fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_prog_f77_g=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -G77=`test $ac_compiler_gnu = yes && echo yes` -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 - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - 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*) - # 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` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - 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` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$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 - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi - - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - 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_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - 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_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -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" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi - -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -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 - 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. -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' - -# 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 avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -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-%%"` - - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - 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 - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - 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 -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" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - 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 - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - 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 -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" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -enable_dlopen=no -enable_win32_dll=no - -# 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 - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -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 - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -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" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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:7159: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7163: \$? = $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 - $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 - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; 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 - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - 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 - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_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" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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:7449: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7453: \$? = $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 - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } - -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - 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 - # 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } - -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -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:7553: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7557: \$? = $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 - $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 - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # 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'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # 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 - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # 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 - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - 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' - # 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' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [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 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, 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. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - 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' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - 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/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - 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' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - 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' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - 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' - 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' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - 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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; 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' - fi - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - 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' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -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' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** 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 -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - 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' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # 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 - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; 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="" - 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 - 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' - 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' - 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. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - - if test "$GCC" = yes; 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` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # 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 - # 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then 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 "${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' - 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" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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' - 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' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # 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 "$deplibs" | $SED -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 - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = 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' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - 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 - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -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' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - 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' - ;; - - 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' - 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_separator=: - - hardcode_direct=yes - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${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' - ;; - esac - else - case $host_cpu in - hppa*64*) - 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}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - 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 - ;; - esac - 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - 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_separator=: - hardcode_shlibpath_var=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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' - 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 - fi - else - ld_shlibs=no - fi - ;; - - os2*) - 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' - ;; - - 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - 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 ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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' - fi - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${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}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - 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' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - 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 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' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; 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' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - 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' - 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' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT 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' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 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:$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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - 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* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -if test "$GCC" = yes; then - case $host_os in - 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 - # 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 - # Ok, now we have the path, separated by spaces, we can step through it - # 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` - 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 - 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; - 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; - } else { - lt_count--; - } - } - } - } - 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` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# 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' - 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' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - 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 - # 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 - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not 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 - # 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 - # 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 - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - 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' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - 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 $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - 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" - ;; - mingw*) - # 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 - ;; - 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}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - 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 - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) 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}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - 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*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - 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 - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - 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 - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - 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' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - 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' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - 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}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - 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}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - 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 - # 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 - 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' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - 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' - 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' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - 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 - ;; - -nto-qnx*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - 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' - 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 - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -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}' - 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" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - 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 - 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' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - 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' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # 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_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; 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 < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; 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 < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - -# Report which library types will actually be built -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && 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 - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 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 -# the Free Software Foundation; either version 2 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# 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. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# 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 - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# 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. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -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 in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# 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 DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# 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 - -# 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 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# 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 - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # 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 '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -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 - -CC="$lt_save_CC" - - -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi - - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - 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_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 - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_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 -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -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-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; 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 -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-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` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - 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" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - 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" - # 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 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -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' - - 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}' - - # 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' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # 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"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; 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="" - 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. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; 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` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # 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 - # 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' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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 "x${allow_undefined_flag}" != "x"; then echo "${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' - 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" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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' - 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' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - 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' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_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 - - 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 - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - 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' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - 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 - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - 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' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; 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' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - 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' - ;; - 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}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; 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' - ;; - 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 -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - 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' - # 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' - ;; - 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 -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 - # necessary to make sure instantiated templates are included - # in the archive. - 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 ${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 ${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_separator_CXX=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # 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' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $list' - - 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. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # 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' - ;; - *) # 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' - ;; - 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' - ;; - pgCC*) - # Portland Group C++ compiler - 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' - - 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' - ;; - 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' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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' - 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' - - # 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' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - 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' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # 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' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - 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 ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - 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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - 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"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # 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' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - 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 -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 -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $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. - # - # There doesn't appear to be a way to prevent this compiler from - # 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 $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; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - 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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - 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"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # 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_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' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # 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' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - 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 $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_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' - - # 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\"" - else - # 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_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' - - # 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\"" - fi - - 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' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - 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 -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 - # 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. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - 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='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $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 - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p 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}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - 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" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - 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 - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; 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 - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - 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_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_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" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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:12422: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12426: \$? = $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 - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - 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 - # 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -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:12526: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:12530: \$? = $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 - $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 - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$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 - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # 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 - 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' - 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' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - 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' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 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:$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=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - 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* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# 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' - 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' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - 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 - # 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 - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not 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 - # 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 - # 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 - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - 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' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - 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 $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - 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" - ;; - mingw*) - # 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 - ;; - 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}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - 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 - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) 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}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - 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*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - 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 - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - 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 - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - 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' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - 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' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - 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}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - 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}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - 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 - # 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 - 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' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - 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' - 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' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - 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 - ;; - -nto-qnx*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - 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' - 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 - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -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}' - 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" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - 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 - 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' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - 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' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # 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_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# 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. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -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 in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# 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 DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# 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 - -# 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_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -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 - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -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 - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$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-%%"` - - -{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } -test "$can_build_shared" = "no" && 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 - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - -{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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:14088: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14092: \$? = $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 - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - 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 - # 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -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:14192: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14196: \$? = $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 - $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_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # 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'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # 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 - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # 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 - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - 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_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [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 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, 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. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='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' - else - ld_shlibs_F77=no - fi - ;; - - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${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_F77='$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_F77='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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$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' - fi - else - ld_shlibs_F77=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** 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 -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; 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="" - 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 - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | 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. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - if test "$GCC" = yes; 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` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # 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_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$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 >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$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' - fi - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=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 - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$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 - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$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' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - 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 is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$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 - # 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_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# 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' - 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' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - 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 - # 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 - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not 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 - # 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 - # 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 - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - 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' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - 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 $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - 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" - ;; - mingw*) - # 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 - ;; - 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}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - 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 - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) 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}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - 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*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - 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 - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - 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 - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - 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' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - 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' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - 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}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - 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}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - 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 - # 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 - 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' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - 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' - 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' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - 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 - ;; - -nto-qnx*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - 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' - 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 - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -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}' - 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" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - 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 - 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' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - 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' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6; } - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# 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. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -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 in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# 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_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# 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 - -# 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_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -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 - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$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-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -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" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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:16379: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16383: \$? = $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 - $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 - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # 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_GCJ='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -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:16669: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16673: \$? = $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 - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - 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 - # 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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # 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 - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -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:16773: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:16777: \$? = $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 - $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_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # 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'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # 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 - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - 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-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # 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 - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - 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_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [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 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, 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. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='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' - else - ld_shlibs_GCJ=no - fi - ;; - - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${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' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$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' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** 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 -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; 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="" - 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 - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | 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. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; 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` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; 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' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # 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_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$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' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=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 - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$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 - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - 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 is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$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 - # 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_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # 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. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# 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' - 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' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - 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 - # 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 - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not 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 - # 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 - # 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 - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - 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' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - 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 $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - 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'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - 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" - ;; - mingw*) - # 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 - ;; - 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}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${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`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - 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 - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) 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}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - 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*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - 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 - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - 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 - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - 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' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - 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' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - 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}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - 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}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - 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 - # 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 - 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' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - 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' - 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' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - 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 - ;; - -nto-qnx*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - 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' - 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 - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -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}' - 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" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - 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 - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - 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 - 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' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - 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' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# 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. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -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 in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# 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_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# 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 - -# 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_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -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 - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -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" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$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-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# 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. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -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 in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# 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_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# 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 - -# 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_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -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 - -CC="$lt_save_CC" - - ;; - - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - - -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 - -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 -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - 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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -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_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -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= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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'. - 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_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - 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 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } -fi -set dummy $CC; ac_cc=`echo $2 | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; - 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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NO_MINUS_C_MINUS_O 1 -_ACEOF - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_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=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 - -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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$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 - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}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:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - 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 -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -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 -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$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= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&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'. - 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 - 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 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - 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 - ;; - none) break ;; - esac - # 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. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} 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 sub/conftest.${OBJEXT-o} 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 -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$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 - - - - - # Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then - enableval=$enable_developer; -else - case ${PACKAGE_VERSION} in - 0.*|*99*|*alpha*|*beta*) - enable_developer=yes - ;; - *) - enable_developer=no - ;; - esac -fi - - - if test ${enable_developer} = yes; then - try_c_cxx_flags="-g \ - -Wall \ - -Wcast-qual \ - -Werror \ - -Wextra \ - -Wno-sign-compare \ - -Wno-unused-parameter \ - -Wpointer-arith \ - -Wredundant-decls \ - -Wreturn-type \ - -Wshadow \ - -Wswitch \ - -Wwrite-strings" - - try_c_flags="-Wmissing-prototypes \ - -Wno-traditional \ - -Wstrict-prototypes" - - try_cxx_flags="-Wabi \ - -Wctor-dtor-privacy \ - -Wno-deprecated \ - -Wno-non-template-friend \ - -Wno-pmf-conversions \ - -Wnon-virtual-dtor \ - -Woverloaded-virtual \ - -Wreorder \ - -Wsign-promo \ - -Wsynth" - - # - # The following flags should also be enabled but cannot be. Reasons - # given below. - # - # -Wold-style-cast: Raises errors when using TIOCGWINSZ, at least under - # Mac OS X. This is due to the way _IOR is defined. - # - else - try_c_cxx_flags="-DNDEBUG" - fi - try_c_cxx_flags="${try_c_cxx_flags} -D_FORTIFY_SOURCE=2" - - 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 - - valid="" - for f in ${try_c_cxx_flags} ${try_c_flags} - do - { echo "$as_me:$LINENO: checking whether ${CC} supports ${f}" >&5 -echo $ECHO_N "checking whether ${CC} supports ${f}... $ECHO_C" >&6; } - saved_cflags="${CFLAGS}" - CFLAGS="${CFLAGS} ${f}" - cat >conftest.$ac_ext <<_ACEOF -int main(void) { return 0; } -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - valid="${valid} ${f}" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="${saved_cflags}" - done - CFLAGS="${CFLAGS} ${valid}" - 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 - - - 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 - - valid="" - for f in ${try_c_cxx_flags} ${try_cxx_flags} - do - { echo "$as_me:$LINENO: checking whether ${CXX} supports ${f}" >&5 -echo $ECHO_N "checking whether ${CXX} supports ${f}... $ECHO_C" >&6; } - saved_cxxflags="${CXXFLAGS}" - CXXFLAGS="${CXXFLAGS} ${f}" - cat >conftest.$ac_ext <<_ACEOF -int main(void) { return 0; } -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - valid="${valid} ${f}" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - CXXFLAGS="${saved_cxxflags}" - done - CXXFLAGS="${CXXFLAGS} ${valid}" - 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 - - - - - - - { echo "$as_me:$LINENO: checking whether vsnprintf is in std" >&5 -echo $ECHO_N "checking whether vsnprintf is in std... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - #include - int main(void) { - va_list ap; - char* buf = NULL; - const char* fmt = NULL; - std::vsnprintf(buf, 0, fmt, ap); - - return 0; - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_VSNPRINTF_IN_STD 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - { echo "$as_me:$LINENO: checking whether getopt allows a + sign for POSIX behavior" >&5 -echo $ECHO_N "checking whether getopt allows a + sign for POSIX behavior... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - -int -main(void) -{ - int argc = 4; - char* argv[5] = { - strdup("conftest"), - strdup("-+"), - strdup("-a"), - strdup("bar"), - NULL - }; - int ch; - int seen_a = 0, seen_plus = 0; - - while ((ch = getopt(argc, argv, "+a:")) != -1) { - switch (ch) { - case 'a': - seen_a = 1; - break; - - case '+': - seen_plus = 1; - break; - - case '?': - default: - ; - } - } - - return (seen_a && !seen_plus) ? EXIT_SUCCESS : EXIT_FAILURE; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - getopt_allows_plus=yes - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GNU_GETOPT 1 -_ACEOF - -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -getopt_allows_plus=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - { echo "$as_me:$LINENO: result: ${getopt_allows_plus}" >&5 -echo "${ECHO_T}${getopt_allows_plus}" >&6; } - - - { echo "$as_me:$LINENO: checking whether __attribute__((noreturn)) is supported" >&5 -echo $ECHO_N "checking whether __attribute__((noreturn)) is supported... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -int main(void) -{ -#if ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2) - return 0; -#else - return 1; -#endif -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - value="__attribute__((noreturn))" -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - value="" - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - ATTRIBUTE_NORETURN=${value} - - - - - - -for ac_func in putenv setenv unsetenv -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - { echo "$as_me:$LINENO: checking whether putenv is in std" >&5 -echo $ECHO_N "checking whether putenv is in std... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - int main(void) { - std::putenv("a=b"); - - return 0; - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PUTENV_IN_STD 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - { echo "$as_me:$LINENO: checking whether setenv is in std" >&5 -echo $ECHO_N "checking whether setenv is in std... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - int main(void) { - std::setenv("a", "b"); - - return 0; - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SETENV_IN_STD 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - { echo "$as_me:$LINENO: checking whether unsetenv is in std" >&5 -echo $ECHO_N "checking whether unsetenv is in std... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - int main(void) { - std::unsetenv("a"); - - return 0; - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSETENV_IN_STD 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - { echo "$as_me:$LINENO: checking whether basename takes a constant pointer" >&5 -echo $ECHO_N "checking whether basename takes a constant pointer... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - int main(void) { - const char* s = "/foo/bar/"; - (void)::basename(s); - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CONST_BASENAME 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking whether dirname takes a constant pointer" >&5 -echo $ECHO_N "checking whether dirname takes a constant pointer... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - int main(void) { - const char* s = "/foo/bar/"; - (void)::dirname(s); - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CONST_DIRNAME 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking whether getcwd(NULL, 0) works" >&5 -echo $ECHO_N "checking whether getcwd(NULL, 0) works... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -#include - #include - int main(void) { - char *cwd = getcwd(NULL, 0); - return (cwd != NULL) ? EXIT_SUCCESS : EXIT_FAILURE; - } -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETCWD_DYN 1 -_ACEOF - -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - - -for ac_func in unmount -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - - { echo "$as_me:$LINENO: checking whether snprintf is in std" >&5 -echo $ECHO_N "checking whether snprintf is in std... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#include - int main(void) { - char buf; - std::snprintf(&buf, 1, ""); - - return 0; - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SNPRINTF_IN_STD 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - { echo "$as_me:$LINENO: checking for the last valid signal" >&5 -echo $ECHO_N "checking for the last valid signal... $ECHO_C" >&6; } - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include -#include -#include - -int -main(void) -{ - int i; - FILE *f; - - i = 0; - while (i < 1024) { - i++; - if (i != SIGKILL && i != SIGSTOP) { - struct sigaction sa; - int ret; - - sa.sa_handler = SIG_IGN; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - - ret = sigaction(i, &sa, NULL); - if (ret == -1) { - if (errno == EINVAL) { - i--; - break; - } else - err(EXIT_FAILURE, "sigaction failed"); - } - } - } - if (i == 100) - errx(EXIT_FAILURE, "too much signals"); - - f = fopen("conftest.cnt", "w"); - if (f == NULL) - err(EXIT_FAILURE, "failed to open file"); - - fprintf(f, "%d\n", i); - fclose(f); - - return EXIT_SUCCESS; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if test ! -f conftest.cnt; then - last_signo=15 - { echo "$as_me:$LINENO: result: failed; assuming ${last_signo}" >&5 -echo "${ECHO_T}failed; assuming ${last_signo}" >&6; } - else - last_signo=$(cat conftest.cnt) - rm -f conftest.cnt - { echo "$as_me:$LINENO: result: ${last_signo}" >&5 -echo "${ECHO_T}${last_signo}" >&6; } - fi -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -last_signo=15 - { echo "$as_me:$LINENO: result: failed; assuming ${last_signo}" >&5 -echo "${ECHO_T}failed; assuming ${last_signo}" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -cat >>confdefs.h <<_ACEOF -#define LAST_SIGNO ${last_signo} -_ACEOF - - - - -machine=${target_cpu} - -case ${machine} in - i[3-9]86) - arch=i386 - ;; - x86_64) - arch=amd64 - ;; - *) - arch=${machine} - ;; -esac - -{ echo "$as_me:$LINENO: Machine type: ${machine}, architecture: ${arch}" >&5 -echo "$as_me: Machine type: ${machine}, architecture: ${arch}" >&6;} -atf_arch=${arch} - -atf_machine=${machine} - - - - -if test x"${ATF_CONFSUBDIR-unset}" = x"unset"; then - ATF_CONFSUBDIR=atf -else - case ${ATF_CONFSUBDIR} in - /*) - { { echo "$as_me:$LINENO: error: ATF_CONFSUBDIR must hold a relative path" >&5 -echo "$as_me: error: ATF_CONFSUBDIR must hold a relative path" >&2;} - { (exit 1); exit 1; }; } - ;; - *) - ;; - 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 - ATF_WORKDIR=${t} - break - fi - done - if test x"${ATF_WORKDIR}" = x""; then - { { echo "$as_me:$LINENO: error: Could not guess a value for ATF_WORKDIR" >&5 -echo "$as_me: error: Could not guess a value for ATF_WORKDIR" >&2;} - { (exit 1); exit 1; }; } - fi -else - case ${ATF_WORKDIR} in - /*) - ;; - *) - { { echo "$as_me:$LINENO: error: ATF_WORKDIR must hold an absolute path" >&5 -echo "$as_me: error: ATF_WORKDIR must hold an absolute path" >&2;} - { (exit 1); exit 1; }; } - ;; - esac -fi - -atf_cssdir=\${datadir}/examples/atf - -atf_dtddir=\${datadir}/xml/atf - -atf_egdir=\${datadir}/examples/atf - -atf_pkgconfigdir=\${libdir}/pkgconfig - -atf_xsldir=\${datadir}/xsl/atf - - - - -if test x"${ATF_SHELL}" = x""; then - for ac_prog in bash sh -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ATF_SHELL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ATF_SHELL in - [\\/]* | ?:[\\/]*) - ac_cv_path_ATF_SHELL="$ATF_SHELL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ATF_SHELL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ATF_SHELL=$ac_cv_path_ATF_SHELL -if test -n "$ATF_SHELL"; then - { echo "$as_me:$LINENO: result: $ATF_SHELL" >&5 -echo "${ECHO_T}$ATF_SHELL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ATF_SHELL" && break -done - -else - case ${ATF_SHELL} in - /*) - ;; - *) - { { echo "$as_me:$LINENO: error: ATF_SHELL must hold an absolute path" >&5 -echo "$as_me: error: ATF_SHELL must hold an absolute path" >&2;} - { (exit 1); exit 1; }; } - ;; - esac -fi -if test x"${ATF_SHELL}" = x""; then - { { echo "$as_me:$LINENO: error: No POSIX shell interpreter found; maybe set ATF_SHELL?" >&5 -echo "$as_me: error: No POSIX shell interpreter found; maybe set ATF_SHELL?" >&2;} - { (exit 1); exit 1; }; } -fi - - -# Extract the first word of "mtn", so it can be a program name with args. -set dummy mtn; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MTN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MTN in - [\\/]* | ?:[\\/]*) - ac_cv_path_MTN="$MTN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MTN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -MTN=$ac_cv_path_MTN -if test -n "$MTN"; then - { echo "$as_me:$LINENO: result: $MTN" >&5 -echo "${ECHO_T}$MTN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - - -ac_config_files="$ac_config_files Makefile atf-c/defs.h" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -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 - # 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 - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -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'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# 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.5, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -Automated Testing Framework config.status 0.5 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "bconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS bconfig.h" ;; - "tests/bootstrap/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/bootstrap/atconfig" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "atf-c/defs.h") CONFIG_FILES="$CONFIG_FILES atf-c/defs.h" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -target!$target$ac_delim -target_cpu!$target_cpu$ac_delim -target_vendor!$target_vendor$ac_delim -target_os!$target_os$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -SED!$SED$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -ATTRIBUTE_NORETURN!$ATTRIBUTE_NORETURN$ac_delim -atf_arch!$atf_arch$ac_delim -atf_machine!$atf_machine$ac_delim -ATF_CONFSUBDIR!$ATF_CONFSUBDIR$ac_delim -atf_confdir!$atf_confdir$ac_delim -ATF_WORKDIR!$ATF_WORKDIR$ac_delim -atf_cssdir!$atf_cssdir$ac_delim -atf_dtddir!$atf_dtddir$ac_delim -atf_egdir!$atf_egdir$ac_delim -atf_pkgconfigdir!$atf_pkgconfigdir$ac_delim -atf_xsldir!$atf_xsldir$ac_delim -ATF_SHELL!$ATF_SHELL$ac_delim -MTN!$MTN$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. -_am_arg=$ac_file -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "tests/bootstrap/atconfig":C) cat >tests/bootstrap/atconfig </dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - 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 - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - -if test ${enable_shared} = yes; then - { echo "$as_me:$LINENO: WARNING: Shared libraries with unstable ABIs/APIs have been enabled." >&5 -echo "$as_me: WARNING: Shared libraries with unstable ABIs/APIs have been enabled." >&2;} - { echo "$as_me:$LINENO: WARNING: Please do not install them as part of a binary package." >&5 -echo "$as_me: WARNING: Please do not install them as part of a binary package." >&2;} -fi - diff --git a/dist/atf/configure.ac b/dist/atf/configure.ac deleted file mode 100644 index 768cb92e37d6..000000000000 --- a/dist/atf/configure.ac +++ /dev/null @@ -1,195 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -dnl ----------------------------------------------------------------------- -dnl Initialize the GNU build system. -dnl ----------------------------------------------------------------------- - -AC_INIT([Automated Testing Framework], [0.5], [atf-devel@NetBSD.org], [atf]) -AC_PREREQ([2.60]) -AC_COPYRIGHT([Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.]) -AC_DEFINE(PACKAGE_COPYRIGHT, - ["Copyright (c) 2007, 2008 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_MACRO_DIR([admin]) -AC_CONFIG_SRCDIR([atf-c.h]) -AC_CONFIG_TESTDIR([tests/bootstrap]) - -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE([1.9 check-news subdir-objects -Wall]) - -dnl This is just a hack to reverse the meaning of the --enable-shared -dnl flag provided by libtool. We want it to default to building static -dnl libraries only for now, but these are painful during development. -dnl It is nice to have an easy way to enable shared library builds. -AC_ARG_ENABLE(unstable-shared, - AS_HELP_STRING([--enable-unstable-shared], - [Enables the build of shared libraries with unstable ABIs/APIs]), - [case $enableval in - yes|no) enable_shared=${enableval} ;; - *) enable_shared=${enableval} ;; - esac], - [enable_shared=no]) - -AC_PROG_LIBTOOL - -dnl ----------------------------------------------------------------------- -dnl Check for the C and C++ compilers and required features. -dnl ----------------------------------------------------------------------- - -AC_LANG(C) -AC_PROG_CC -AM_PROG_CC_C_O - -AC_LANG(C++) -AC_PROG_CXX - -ATF_DEVELOPER_MODE - -ATF_MODULE_APPLICATION -ATF_MODULE_DEFS -ATF_MODULE_ENV -ATF_MODULE_FS -ATF_MODULE_SANITY -ATF_MODULE_SIGNALS - -dnl ----------------------------------------------------------------------- -dnl Architecture and machine checks. -dnl ----------------------------------------------------------------------- - -machine=${target_cpu} - -case ${machine} in - i@<:@3-9@:>@86) - arch=i386 - ;; - x86_64) - arch=amd64 - ;; - *) - arch=${machine} - ;; -esac - -AC_MSG_NOTICE([Machine type: ${machine}, architecture: ${arch}]) -AC_SUBST(atf_arch, ${arch}) -AC_SUBST(atf_machine, ${machine}) - -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 - for t in /tmp /var/tmp; do - if test -d ${t}; then - ATF_WORKDIR=${t} - break - fi - done - if test x"${ATF_WORKDIR}" = x""; then - AC_MSG_ERROR([Could not guess a value for ATF_WORKDIR]) - fi -else - case ${ATF_WORKDIR} in - /*) - ;; - *) - AC_MSG_ERROR([ATF_WORKDIR must hold an absolute path]) - ;; - esac -fi - -AC_SUBST(atf_cssdir, \${datadir}/examples/atf) -AC_SUBST(atf_dtddir, \${datadir}/xml/atf) -AC_SUBST(atf_egdir, \${datadir}/examples/atf) -AC_SUBST(atf_pkgconfigdir, \${libdir}/pkgconfig) -AC_SUBST(atf_xsldir, \${datadir}/xsl/atf) - -dnl ----------------------------------------------------------------------- -dnl Check for the shell and portability problems. -dnl ----------------------------------------------------------------------- - -AC_ARG_VAR([ATF_SHELL], [Location of the POSIX shell interpreter to use]) -if test x"${ATF_SHELL}" = x""; then - AC_PATH_PROGS(ATF_SHELL, [bash sh]) -else - case ${ATF_SHELL} in - /*) - ;; - *) - AC_MSG_ERROR([ATF_SHELL must hold an absolute path]) - ;; - esac -fi -if test x"${ATF_SHELL}" = x""; then - AC_MSG_ERROR([No POSIX shell interpreter found; maybe set ATF_SHELL?]) -fi - -dnl ----------------------------------------------------------------------- -dnl Check for required tools. -dnl ----------------------------------------------------------------------- - -AC_PATH_PROG([MTN], [mtn]) - -dnl ----------------------------------------------------------------------- -dnl Finally, generate output. -dnl ----------------------------------------------------------------------- - -AC_OUTPUT([Makefile atf-c/defs.h]) - -if test ${enable_shared} = yes; then - AC_MSG_WARN([Shared libraries with unstable ABIs/APIs have been enabled.]) - AC_MSG_WARN([Please do not install them as part of a binary package.]) -fi - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/data/atf-c++.pc.in b/dist/atf/data/atf-c++.pc.in deleted file mode 100644 index f366bb016d04..000000000000 --- a/dist/atf/data/atf-c++.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -# ATF pkg-config file - -cxx=__CXX__ -includedir=__INCLUDEDIR__ -libdir=__LIBDIR__ - -Name: atf-c++ -Description: Automated Testing Framework (C++ binding) -Version: __ATF_VERSION__ -Cflags: -I${includedir} -Libs: -L${libdir} -latf-c++ -latf-c diff --git a/dist/atf/data/atf-c.pc.in b/dist/atf/data/atf-c.pc.in deleted file mode 100644 index 6fd52740b791..000000000000 --- a/dist/atf/data/atf-c.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -# ATF pkg-config file - -cc=__CC__ -includedir=__INCLUDEDIR__ -libdir=__LIBDIR__ - -Name: atf-c -Description: Automated Testing Framework (C binding) -Version: __ATF_VERSION__ -Cflags: -I${includedir} -Libs: -L${libdir} -latf-c diff --git a/dist/atf/data/atf-run.hooks b/dist/atf/data/atf-run.hooks deleted file mode 100644 index 86d187d3de3b..000000000000 --- a/dist/atf/data/atf-run.hooks +++ /dev/null @@ -1,23 +0,0 @@ -# -# Definition of custom hooks for atf-run. -# -# Uncomment any hooks that you want to override and add your own code -# to them. Some sample calls are included in them. Be very careful -# with what you print from here. -# -# See atf-run(1) for more details. -# - -#info_start_hook() -#{ -# default_info_start_hook "${@}" -# -# atf_tps_writer_info "extra.info" "An example" -#} - -#info_end_hook() -#{ -# default_info_end_hook "${@}" -# -# atf_tps_writer_info "extra.info" "An example" -#} diff --git a/dist/atf/data/tests-results.css b/dist/atf/data/tests-results.css deleted file mode 100644 index da6f4c57927d..000000000000 --- a/dist/atf/data/tests-results.css +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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. - */ - -body { - margin: 0 0 0 0; -} - -h1 { - background: black; - color: white; - font-family: Arial; - font-size: 24pt; - padding: 5pt; -} - -h2 { - background: #eeeeee; - font-family: Arial; - font-size: 16pt; - margin-left: 10pt; - margin-right: 10pt; - padding: 3pt; -} - -h3 { - font-family: Arial; - font-size: 12pt; - margin-left: 20pt; - margin-right: 20pt; - padding: 3pt; -} - -p.term { - margin-left: 40pt; - margin-right: 40pt; -} - -pre.so { - margin-left: 40pt; - margin-right: 40pt; -} - -pre.se { - margin-left: 40pt; - margin-right: 40pt; -} - -table.summary { - border-collapse: collapse; - border-color: black; - border-style: solid; - border-width: 1pt; - margin-left: auto; - margin-right: auto; -} - -table.summary th { - background: #aaaadd; - border-style: solid; - border-width: 1pt; - padding: 3pt 6pt 3pt 6pt; -} - -table.summary td { - border-style: solid; - border-width: 1pt; - padding: 3pt 6pt 3pt 6pt; -} - -table.summary td.numeric p { - text-align: right; -} - -table.summary td.numeric-error p { - text-align: right; - color: red; -} - -table.summary td.numeric-warning p { - text-align: right; - color: #aaaa00; -} - -table.summary tr.group { - background: #dddddd; -} - -table.summary tr.entry td p { - margin-left: 10pt; -} - -table.tcs-summary { - border-collapse: collapse; - border-color: black; - border-style: solid; - border-width: 1pt; - margin-left: auto; - margin-right: auto; - width: 80%; -} - -table.tcs-summary td { - border-style: solid; - border-width: 1pt; - padding: 3pt 6pt 3pt 6pt; -} - -table.tcs-summary th { - background: #aaaadd; - border-style: solid; - border-width: 1pt; - padding: 3pt 6pt 3pt 6pt; -} - -table.tcs-summary td.tp-id { - background: #dddddd; - font-weight: bold; -} - -table.tcs-summary td.tc-id p { - margin-left: 10pt; -} - -table.tcs-summary td.tcr-passed { - background: #aaffaa; -} - -table.tcs-summary td.tcr-failed { - background: #ffaaaa; -} - -table.tcs-summary td.tcr-skipped { - background: #ffffaa; -} diff --git a/dist/atf/data/tests-results.dtd b/dist/atf/data/tests-results.dtd deleted file mode 100644 index 4e3433da90f3..000000000000 --- a/dist/atf/data/tests-results.dtd +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/atf/data/tests-results.xsl b/dist/atf/data/tests-results.xsl deleted file mode 100644 index 0449afb22b18..000000000000 --- a/dist/atf/data/tests-results.xsl +++ /dev/null @@ -1,421 +0,0 @@ - -]> - - - - - - - tests-results.css - ATF Tests Results - - - - - - - - - - - - - - - - - - - - - <xsl:value-of select="$global.title" /> - - - -

- - - - - - - - - - - - - - -
- - -

Execution summary

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Item

Value

ATF

Version

Timings

Start time of tests

End time of tests

System information

Host name

Operating system

Operating system release

Operating system version

Platform

Tests results

Root

Test programs

Bogus test programs

-

-
-

-

Test cases

Passed test cases

Failed test - cases

-

-

Failed test cases

-

-

Skipped test - cases

-

-

Skipped test cases

-

-

See more execution - details

-
- - - -

Execution details

- -

Environment variables

- -
    - - - -
-
- - -
  • -

    -
  • -
    - - -

    Test cases summary

    - - - - - - - - - all - -

    Test case

    Result

    Reason

    -
    - - -
    -

    Failed test cases summary

    - - - - - - - - - failed - -

    Test case

    Result

    Reason

    - - - -
    -

    Skipped test cases summary

    - - - - - - - - - skipped - -

    Test case

    Result

    Reason

    - - - - - - - - yes - yes - yes - yes - no - - - - - - -

    - - - - - -
    -
    - - - - - - - - - yes - yes - yes - yes - no - - - - - - - - -

    - - -

    -
    - - - - - - - - -

    Passed

    -

    N/A

    -
    - - -

    Failed

    -

    -
    - - -

    Skipped

    -

    -
    - - - - - - -

    FAILED:

    -
    - - -

    SKIPPED:

    -
    - - - - - -

    Test case: - / -

    - -

    Termination reason

    - - - -

    Standard output stream

    -
    -
    - - -

    Standard error stream

    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    diff --git a/dist/atf/doc/atf-formats.5 b/dist/atf/doc/atf-formats.5 deleted file mode 100644 index 2e8596c2817d..000000000000 --- a/dist/atf/doc/atf-formats.5 +++ /dev/null @@ -1,324 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd November 4, 2007 -.Dt ATF-FORMATS 5 -.Os -.Sh NAME -.Nm atf-formats -.Nd machine-parseable data formats used by ATF -.Sh DESCRIPTION -This manual page describes the multiple data formats used in ATF. -These formats affect configuration files, control files and any data that -is externalized or internalized by the tools. -.Pp -Data files are always organized as follows: -.Bd -literal -offset indent -Header1: Value1 \\ - ... | head -HeaderN: ValueN / - mandatory blank line -Free-form text contents \\ - ... | body - ... / -.Ed -.Pp -A file must always contain a -.Sq Content-Type -header and must always separate that header from the body with a blank -line, even if the body is empty. -.Pp -The -.Sq Content-Type -is always of the form: -.Bd -literal -offset indent -Content-Type: application/X-atf-; version="" -.Ed -.Pp -where -.Sq subtype -indicates the specific file format and -.Sq version -its format version. -This header must be the first one of the file. -.Pp -The main purpose of the -.Sq Content-Type -header, aside from determining the format used in the file, is to allow -future changes to a given format. -Whenever an incompatible change is made, the version is bumped by one. -By keeping the header in the first line, future versions may even remove -the need for such a header -- e.g. if some format was replaced by XML -files, which have their own mandatory header. -.Pp -The rest of this document details the different format types. -.Ss Format: application/X-atf-atffile, version: 1 -Atffiles are logically divided into three sections: -.Bl -bullet -.It -Test programs: the list of test programs that define the test suite -described by the Atffile. -.It -Meta-data properties: these define some constant values applicable to -all the test programs defined in the file. -In some sense they define the properties that describe the test suite. -.It -Configuration variables: defaults for configuration variables that -can be overridden through configuration files or the command line. -.El -.Pp -The grammar for Atffiles is the following: -.Bd -literal -offset indent -DATA ::= ( ( CONF | PROP | TP )? COMMENT? NEWLINE )* EOF -CONF ::= 'conf:' WORD EQUAL STRING -PROP ::= 'prop:' WORD EQUAL STRING -TP ::= TPFILE | TPGLOB -TPFILE ::= 'tp: ' STRING -TPGLOB ::= 'tp-glob: ' STRING -STRING ::= WORD | '"' WORD* '"' -.Ed -.Pp -The meaning of the constructions above is: -.Bl -tag -width TPGLOBXX -.It CONF -Definition of a configuration variable. -.It PROP -Definition of a meta-data property. -.It TPFILE -Addition of a test program into the test suite. -The string is taken literally as the program's name, and this program -must exist. -.It TPGLOB -Addition of multiple test programs into the test suite. -The string is taken as a glob pattern, which may have or not have any -matches in the current directory. -.El -.Pp -An example: -.Bd -literal -offset indent -prop: test-suite = utilities - -conf: unprivileged-user = nobody - -tp: t_cp -tp: t_mv -tp: t_df -tp-glob: t_dir_* -.Ed -.Ss Format: application/X-atf-config, version: 1 -Configuration files are very simple: they only contain a list of variable -name/variable value pairs. -Their grammar is: -.Bd -literal -offset indent -DATA ::= ( VAR? COMMENT? NEWLINE )* EOF -VAR ::= WORD EQUAL STRING -COMMENT ::= HASH WORD* -STRING ::= WORD | '"' WORD* '"' -.Ed -.Pp -An example: -.Bd -literal -offset indent -# This is the system-wide configuration file for ATF. -# The above and this line are comments placed on their own line. - -var1 = this is a variable value -var2 = this is another one # Optional comment at the end. -.Ed -.Ss Format: application/X-atf-tcs, version: 1 -The -.Sq application/X-atf-tcs -format is used to describe the results of a collection of test cases; -in other words, it represents -.Em the output of a test program . -Unfortunately, it is not easy to control, from inside a test program, what -it prints to both its standard output and standard error streams. -This is specially the case of test programs written in the POSIX shell -language, because they are constantly executing external tools that may -print unexpected messages at all times. -Due to this, ATF imposes no restrictions on what a test program can send to -these two channels; in fact, they are encouraged to print as much useful -information as possible to aid in the debugging of test failures. -.Pp -Because we have no control over the two standard streams, the -.Sq application/X-atf-tcs -format describes the structure of a third stream, known as the -.Em results output , -that test programs must generate. -(Note that test programs send, by default, the results output to the -standard output; use their -.Fl r -flag to change this whenever you need to parse the data.) -This stream is decoupled from the other two and has the following grammar: -.Bd -literal -offset indent -DATA ::= TCS-COUNT TC-STANZA* EOF -TCS-COUNT ::= 'tcs-count' COLON POSITIVE-NUMBER NEWLINE -TC-STANZA ::= TC-START TC-END -TC-START ::= 'tc-start' COLON STRING NEWLINE -TC-END ::= 'tc-end' COLON STRING COMMA TCR NEWLINE -TCR ::= 'passed' | ('failed' | 'skipped') COMMA STRING -.Ed -.Pp -The meaning of the constructions above is: -.Bl -tag -width TCSXCOUNTXX -.It TCS-COUNT -Indicates the number of test cases that will be executed. -There will be this exact amount of -.Sq TC-STANZA -constructions following it. -.It TC-START -Indicates the beginning of a test case. -This is accompanied by the test case's name. -.It TC-END -Indicates the completion of a test case. -This is accompanied by the test case's name, its result and the reason -associated with this result (if applicable). -.El -.Pp -There are multiple reasons behind this design: -.Bl -bullet -.It -The reader of this format must be able to show real-time progress to the -user as the test cases are processed. -Therefore, the -.Sq TC-START -construction tells the reader -.Em when -a test case has started to process data. -.It -The reader of this format has to be able to provide useful statistics to -the user without having to wait for the end of the file. -Hence, the existence of the -.Sq TCS-COUNT -construction located at the beginning of the file. -.It -Text-based tools have to be able to easily look for the results of a given -test case. -This is why the -.Sq TC-END -construction duplicate the test case name already provided in -.Sq TC-START . -.El -.Pp -An example: -.Bd -literal -offset indent -tcs-count: 2 -tc-start: add -tc-end: add, passed -tc-start: subtract -tc-end: subtract, failed, Calculated an unexpected value -.Ed -.Pp -Going back to the standard output and standard error streams, the reader -has to be able to match the messages in those two streams to the test cases -they belong to. -To do this, these two streams must print a magic string that separates the -output of test cases from each other, which is enough to synchronize their -contents with the results output. -This string is -.Sq __atf_tc_separator__ -and it must printed on a line of its own. -The last test case should not be followed by this line because the end of -file marker takes its role. -.Ss Format: application/X-atf-tps, version: 2 -The -.Sq application/X-atf-tps -format multiplexes the standard output, standard error and results output -streams from multiple test programs into a single data file. -This format is used by -.Xr atf-run 1 -to report the execution of several test programs and is later parsed by -.Xr atf-report 1 -to inform the user of this process. -It has the following grammar: -.Bd -literal -offset indent -DATA ::= INFO* TPS-COUNT TP-STANZA* INFO* EOF -INFO ::= 'info' COLON STRING COMMA STRING NEWLINE -TPS-COUNT ::= 'tps-count' COLON POSITIVE-NUMBER NEWLINE -TP-STANZA ::= TP-START TC-STANZA* TC-END -TP-START ::= 'tp-start' COLON STRING COMMA POSITIVE-NUMBER NEWLINE -TP-END ::= 'tc-end' COLON STRING (COMMA STRING)? -TC-STANZA ::= TC-START (TC-SO | TC-SE)* TC-END -TC-START ::= 'tc-start' COLON STRING NEWLINE -TC-SO ::= 'tc-so' COLON STRING NEWLINE -TC-SE ::= 'tc-se' COLON STRING NEWLINE -TC-END ::= 'tc-end' COLON STRING COMMA TCR NEWLINE -TCR ::= 'passed' | ('failed' | 'skipped') COMMA STRING -.Ed -.Pp -The meaning of the constructions above is: -.Bl -tag -width TPSXCOUNTXX -.It TPS-COUNT -Indicates the number of test programs that will be executed. -There will be this exact amount of -.Sq TP-STANZA -constructions following it. -.It TP-START -Indicates the beginning of a test program. -This includes the program's name and the amount of test cases that -will follow. -.It TP-END -Indicates the completion of a test program. -This is followed by the program's name and, if the program ended -prematurely, an error message indicating the reason of its failure. -A successful execution of a test program (regardless of the status of its -test cases) must not be accompanied by any reason. -.It TC-START -Indicates the beginning of a test case. -This is accompanied by the test case's name. -.It TC-SO -Contains a text line sent to the standard output stream during the -execution of the test case. -Leading and trailing space is preserved. -.It TC-SE -Contains a text line sent to the standard error stream during the -execution of the test case. -Leading and trailing space is preserved. -.It TC-END -Indicates the completion of a test case. -This is accompanied by the test case's name, its result and the reason -associated with this result (if applicable). -.El -.Pp -An example: -.Bd -literal -offset indent -tps-count: 2 -tp-start: calculator, 2 -tc-start: add -tc-end: add, passed -tc-start: subtract -tc-so: 3-2 expected to return 1 but got 0 -tc-end: subtract, failed, Calculated an unexpected value -tp-end: calculator -tp-start: files, 1 -tc-start: copy -tc-se: could not find the cp(1) utility -tc-end: copy, skipped -tp-end: files -.Ed -.Sh SEE ALSO -.Xr atf 7 diff --git a/dist/atf/doc/atf-test-case.4 b/dist/atf/doc/atf-test-case.4 deleted file mode 100644 index a57693c68daa..000000000000 --- a/dist/atf/doc/atf-test-case.4 +++ /dev/null @@ -1,237 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd January 15, 2008 -.Dt ATF-TEST-CASE 8 -.Os -.Sh NAME -.Nm atf-test-case -.Nd generic description of test cases -.Sh DESCRIPTION -A -.Em test case -is a piece of code that stress-tests a specific feature of the software. -This feature is typically self-contained enough, either in the amount of -code that implements it or in the general idea that describes it, to -warrant its independent testing. -Given this, test cases are very fine-grained, but they attempt to group -similar smaller tests which are semantically related. -.Pp -A test case is defined by three components regardless of the language it is -implemented in: a header, a body and a cleanup routine. -The -.Em header -is, basically, a declarative piece of code that defines several -properties to describe what the test case does and how it behaves. -In other words: it defines the test case's -.Em meta-data , -further described in the -.Sx Meta-data -section. -The -.Em body -is the test case itself. -It executes all actions needed to reproduce the test, and checks for -failures. -This body is only executed if the abstract conditions specified by the -header are met. -The -.Em cleanup routine -routine is a piece of code always executed after the body, regardless of -the exit status of the test case. -It can be used to undo side-effects of the test case. -Note that almost all side-effects of a test case are automatically cleaned -up by the library; this is explained in more detail in the rest of this -document. -.Pp -It is extremely important to keep the separation between a test case's -header and body well-defined, because the header is -.Em always -parsed, whereas the body is only executed when the conditions defined in -the header are met and when the user specifies that test case. -.Pp -At last, test cases are always contained into test programs. -The test programs act as a front-end to them, providing a consistent -interface to the user and several APIs to ease their implementation. -.Ss Results -A test case always exits with one of the following results: -.Bl -tag -width skippedXX -.It passed -The test case was executed successfully. -.It skipped -The test case could not be executed because some preconditions were not -met. -This is not a failure because it can typically be resolved by adjusting -the system to meet the necessary conditions. -This is always accompanied by a -.Em reason , -a message describing why the test was skipped. -.It failed -An error appeared during the execution of the test case. -This is always accompanied by a -.Em reason , -a message describing why the test failed. -.El -.Ss Input/output -Test cases are free to print whatever they want to their -.Xr stdout 4 -and -.Xr stderr 4 -file descriptors. -They are, in fact, encouraged to print status information as they execute -to keep the user informed of their actions. -This is specially important for long test cases. -.Pp -Test cases will log their results to an auxiliary file, which is then -collected by the test program they are contained in. -The developer need not care about this as long as he uses the correct -APIs to implement the test cases. -.Ss Meta-data -The following list describes all meta-data properties interpreted -internally by ATF. -You are free to define new properties in your test cases and use them as -you wish. -.Bl -tag -width requireXmachineXX -.It descr -Type: textual. -Required. -.Pp -A brief textual description of the test case's purpose. -Will be shown to the user in reports. -Also good for documentation purposes. -.It ident -Type: textual. -Required. -.Pp -The test case's identifier. -Must be unique inside the test program and should be short but descriptive. -.It require.arch -Type textual. -Optional. -Pp. -A whitespace separated list of architectures that the test case can be run -under without causing errors due to an architecture mismatch. -.It require.config -Type: textual. -Optional. -.Pp -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.machine -Type textual. -Optional. -Pp. -A whitespace separated list of machine types that the test case can be run -under without causing errors due to a machine type mismatch. -.It require.progs -Type: textual. -Optional. -.Pp -A whitespace separated list of programs that must be present to execute -the test case. -These can be given as plain names, in which case they are looked in the -user's -.Ev PATH , -or as absolute paths. -If any of the required programs is not found, the test case is -.Em skipped . -.It require.user -Type: textual. -Optional. -.Pp -The required privileges to execute the test case. -Can be one of -.Sq root -or -.Sq unprivileged . -If the requested privileges do not match the current user, the test case is -.Em skipped . -.Pp -.Em NOTE : -In the future, it is expected that the test case will attempt to gain the -necessary privileges on its own before failing. -At the very least, lowering the privileges from the super-user to an -unprivileged user will be supported. -.It timeout -Type: integral. -Required; defaults to -.Sq 300 . -Specifies the maximum amount of time the test case can run. -This is particularly useful because some tests can stall either because they -are incorrectly coded or because they trigger an anomalous behavior of the -program. -It is not acceptable for these tests to stall the whole execution of the -test program. -.Pp -Can optionally be set to zero, in which case the test case has no run-time -limit. -This is discouraged. -.El -.Ss Environment -Every time a test case is executed, several environment variables are -cleared or reseted to sane values to ensure they do not make the test fail -due to unexpected conditions. -These variables are: -.Bl -tag -width LCXMESSAGESXX -.It Ev HOME -Set to the work directory's path. -.It Ev LANG -Undefined. -.It Ev LC_ALL -Undefined. -.It Ev LC_COLLATE -Undefined. -.It Ev LC_CTYPE -Undefined. -.It Ev LC_MESSAGES -Undefined. -.It Ev LC_MONETARY -Undefined. -.It Ev LC_NUMERIC -Undefined. -.It Ev LC_TIME -Undefined. -.It Ev TZ -Undefined. -.El -.Ss Work directories -The test program always creates a temporary directory -and switches to it before running the test case's body. -This way the test case is free to modify its current directory as it -wishes, and the test program will be able to clean it up later on in a -safe way, removing any traces of its execution from the system. -.Ss File creation mode mask (umask) -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-test-program 1 , -.Xr atf-formats 5 , -.Xr atf 7 diff --git a/dist/atf/doc/atf-test-program.1 b/dist/atf/doc/atf-test-program.1 deleted file mode 100644 index 3081681ddcd9..000000000000 --- a/dist/atf/doc/atf-test-program.1 +++ /dev/null @@ -1,92 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd August 18, 2007 -.Dt ATF-TEST-PROGRAM 1 -.Os -.Sh NAME -.Nm atf-test-program -.Nd common interface to ATF test programs -.Sh SYNOPSIS -.Nm -.Op Fl r Ar fd -.Op Fl s Ar srcdir -.Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN -.Op Ar test_case1 Op Ar .. test_caseN -.Nm -.Fl l -.Ar test_case1 -.Op Ar test_case1 Op Ar .. test_caseN -.Nm -.Fl h -.Sh DESCRIPTION -Test programs written using the ATF libraries all share a common user -interface, which is what this manual page describes. -.Pp -In the first synopsis form, the test program will execute the listed -test cases, or all of them if none are provided as arguments. -The test cases' names can be given as glob patterns. -.Pp -In the second synopsis form, the test program will list all available -test cases alongside a brief description of what they do. -If any arguments are specified, the list will be restricted to the -matching test cases. -The test cases' names can be given as glob patterns. -.Pp -In the third synopsis form, the test program will print information -about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XvXvarXvalueXX -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl l -Lists available test cases alongside a brief description for each of them. -.It Fl r Ar fd -Specifies the file descriptor to which the test case will redirect its -results. -These results follow a machine-parseable standardized format, and are not -meant for direct user consumption. -See -.Xr atf-formats 5 -for more details. -.It Fl s Ar srcdir -The path to the directory where the test program is located. -This is needed in all cases, except when the test program is being executed -from the current directory. -The test program will use this path to locate any helper data files or -utilities. -.It Fl v Ar var=value -Sets the configuration variable -.Ar var -to the value -.Ar value . -.El -.Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf 7 diff --git a/dist/atf/doc/atf.7.in b/dist/atf/doc/atf.7.in deleted file mode 100644 index 95e74f7aaabb..000000000000 --- a/dist/atf/doc/atf.7.in +++ /dev/null @@ -1,187 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd January 25, 2008 -.Dt ATF 7 -.Os -.Sh NAME -.Nm ATF -.Nd introduction to the Automated Testing Framework -.Sh DESCRIPTION -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 -.Ss License -.Nm -is distributed under the terms of the TNF License, a 4-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-compile 1 -Generates an executable test program based on the description of test -cases written in shell scripting. -.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. -.El -.Pp -Internal utilities: -.Bl -tag -width atfXtestXprogramXXXXX -.It Xr atf-cleanup 1 -Safely cleans up a work directory after a test case terminates. -.It Xr atf-exec 1 -Executes a command after modifying its containing process. -.It Xr atf-format 1 -Reformats a text string to not overflow terminal boundaries. -.It Xr atf-killpg 1 -Sends a signal to a process group. -.El -.Pp -Programming interfaces: -.Bl -tag -width atfXtestXprogramXXXXX -.It Xr atf-c++-api 3 -C/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 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-sh-api 3 -.It -.Xr atf-compile 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 -.It -.Xr atf-cleanup 1 -.It -.Xr atf-format 1 -.It -.Xr atf-exec 1 -.It -.Xr atf-killpg 1 -.El -.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/dist/atf/m4/cxx-std-funcs.m4 b/dist/atf/m4/cxx-std-funcs.m4 deleted file mode 100644 index 50d113d0f94e..000000000000 --- a/dist/atf/m4/cxx-std-funcs.m4 +++ /dev/null @@ -1,83 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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_CHECK_IN_STD], [ - AC_MSG_CHECKING(whether $1 is in std) - AC_COMPILE_IFELSE( - [$2 - int main(void) { - $3 - return 0; - }], - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_IN_STD], [1], - [Define to 1 if $1 is in std]), - AC_MSG_RESULT(no) - ) -]) - -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 - #include ], - [va_list ap; - char* buf = NULL; - const char* fmt = NULL; - std::vsnprintf(buf, 0, fmt, ap);] - ) -]) diff --git a/dist/atf/m4/developer-mode.m4 b/dist/atf/m4/developer-mode.m4 deleted file mode 100644 index 47292aa2ac21..000000000000 --- a/dist/atf/m4/developer-mode.m4 +++ /dev/null @@ -1,120 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -dnl ----------------------------------------------------------------------- -dnl Set up the developer mode -dnl ----------------------------------------------------------------------- - -AC_DEFUN([ATF_DEVELOPER_MODE], [ - AC_ARG_ENABLE(developer, - AS_HELP_STRING(--enable-developer, - [enable developer features]),, - [case ${PACKAGE_VERSION} in - 0.*|*99*|*alpha*|*beta*) - enable_developer=yes - ;; - *) - enable_developer=no - ;; - esac]) - - if test ${enable_developer} = yes; then - try_c_cxx_flags="-g \ - -Wall \ - -Wcast-qual \ - -Werror \ - -Wextra \ - -Wno-sign-compare \ - -Wno-unused-parameter \ - -Wpointer-arith \ - -Wredundant-decls \ - -Wreturn-type \ - -Wshadow \ - -Wswitch \ - -Wwrite-strings" - - try_c_flags="-Wmissing-prototypes \ - -Wno-traditional \ - -Wstrict-prototypes" - - try_cxx_flags="-Wabi \ - -Wctor-dtor-privacy \ - -Wno-deprecated \ - -Wno-non-template-friend \ - -Wno-pmf-conversions \ - -Wnon-virtual-dtor \ - -Woverloaded-virtual \ - -Wreorder \ - -Wsign-promo \ - -Wsynth" - - # - # The following flags should also be enabled but cannot be. Reasons - # given below. - # - # -Wold-style-cast: Raises errors when using TIOCGWINSZ, at least under - # Mac OS X. This is due to the way _IOR is defined. - # - else - try_c_cxx_flags="-DNDEBUG" - fi - try_c_cxx_flags="${try_c_cxx_flags} -D_FORTIFY_SOURCE=2" - - AC_LANG_PUSH(C) - valid="" - for f in ${try_c_cxx_flags} ${try_c_flags} - do - AC_MSG_CHECKING(whether ${CC} supports ${f}) - saved_cflags="${CFLAGS}" - CFLAGS="${CFLAGS} ${f}" - AC_LINK_IFELSE([int main(void) { return 0; }], - AC_MSG_RESULT(yes) - valid="${valid} ${f}", - AC_MSG_RESULT(no)) - CFLAGS="${saved_cflags}" - done - CFLAGS="${CFLAGS} ${valid}" - AC_LANG_POP() - - AC_LANG_PUSH(C++) - valid="" - for f in ${try_c_cxx_flags} ${try_cxx_flags} - do - AC_MSG_CHECKING(whether ${CXX} supports ${f}) - saved_cxxflags="${CXXFLAGS}" - CXXFLAGS="${CXXFLAGS} ${f}" - AC_LINK_IFELSE([int main(void) { return 0; }], - AC_MSG_RESULT(yes) - valid="${valid} ${f}", - AC_MSG_RESULT(no)) - CXXFLAGS="${saved_cxxflags}" - done - CXXFLAGS="${CXXFLAGS} ${valid}" - AC_LANG_POP() -]) diff --git a/dist/atf/m4/module-application.m4 b/dist/atf/m4/module-application.m4 deleted file mode 100644 index c02a4cafec44..000000000000 --- a/dist/atf/m4/module-application.m4 +++ /dev/null @@ -1,77 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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_APPLICATION], [ - ATF_CHECK_STD_VSNPRINTF - - AC_MSG_CHECKING(whether getopt allows a + sign for POSIX behavior) - AC_TRY_RUN([ -#include -#include -#include - -int -main(void) -{ - int argc = 4; - char* argv@<:@5@:>@ = { - strdup("conftest"), - strdup("-+"), - strdup("-a"), - strdup("bar"), - NULL - }; - int ch; - int seen_a = 0, seen_plus = 0; - - while ((ch = getopt(argc, argv, "+a:")) != -1) { - switch (ch) { - case 'a': - seen_a = 1; - break; - - case '+': - seen_plus = 1; - break; - - case '?': - default: - ; - } - } - - return (seen_a && !seen_plus) ? EXIT_SUCCESS : EXIT_FAILURE; -} -], - [getopt_allows_plus=yes - AC_DEFINE([HAVE_GNU_GETOPT], [1], - [Define to 1 if getopt allows a + sign for POSIX behavior])], - [getopt_allows_plus=no]) - AC_MSG_RESULT(${getopt_allows_plus}) -]) diff --git a/dist/atf/m4/module-defs.m4 b/dist/atf/m4/module-defs.m4 deleted file mode 100644 index 4a496f2b61a7..000000000000 --- a/dist/atf/m4/module-defs.m4 +++ /dev/null @@ -1,53 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2008 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_DEFS], [ - dnl XXX This check is overly simple and should be fixed. For example, - dnl Sun's cc does support the noreturn attribute but CC (the C++ - dnl compiler) does not. And in that case, CC just raises a warning - dnl during compilation, not an error, which later breaks the - dnl data/t_pkg_config:cxx_build check. - AC_MSG_CHECKING(whether __attribute__((noreturn)) is supported) - AC_RUN_IFELSE( - [int main(void) -{ -#if ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2) - return 0; -#else - return 1; -#endif -} - ], - [AC_MSG_RESULT(yes) - value="__attribute__((noreturn))"], - [AC_MSG_RESULT(no) - value=""] - ) - AC_SUBST([ATTRIBUTE_NORETURN], [${value}]) -]) diff --git a/dist/atf/m4/module-env.m4 b/dist/atf/m4/module-env.m4 deleted file mode 100644 index cd7b4702c45f..000000000000 --- a/dist/atf/m4/module-env.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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_ENV], [ - AC_CHECK_FUNCS([putenv setenv unsetenv]) - - ATF_CHECK_STD_PUTENV - ATF_CHECK_STD_SETENV - ATF_CHECK_STD_UNSETENV -]) diff --git a/dist/atf/m4/module-fs.m4 b/dist/atf/m4/module-fs.m4 deleted file mode 100644 index eacf098292cc..000000000000 --- a/dist/atf/m4/module-fs.m4 +++ /dev/null @@ -1,69 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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_FS], [ - AC_MSG_CHECKING(whether basename takes a constant pointer) - AC_COMPILE_IFELSE( - [#include - int main(void) { - const char* s = "/foo/bar/"; - (void)::basename(s); - }], - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_CONST_BASENAME], [1], - [Define to 1 if basename takes a constant pointer]), - AC_MSG_RESULT(no)) - - AC_MSG_CHECKING(whether dirname takes a constant pointer) - AC_COMPILE_IFELSE( - [#include - int main(void) { - const char* s = "/foo/bar/"; - (void)::dirname(s); - }], - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_CONST_DIRNAME], [1], - [Define to 1 if dirname takes a constant pointer]), - AC_MSG_RESULT(no)) - - AC_MSG_CHECKING(whether getcwd(NULL, 0) works) - AC_RUN_IFELSE( - [#include - #include - int main(void) { - char *cwd = getcwd(NULL, 0); - return (cwd != NULL) ? EXIT_SUCCESS : EXIT_FAILURE; - }], - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_GETCWD_DYN], [1], - [Define to 1 if getcwd(NULL, 0) works]), - AC_MSG_RESULT(no)) - - AC_CHECK_FUNCS([unmount]) -]) diff --git a/dist/atf/m4/module-sanity.m4 b/dist/atf/m4/module-sanity.m4 deleted file mode 100644 index 369c921b731e..000000000000 --- a/dist/atf/m4/module-sanity.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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/dist/atf/m4/module-signals.m4 b/dist/atf/m4/module-signals.m4 deleted file mode 100644 index ed16a28bc428..000000000000 --- a/dist/atf/m4/module-signals.m4 +++ /dev/null @@ -1,92 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2008 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_SIGNALS], [ - AC_MSG_CHECKING(for the last valid signal) - AC_TRY_RUN([ -#include -#include -#include -#include -#include -#include - -int -main(void) -{ - int i; - FILE *f; - - i = 0; - while (i < 1024) { - i++; - if (i != SIGKILL && i != SIGSTOP) { - struct sigaction sa; - int ret; - - sa.sa_handler = SIG_IGN; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - - ret = sigaction(i, &sa, NULL); - if (ret == -1) { - if (errno == EINVAL) { - i--; - break; - } else - err(EXIT_FAILURE, "sigaction failed"); - } - } - } - if (i == 100) - errx(EXIT_FAILURE, "too much signals"); - - f = fopen("conftest.cnt", "w"); - if (f == NULL) - err(EXIT_FAILURE, "failed to open file"); - - fprintf(f, "%d\n", i); - fclose(f); - - return EXIT_SUCCESS; -} -], - [if test ! -f conftest.cnt; then - last_signo=15 - AC_MSG_RESULT(failed; assuming ${last_signo}) - else - last_signo=$(cat conftest.cnt) - rm -f conftest.cnt - AC_MSG_RESULT(${last_signo}) - fi], - [last_signo=15 - AC_MSG_RESULT(failed; assuming ${last_signo})]) - AC_DEFINE_UNQUOTED([LAST_SIGNO], [${last_signo}], - [Define to the last valid signal number]) -]) diff --git a/dist/atf/revision.h b/dist/atf/revision.h deleted file mode 100644 index 9d3356d85188..000000000000 --- a/dist/atf/revision.h +++ /dev/null @@ -1 +0,0 @@ -#define PACKAGE_REVISION_BASE "0b094aecb5df00cbc8a6a1a9b2668bd586ad5938" diff --git a/dist/atf/tests/atf/Atffile b/dist/atf/tests/atf/Atffile deleted file mode 100644 index 258cff3b9035..000000000000 --- a/dist/atf/tests/atf/Atffile +++ /dev/null @@ -1,11 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: atf-c -tp: atf-c++ -tp: atf-sh -tp: test_programs -tp: tools -tp: formats -tp: data diff --git a/dist/atf/tests/atf/atf-c++/Atffile b/dist/atf/tests/atf/atf-c++/Atffile deleted file mode 100644 index c3c9986ef687..000000000000 --- a/dist/atf/tests/atf/atf-c++/Atffile +++ /dev/null @@ -1,16 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: t_env -tp: t_config -tp: t_text -tp: t_fs -tp: t_macros -tp: t_io -tp: t_expand -tp: t_user -tp: t_parser -tp: t_signals -tp: t_tests -tp: t_utils diff --git a/dist/atf/tests/atf/atf-c++/t_config.cpp b/dist/atf/tests/atf/atf-c++/t_config.cpp deleted file mode 100644 index cdb4d70fd574..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_config.cpp +++ /dev/null @@ -1,287 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/config.hpp" -#include "atf-c++/env.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/macros.hpp" - -namespace atf { - namespace config { - void __reinit(void); - } -} - -static -void -set_env_var(const char* name, const char* val) -{ - try { - atf::env::set(name, val); - } catch (const atf::system_error& e) { - ATF_FAIL(std::string("set_env_var(") + name + ", " + val + - ") failed"); - } -} - -static -void -unset_env_var(const char* name) -{ - try { - atf::env::unset(name); - } catch (const atf::system_error& e) { - ATF_FAIL(std::string("unset_env_var(") + name + ") failed"); - } -} - -ATF_TEST_CASE(get); -ATF_TEST_CASE_HEAD(get) -{ - set_md_var("descr", "Tests the config::get function"); -} -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_env_var("ATF_ARCH"); - unset_env_var("ATF_CONFDIR"); - unset_env_var("ATF_LIBEXECDIR"); - unset_env_var("ATF_MACHINE"); - unset_env_var("ATF_PKGDATADIR"); - unset_env_var("ATF_SHELL"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Make sure empty values in the environment are not considered. - set_env_var("ATF_ARCH", ""); - set_env_var("ATF_CONFDIR", ""); - set_env_var("ATF_LIBEXECDIR", ""); - set_env_var("ATF_MACHINE", ""); - set_env_var("ATF_PKGDATADIR", ""); - set_env_var("ATF_SHELL", ""); - set_env_var("ATF_WORKDIR", ""); - atf::config::__reinit(); - ATF_CHECK(!atf::config::get("atf_arch").empty()); - ATF_CHECK(!atf::config::get("atf_confdir").empty()); - ATF_CHECK(!atf::config::get("atf_libexecdir").empty()); - ATF_CHECK(!atf::config::get("atf_machine").empty()); - ATF_CHECK(!atf::config::get("atf_pkgdatadir").empty()); - ATF_CHECK(!atf::config::get("atf_shell").empty()); - ATF_CHECK(!atf::config::get("atf_workdir").empty()); - - // Check if the ATF_ARCH variable is recognized. - set_env_var ("ATF_ARCH", "env-value"); - unset_env_var("ATF_LIBEXECDIR"); - unset_env_var("ATF_MACHINE"); - unset_env_var("ATF_PKGDATADIR"); - unset_env_var("ATF_SHELL"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK_EQUAL(atf::config::get("atf_arch"), "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Check if the ATF_CONFDIR variable is recognized. - unset_env_var("ATF_ARCH"); - set_env_var ("ATF_CONFDIR", "env-value"); - unset_env_var("ATF_LIBEXECDIR"); - unset_env_var("ATF_MACHINE"); - unset_env_var("ATF_PKGDATADIR"); - unset_env_var("ATF_SHELL"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK_EQUAL(atf::config::get("atf_confdir"), "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Check if the ATF_LIBEXECDIR variable is recognized. - unset_env_var("ATF_ARCH"); - unset_env_var("ATF_CONFDIR"); - set_env_var ("ATF_LIBEXECDIR", "env-value"); - unset_env_var("ATF_MACHINE"); - unset_env_var("ATF_PKGDATADIR"); - unset_env_var("ATF_SHELL"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK_EQUAL(atf::config::get("atf_libexecdir"), "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Check if the ATF_MACHINE variable is recognized. - unset_env_var("ATF_ARCH"); - unset_env_var("ATF_CONFDIR"); - unset_env_var("ATF_LIBEXECDIR"); - set_env_var ("ATF_MACHINE", "env-value"); - unset_env_var("ATF_PKGDATADIR"); - unset_env_var("ATF_SHELL"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK_EQUAL(atf::config::get("atf_machine"), "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Check if the ATF_PKGDATADIR variable is recognized. - unset_env_var("ATF_ARCH"); - unset_env_var("ATF_CONFDIR"); - unset_env_var("ATF_LIBEXECDIR"); - unset_env_var("ATF_MACHINE"); - set_env_var ("ATF_PKGDATADIR", "env-value"); - unset_env_var("ATF_SHELL"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK_EQUAL(atf::config::get("atf_pkgdatadir"), "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Check if the ATF_SHELL variable is recognized. - unset_env_var("ATF_ARCH"); - unset_env_var("ATF_CONFDIR"); - unset_env_var("ATF_LIBEXECDIR"); - unset_env_var("ATF_MACHINE"); - unset_env_var("ATF_PKGDATADIR"); - set_env_var ("ATF_SHELL", "env-value"); - unset_env_var("ATF_WORKDIR"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK_EQUAL(atf::config::get("atf_shell"), "env-value"); - ATF_CHECK(atf::config::get("atf_workdir") != "env-value"); - - // Check if the ATF_WORKDIR variable is recognized. - unset_env_var("ATF_ARCH"); - unset_env_var("ATF_CONFDIR"); - unset_env_var("ATF_LIBEXECDIR"); - unset_env_var("ATF_MACHINE"); - unset_env_var("ATF_PKGDATADIR"); - unset_env_var("ATF_SHELL"); - set_env_var ("ATF_WORKDIR", "env-value"); - atf::config::__reinit(); - ATF_CHECK(atf::config::get("atf_arch") != "env-value"); - ATF_CHECK(atf::config::get("atf_confdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_libexecdir") != "env-value"); - ATF_CHECK(atf::config::get("atf_machine") != "env-value"); - ATF_CHECK(atf::config::get("atf_pkgdatadir") != "env-value"); - ATF_CHECK(atf::config::get("atf_shell") != "env-value"); - ATF_CHECK_EQUAL(atf::config::get("atf_workdir"), "env-value"); -} - -ATF_TEST_CASE(get_all); -ATF_TEST_CASE_HEAD(get_all) -{ - set_md_var("descr", "Tests the config::get_all function"); -} -ATF_TEST_CASE_BODY(get_all) -{ - atf::config::__reinit(); - - // Check that the valid variables, and only those, are returned. - std::map< std::string, std::string > vars = atf::config::get_all(); - ATF_CHECK_EQUAL(vars.size(), 7); - ATF_CHECK(vars.find("atf_arch") != vars.end()); - ATF_CHECK(vars.find("atf_confdir") != vars.end()); - ATF_CHECK(vars.find("atf_libexecdir") != vars.end()); - ATF_CHECK(vars.find("atf_machine") != vars.end()); - ATF_CHECK(vars.find("atf_pkgdatadir") != vars.end()); - ATF_CHECK(vars.find("atf_shell") != vars.end()); - ATF_CHECK(vars.find("atf_workdir") != vars.end()); -} - -ATF_TEST_CASE(has); -ATF_TEST_CASE_HEAD(has) -{ - set_md_var("descr", "Tests the config::has function"); -} -ATF_TEST_CASE_BODY(has) -{ - atf::config::__reinit(); - - // Check for all the variables that must exist. - ATF_CHECK(atf::config::has("atf_arch")); - ATF_CHECK(atf::config::has("atf_confdir")); - ATF_CHECK(atf::config::has("atf_libexecdir")); - ATF_CHECK(atf::config::has("atf_machine")); - ATF_CHECK(atf::config::has("atf_pkgdatadir")); - ATF_CHECK(atf::config::has("atf_shell")); - ATF_CHECK(atf::config::has("atf_workdir")); - - // Same as above, but using uppercase (which is incorrect). - ATF_CHECK(!atf::config::has("ATF_ARCH")); - ATF_CHECK(!atf::config::has("ATF_CONFDIR")); - ATF_CHECK(!atf::config::has("ATF_LIBEXECDIR")); - ATF_CHECK(!atf::config::has("ATF_MACHINE")); - ATF_CHECK(!atf::config::has("ATF_PKGDATADIR")); - ATF_CHECK(!atf::config::has("ATF_SHELL")); - ATF_CHECK(!atf::config::has("ATF_WORKDIR")); - - // Check for some other variables that cannot exist. - ATF_CHECK(!atf::config::has("foo")); - ATF_CHECK(!atf::config::has("BAR")); - ATF_CHECK(!atf::config::has("atf_foo")); - ATF_CHECK(!atf::config::has("ATF_BAR")); - ATF_CHECK(!atf::config::has("atf_shel")); - ATF_CHECK(!atf::config::has("atf_shells")); -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, has); - ATF_ADD_TEST_CASE(tcs, get); - ATF_ADD_TEST_CASE(tcs, get_all); -} diff --git a/dist/atf/tests/atf/atf-c++/t_env.cpp b/dist/atf/tests/atf/atf-c++/t_env.cpp deleted file mode 100644 index c70f07aa826c..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_env.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/env.hpp" -#include "atf-c++/macros.hpp" - -ATF_TEST_CASE(has_get); -ATF_TEST_CASE_HEAD(has_get) -{ - set_md_var("descr", "Tests the has and get functions"); -} -ATF_TEST_CASE_BODY(has_get) -{ - ATF_CHECK(atf::env::has("PATH")); - ATF_CHECK(!atf::env::get("PATH").empty()); - - ATF_CHECK(!atf::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_CHECK(atf::env::has("PATH")); - const std::string& oldval = atf::env::get("PATH"); - atf::env::set("PATH", "foo-bar"); - ATF_CHECK(atf::env::get("PATH") != oldval); - ATF_CHECK_EQUAL(atf::env::get("PATH"), "foo-bar"); - - ATF_CHECK(!atf::env::has("_UNDEFINED_VARIABLE_")); - atf::env::set("_UNDEFINED_VARIABLE_", "foo2-bar2"); - ATF_CHECK_EQUAL(atf::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_CHECK(atf::env::has("PATH")); - atf::env::unset("PATH"); - ATF_CHECK(!atf::env::has("PATH")); -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, has_get); - ATF_ADD_TEST_CASE(tcs, set); - ATF_ADD_TEST_CASE(tcs, unset); -} diff --git a/dist/atf/tests/atf/atf-c++/t_expand.cpp b/dist/atf/tests/atf/atf-c++/t_expand.cpp deleted file mode 100644 index f6f4cce86980..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_expand.cpp +++ /dev/null @@ -1,267 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/expand.hpp" -#include "atf-c++/macros.hpp" - -// XXX Many of the tests here are duplicated in atf-c/t_expand. Should -// find a way to easily share them, or maybe remove the ones here. - -// ------------------------------------------------------------------------ -// Test cases for the free functions. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(is_glob); -ATF_TEST_CASE_HEAD(is_glob) -{ - set_md_var("descr", "Tests the is_glob function."); -} -ATF_TEST_CASE_BODY(is_glob) -{ - using atf::expand::is_glob; - - ATF_CHECK(!is_glob("")); - ATF_CHECK(!is_glob("a")); - ATF_CHECK(!is_glob("foo")); - - ATF_CHECK( is_glob("*")); - ATF_CHECK( is_glob("a*")); - ATF_CHECK( is_glob("*a")); - ATF_CHECK( is_glob("a*b")); - - ATF_CHECK( is_glob("?")); - ATF_CHECK( is_glob("a?")); - ATF_CHECK( is_glob("?a")); - ATF_CHECK( is_glob("a?b")); -} - -ATF_TEST_CASE(matches_glob_plain); -ATF_TEST_CASE_HEAD(matches_glob_plain) -{ - set_md_var("descr", "Tests the matches_glob function by using plain " - "text strings as patterns only."); -} -ATF_TEST_CASE_BODY(matches_glob_plain) -{ - using atf::expand::matches_glob; - - ATF_CHECK( matches_glob("", "")); - ATF_CHECK(!matches_glob("a", "")); - ATF_CHECK(!matches_glob("", "a")); - - ATF_CHECK( matches_glob("ab", "ab")); - ATF_CHECK(!matches_glob("abc", "ab")); - ATF_CHECK(!matches_glob("ab", "abc")); -} - -ATF_TEST_CASE(matches_glob_star); -ATF_TEST_CASE_HEAD(matches_glob_star) -{ - set_md_var("descr", "Tests the matches_glob function by using the '*' " - "meta-character as part of the pattern."); -} -ATF_TEST_CASE_BODY(matches_glob_star) -{ - using atf::expand::matches_glob; - - ATF_CHECK( matches_glob("*", "")); - ATF_CHECK( matches_glob("*", "a")); - ATF_CHECK( matches_glob("*", "ab")); - - ATF_CHECK(!matches_glob("a*", "")); - ATF_CHECK( matches_glob("a*", "a")); - ATF_CHECK( matches_glob("a*", "aa")); - ATF_CHECK( matches_glob("a*", "ab")); - ATF_CHECK( matches_glob("a*", "abc")); - ATF_CHECK(!matches_glob("a*", "ba")); - - ATF_CHECK( matches_glob("*a", "a")); - ATF_CHECK( matches_glob("*a", "ba")); - ATF_CHECK(!matches_glob("*a", "bc")); - ATF_CHECK(!matches_glob("*a", "bac")); - - ATF_CHECK( matches_glob("*ab", "ab")); - ATF_CHECK( matches_glob("*ab", "aab")); - ATF_CHECK( matches_glob("*ab", "aaab")); - ATF_CHECK( matches_glob("*ab", "bab")); - ATF_CHECK(!matches_glob("*ab", "bcb")); - ATF_CHECK(!matches_glob("*ab", "bacb")); - - ATF_CHECK( matches_glob("a*b", "ab")); - ATF_CHECK( matches_glob("a*b", "acb")); - ATF_CHECK( matches_glob("a*b", "acdeb")); - ATF_CHECK(!matches_glob("a*b", "acdebz")); - ATF_CHECK(!matches_glob("a*b", "zacdeb")); -} - -ATF_TEST_CASE(matches_glob_question); -ATF_TEST_CASE_HEAD(matches_glob_question) -{ - set_md_var("descr", "Tests the matches_glob function by using the '?' " - "meta-character as part of the pattern."); -} -ATF_TEST_CASE_BODY(matches_glob_question) -{ - using atf::expand::matches_glob; - - ATF_CHECK(!matches_glob("?", "")); - ATF_CHECK( matches_glob("?", "a")); - ATF_CHECK(!matches_glob("?", "ab")); - - ATF_CHECK( matches_glob("?", "b")); - ATF_CHECK( matches_glob("?", "c")); - - ATF_CHECK( matches_glob("a?", "ab")); - ATF_CHECK( matches_glob("a?", "ac")); - ATF_CHECK(!matches_glob("a?", "ca")); - - ATF_CHECK( matches_glob("???", "abc")); - ATF_CHECK( matches_glob("???", "def")); - ATF_CHECK(!matches_glob("???", "a")); - ATF_CHECK(!matches_glob("???", "ab")); - ATF_CHECK(!matches_glob("???", "abcd")); -} - -ATF_TEST_CASE(expand_glob_base); -ATF_TEST_CASE_HEAD(expand_glob_base) -{ - set_md_var("descr", "Tests the expand_glob function with random " - "patterns."); -} -ATF_TEST_CASE_BODY(expand_glob_base) -{ - using atf::expand::expand_glob; - - std::vector< std::string > candidates; - candidates.push_back("foo"); - candidates.push_back("bar"); - candidates.push_back("baz"); - candidates.push_back("foobar"); - candidates.push_back("foobarbaz"); - candidates.push_back("foobarbazfoo"); - - std::vector< std::string > exps; - - exps = expand_glob("foo", candidates); - ATF_CHECK_EQUAL(exps.size(), 1); - ATF_CHECK(exps[0] == "foo"); - - exps = expand_glob("bar", candidates); - ATF_CHECK_EQUAL(exps.size(), 1); - ATF_CHECK(exps[0] == "bar"); - - exps = expand_glob("foo*", candidates); - ATF_CHECK_EQUAL(exps.size(), 4); - ATF_CHECK(exps[0] == "foo"); - ATF_CHECK(exps[1] == "foobar"); - ATF_CHECK(exps[2] == "foobarbaz"); - ATF_CHECK(exps[3] == "foobarbazfoo"); - - exps = expand_glob("*foo", candidates); - ATF_CHECK_EQUAL(exps.size(), 2); - ATF_CHECK(exps[0] == "foo"); - ATF_CHECK(exps[1] == "foobarbazfoo"); - - exps = expand_glob("*foo*", candidates); - ATF_CHECK_EQUAL(exps.size(), 4); - ATF_CHECK(exps[0] == "foo"); - ATF_CHECK(exps[1] == "foobar"); - ATF_CHECK(exps[2] == "foobarbaz"); - ATF_CHECK(exps[3] == "foobarbazfoo"); - - exps = expand_glob("ba", candidates); - ATF_CHECK_EQUAL(exps.size(), 0); - - exps = expand_glob("ba*", candidates); - ATF_CHECK_EQUAL(exps.size(), 2); - ATF_CHECK(exps[0] == "bar"); - ATF_CHECK(exps[1] == "baz"); - - exps = expand_glob("*ba", candidates); - ATF_CHECK_EQUAL(exps.size(), 0); - - exps = expand_glob("*ba*", candidates); - ATF_CHECK_EQUAL(exps.size(), 5); - ATF_CHECK(exps[0] == "bar"); - ATF_CHECK(exps[1] == "baz"); - ATF_CHECK(exps[2] == "foobar"); - ATF_CHECK(exps[3] == "foobarbaz"); - ATF_CHECK(exps[4] == "foobarbazfoo"); -} - -ATF_TEST_CASE(expand_glob_tps); -ATF_TEST_CASE_HEAD(expand_glob_tps) -{ - set_md_var("descr", "Tests the expand_glob function with patterns that " - "match typical test program names. This is just a subcase " - "of expand_base, but it is nice to make sure that it really " - "works."); -} -ATF_TEST_CASE_BODY(expand_glob_tps) -{ - using atf::expand::expand_glob; - - std::vector< std::string > candidates; - candidates.push_back("Atffile"); - candidates.push_back("h_foo"); - candidates.push_back("t_foo"); - candidates.push_back("t_bar"); - candidates.push_back("t_baz"); - candidates.push_back("foo_helper"); - candidates.push_back("foo_test"); - candidates.push_back("bar_test"); - candidates.push_back("baz_test"); - - std::vector< std::string > exps; - - exps = expand_glob("t_*", candidates); - ATF_CHECK_EQUAL(exps.size(), 3); - ATF_CHECK(exps[0] == "t_foo"); - ATF_CHECK(exps[1] == "t_bar"); - ATF_CHECK(exps[2] == "t_baz"); - - exps = expand_glob("*_test", candidates); - ATF_CHECK_EQUAL(exps.size(), 3); - ATF_CHECK(exps[0] == "foo_test"); - ATF_CHECK(exps[1] == "bar_test"); - ATF_CHECK(exps[2] == "baz_test"); -} - -ATF_INIT_TEST_CASES(tcs) -{ - // Add the tests for the free functions. - ATF_ADD_TEST_CASE(tcs, is_glob); - ATF_ADD_TEST_CASE(tcs, matches_glob_plain); - ATF_ADD_TEST_CASE(tcs, matches_glob_star); - ATF_ADD_TEST_CASE(tcs, matches_glob_question); - ATF_ADD_TEST_CASE(tcs, expand_glob_base); - ATF_ADD_TEST_CASE(tcs, expand_glob_tps); -} diff --git a/dist/atf/tests/atf/atf-c++/t_fs.cpp b/dist/atf/tests/atf/atf-c++/t_fs.cpp deleted file mode 100644 index d85f6644c765..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_fs.cpp +++ /dev/null @@ -1,679 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/exceptions.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/macros.hpp" - -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 atf::fs::path; - - ATF_CHECK_EQUAL(path(".").str(), "."); - ATF_CHECK_EQUAL(path("..").str(), ".."); - - ATF_CHECK_EQUAL(path("foo").str(), "foo"); - ATF_CHECK_EQUAL(path("foo/bar").str(), "foo/bar"); - ATF_CHECK_EQUAL(path("foo/bar/").str(), "foo/bar"); - - ATF_CHECK_EQUAL(path("/foo").str(), "/foo"); - ATF_CHECK_EQUAL(path("/foo/bar").str(), "/foo/bar"); - ATF_CHECK_EQUAL(path("/foo/bar/").str(), "/foo/bar"); - - ATF_CHECK_EQUAL(path("///foo").str(), "/foo"); - ATF_CHECK_EQUAL(path("///foo///bar").str(), "/foo/bar"); - ATF_CHECK_EQUAL(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 atf::fs::path; - - ATF_CHECK( path("/").is_absolute()); - ATF_CHECK( path("////").is_absolute()); - ATF_CHECK( path("////a").is_absolute()); - ATF_CHECK( path("//a//").is_absolute()); - ATF_CHECK(!path("a////").is_absolute()); - ATF_CHECK(!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 atf::fs::path; - - ATF_CHECK( path("/").is_root()); - ATF_CHECK( path("////").is_root()); - ATF_CHECK(!path("////a").is_root()); - ATF_CHECK(!path("//a//").is_root()); - ATF_CHECK(!path("a////").is_root()); - ATF_CHECK(!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 atf::fs::path; - - ATF_CHECK_EQUAL(path(".").branch_path().str(), "."); - ATF_CHECK_EQUAL(path("foo").branch_path().str(), "."); - ATF_CHECK_EQUAL(path("foo/bar").branch_path().str(), "foo"); - ATF_CHECK_EQUAL(path("/foo").branch_path().str(), "/"); - ATF_CHECK_EQUAL(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 atf::fs::path; - - ATF_CHECK_EQUAL(path(".").leaf_name(), "."); - ATF_CHECK_EQUAL(path("foo").leaf_name(), "foo"); - ATF_CHECK_EQUAL(path("foo/bar").leaf_name(), "bar"); - ATF_CHECK_EQUAL(path("/foo").leaf_name(), "foo"); - ATF_CHECK_EQUAL(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 atf::fs::path; - - ATF_CHECK(path("/") == path("///")); - ATF_CHECK(path("/a") == path("///a")); - ATF_CHECK(path("/a") == path("///a///")); - - ATF_CHECK(path("a/b/c") == path("a//b//c")); - ATF_CHECK(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 atf::fs::path; - - ATF_CHECK(path("/") != path("//a/")); - ATF_CHECK(path("/a") != path("a///")); - - ATF_CHECK(path("a/b/c") != path("a/b")); - ATF_CHECK(path("a/b/c") != path("a//b")); - ATF_CHECK(path("a/b/c") != path("/a/b/c")); - ATF_CHECK(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 atf::fs::path; - - ATF_CHECK_EQUAL((path("foo") / "bar").str(), "foo/bar"); - ATF_CHECK_EQUAL((path("foo/") / "/bar").str(), "foo/bar"); - ATF_CHECK_EQUAL((path("foo/") / "/bar/baz").str(), "foo/bar/baz"); - ATF_CHECK_EQUAL((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 atf::fs::file_info; - using atf::fs::path; - - create_files(); - - { - const path p("."); - path pa = p.to_absolute(); - ATF_CHECK(pa.is_absolute()); - - file_info fi(p); - file_info fia(pa); - ATF_CHECK_EQUAL(fi.get_device(), fia.get_device()); - ATF_CHECK_EQUAL(fi.get_inode(), fia.get_inode()); - } - - { - const path p("files/reg"); - path pa = p.to_absolute(); - ATF_CHECK(pa.is_absolute()); - - file_info fi(p); - file_info fia(pa); - ATF_CHECK_EQUAL(fi.get_device(), fia.get_device()); - ATF_CHECK_EQUAL(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 atf::fs::path; - - create_files(); - - ATF_CHECK(!(path("aaa") < path("aaa"))); - - ATF_CHECK( path("aab") < path("abc")); - ATF_CHECK(!(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 atf::fs::directory; - using atf::fs::path; - - create_files(); - - directory d(path("files")); - ATF_CHECK_EQUAL(d.size(), 4); - ATF_CHECK(d.find(".") != d.end()); - ATF_CHECK(d.find("..") != d.end()); - ATF_CHECK(d.find("dir") != d.end()); - ATF_CHECK(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 atf::fs::directory; - using atf::fs::file_info; - using atf::fs::path; - - create_files(); - - directory d(path("files")); - - { - directory::const_iterator iter = d.find("dir"); - ATF_CHECK(iter != d.end()); - const file_info& fi = (*iter).second; - ATF_CHECK(fi.get_type() == file_info::dir_type); - } - - { - directory::const_iterator iter = d.find("reg"); - ATF_CHECK(iter != d.end()); - const file_info& fi = (*iter).second; - ATF_CHECK(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 atf::fs::directory; - using atf::fs::path; - - create_files(); - - directory d(path("files")); - std::set< std::string > ns = d.names(); - ATF_CHECK_EQUAL(ns.size(), 4); - ATF_CHECK(ns.find(".") != ns.end()); - ATF_CHECK(ns.find("..") != ns.end()); - ATF_CHECK(ns.find("dir") != ns.end()); - ATF_CHECK(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 atf::fs::file_info; - using atf::fs::path; - - create_files(); - - { - path p("files/dir"); - file_info fi(p); - ATF_CHECK(fi.get_type() == file_info::dir_type); - } - - { - path p("files/reg"); - file_info fi(p); - ATF_CHECK(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 atf::fs::file_info; - using atf::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_CHECK(fi.is_owner_readable() == ur); \ - ATF_CHECK(fi.is_owner_writable() == uw); \ - ATF_CHECK(fi.is_owner_executable() == ux); \ - ATF_CHECK(fi.is_group_readable() == gr); \ - ATF_CHECK(fi.is_group_writable() == gw); \ - ATF_CHECK(fi.is_group_executable() == gx); \ - ATF_CHECK(fi.is_other_readable() == othr); \ - ATF_CHECK(fi.is_other_writable() == othw); \ - ATF_CHECK(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) -{ - using atf::fs::exists; - using atf::fs::file_info; - using atf::fs::path; - using atf::fs::temp_dir; - - path t1("non-existent"); - path t2("non-existent"); - - { - path tmpl("testdir.XXXXXX"); - temp_dir td1(tmpl); - temp_dir td2(tmpl); - t1 = td1.get_path(); - t2 = td2.get_path(); - ATF_CHECK(t1.str().find("XXXXXX") == std::string::npos); - ATF_CHECK(t2.str().find("XXXXXX") == std::string::npos); - ATF_CHECK(t1 != t2); - ATF_CHECK(!exists(tmpl)); - ATF_CHECK( exists(t1)); - ATF_CHECK( exists(t2)); - - file_info fi1(t1); - ATF_CHECK( fi1.is_owner_readable()); - ATF_CHECK( fi1.is_owner_writable()); - ATF_CHECK( fi1.is_owner_executable()); - ATF_CHECK(!fi1.is_group_readable()); - ATF_CHECK(!fi1.is_group_writable()); - ATF_CHECK(!fi1.is_group_executable()); - ATF_CHECK(!fi1.is_other_readable()); - ATF_CHECK(!fi1.is_other_writable()); - ATF_CHECK(!fi1.is_other_executable()); - - file_info fi2(t2); - ATF_CHECK( fi2.is_owner_readable()); - ATF_CHECK( fi2.is_owner_writable()); - ATF_CHECK( fi2.is_owner_executable()); - ATF_CHECK(!fi2.is_group_readable()); - ATF_CHECK(!fi2.is_group_writable()); - ATF_CHECK(!fi2.is_group_executable()); - ATF_CHECK(!fi2.is_other_readable()); - ATF_CHECK(!fi2.is_other_writable()); - ATF_CHECK(!fi2.is_other_executable()); - } - - ATF_CHECK(t1.str() != "non-existent"); - ATF_CHECK(!exists(t1)); - ATF_CHECK(t2.str() != "non-existent"); - ATF_CHECK(!exists(t2)); -} - -// ------------------------------------------------------------------------ -// Test cases for the free functions. -// ------------------------------------------------------------------------ - -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::fs::change_directory; - using atf::fs::get_current_dir; - using atf::fs::path; - - create_files(); - const path old = get_current_dir(); - - ATF_CHECK_THROW(change_directory(path("files/reg")), atf::system_error); - ATF_CHECK(get_current_dir() == old); - - path old2 = change_directory(path("files")); - ATF_CHECK(old2 == old); - path old3 = change_directory(path("dir")); - ATF_CHECK(old3 == old2 / "files"); - path old4 = change_directory(path("../..")); - ATF_CHECK(old4 == old3 / "dir"); - ATF_CHECK(get_current_dir() == old); -} - -ATF_TEST_CASE(exists); -ATF_TEST_CASE_HEAD(exists) -{ - set_md_var("descr", "Tests the exists function"); -} -ATF_TEST_CASE_BODY(exists) -{ - using atf::fs::exists; - using atf::fs::path; - - create_files(); - - ATF_CHECK( exists(path("files"))); - ATF_CHECK(!exists(path("file"))); - ATF_CHECK(!exists(path("files2"))); - - ATF_CHECK( exists(path("files/."))); - ATF_CHECK( exists(path("files/.."))); - ATF_CHECK( exists(path("files/dir"))); - ATF_CHECK( exists(path("files/reg"))); - ATF_CHECK(!exists(path("files/foo"))); -} - -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::fs::change_directory; - using atf::fs::get_current_dir; - using atf::fs::path; - - create_files(); - - path curdir = get_current_dir(); - change_directory(path(".")); - ATF_CHECK(get_current_dir() == curdir); - change_directory(path("files")); - ATF_CHECK(get_current_dir() == curdir / "files"); - change_directory(path("dir")); - ATF_CHECK(get_current_dir() == curdir / "files/dir"); - change_directory(path("..")); - ATF_CHECK(get_current_dir() == curdir / "files"); - change_directory(path("..")); - ATF_CHECK(get_current_dir() == curdir); -} - -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 atf::fs::is_executable; - using atf::fs::path; - - create_files(); - - ATF_CHECK( is_executable(path("files"))); - ATF_CHECK( is_executable(path("files/."))); - ATF_CHECK( is_executable(path("files/.."))); - ATF_CHECK( is_executable(path("files/dir"))); - - ATF_CHECK(!is_executable(path("non-existent"))); - - ATF_CHECK(!is_executable(path("files/reg"))); - ATF_CHECK(::chmod("files/reg", 0755) != -1); - ATF_CHECK( is_executable(path("files/reg"))); -} - -ATF_TEST_CASE(cleanup); -ATF_TEST_CASE_HEAD(cleanup) -{ - set_md_var("descr", "Tests the cleanup function"); -} -ATF_TEST_CASE_BODY(cleanup) -{ - using atf::fs::cleanup; - using atf::fs::get_current_dir; - using atf::fs::exists; - using atf::fs::path; - - create_files(); - - path p("files"); - ATF_CHECK( exists(p)); - ATF_CHECK( exists(p / "dir")); - ATF_CHECK( exists(p / "reg")); - cleanup(p); - ATF_CHECK(!exists(p)); -} - -ATF_TEST_CASE(remove); -ATF_TEST_CASE_HEAD(remove) -{ - set_md_var("descr", "Tests the remove function"); -} -ATF_TEST_CASE_BODY(remove) -{ - using atf::fs::exists; - using atf::fs::path; - using atf::fs::remove; - - create_files(); - - ATF_CHECK( exists(path("files/reg"))); - remove(path("files/reg")); - ATF_CHECK(!exists(path("files/reg"))); - - ATF_CHECK( exists(path("files/dir"))); - ATF_CHECK_THROW(remove(path("files/dir")), atf::system_error); - ATF_CHECK( exists(path("files/dir"))); -} - -// ------------------------------------------------------------------------ -// 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, get_current_dir); - ATF_ADD_TEST_CASE(tcs, exists); - ATF_ADD_TEST_CASE(tcs, is_executable); - ATF_ADD_TEST_CASE(tcs, change_directory); - ATF_ADD_TEST_CASE(tcs, cleanup); - ATF_ADD_TEST_CASE(tcs, remove); -} diff --git a/dist/atf/tests/atf/atf-c++/t_io.cpp b/dist/atf/tests/atf/atf-c++/t_io.cpp deleted file mode 100644 index 627d5ad031c8..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_io.cpp +++ /dev/null @@ -1,452 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -#include "atf-c++/io.hpp" -#include "atf-c++/macros.hpp" - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -static -void -systembuf_check_data(std::istream& is, std::size_t length) -{ - char ch = 'A', chr; - std::size_t cnt = 0; - while (is >> chr) { - ATF_CHECK_EQUAL(ch, chr); - if (ch == 'Z') - ch = 'A'; - else - ch++; - cnt++; - } - ATF_CHECK_EQUAL(cnt, length); -} - -static -void -systembuf_write_data(std::ostream& os, std::size_t length) -{ - char ch = 'A'; - for (std::size_t i = 0; i < length; i++) { - os << ch; - if (ch == 'Z') - ch = 'A'; - else - ch++; - } - os.flush(); -} - -static -void -systembuf_test_read(std::size_t length, std::size_t bufsize) -{ - using atf::io::systembuf; - - std::ofstream f("test_read.txt"); - systembuf_write_data(f, length); - f.close(); - - int fd = ::open("test_read.txt", O_RDONLY); - ATF_CHECK(fd != -1); - systembuf sb(fd, bufsize); - std::istream is(&sb); - systembuf_check_data(is, length); - ::close(fd); - ::unlink("test_read.txt"); -} - -static -void -systembuf_test_write(std::size_t length, std::size_t bufsize) -{ - using atf::io::systembuf; - - int fd = ::open("test_write.txt", O_WRONLY | O_CREAT | O_TRUNC, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - ATF_CHECK(fd != -1); - systembuf sb(fd, bufsize); - std::ostream os(&sb); - systembuf_write_data(os, length); - ::close(fd); - - std::ifstream is("test_write.txt"); - systembuf_check_data(is, length); - is.close(); - ::unlink("test_write.txt"); -} - -// ------------------------------------------------------------------------ -// Test cases for the "file_handle" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(file_handle_ctor); -ATF_TEST_CASE_HEAD(file_handle_ctor) -{ - set_md_var("descr", "Tests file_handle's constructors"); -} -ATF_TEST_CASE_BODY(file_handle_ctor) -{ - using atf::io::file_handle; - - file_handle fh1; - ATF_CHECK(!fh1.is_valid()); - - file_handle fh2(STDOUT_FILENO); - ATF_CHECK(fh2.is_valid()); - fh2.disown(); -} - -ATF_TEST_CASE(file_handle_copy); -ATF_TEST_CASE_HEAD(file_handle_copy) -{ - set_md_var("descr", "Tests file_handle's copy constructor"); -} -ATF_TEST_CASE_BODY(file_handle_copy) -{ - using atf::io::file_handle; - - file_handle fh1; - file_handle fh2(STDOUT_FILENO); - - file_handle fh3(fh2); - ATF_CHECK(!fh2.is_valid()); - ATF_CHECK(fh3.is_valid()); - - fh1 = fh3; - ATF_CHECK(!fh3.is_valid()); - ATF_CHECK(fh1.is_valid()); - - fh1.disown(); -} - -ATF_TEST_CASE(file_handle_get); -ATF_TEST_CASE_HEAD(file_handle_get) -{ - set_md_var("descr", "Tests the file_handle::get method"); -} -ATF_TEST_CASE_BODY(file_handle_get) -{ - using atf::io::file_handle; - - file_handle fh1(STDOUT_FILENO); - ATF_CHECK_EQUAL(fh1.get(), STDOUT_FILENO); -} - -ATF_TEST_CASE(file_handle_posix_remap); -ATF_TEST_CASE_HEAD(file_handle_posix_remap) -{ - set_md_var("descr", "Tests the file_handle::posix_remap method"); -} -ATF_TEST_CASE_BODY(file_handle_posix_remap) -{ - using atf::io::file_handle; - - int pfd[2]; - - ATF_CHECK(::pipe(pfd) != -1); - file_handle rend(pfd[0]); - file_handle wend(pfd[1]); - - ATF_CHECK(rend.get() != 10); - ATF_CHECK(wend.get() != 10); - wend.posix_remap(10); - ATF_CHECK_EQUAL(wend.get(), 10); - ATF_CHECK(::write(wend.get(), "test-posix-remap", 16) != -1); - { - char buf[17]; - ATF_CHECK_EQUAL(::read(rend.get(), buf, sizeof(buf)), 16); - buf[16] = '\0'; - ATF_CHECK(std::strcmp(buf, "test-posix-remap") == 0); - } - - // Redo previous to ensure that remapping over the same descriptor - // has no side-effects. - ATF_CHECK_EQUAL(wend.get(), 10); - wend.posix_remap(10); - ATF_CHECK_EQUAL(wend.get(), 10); - ATF_CHECK(::write(wend.get(), "test-posix-remap", 16) != -1); - { - char buf[17]; - ATF_CHECK_EQUAL(::read(rend.get(), buf, sizeof(buf)), 16); - buf[16] = '\0'; - ATF_CHECK(std::strcmp(buf, "test-posix-remap") == 0); - } -} - -// ------------------------------------------------------------------------ -// Test cases for the "systembuf" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(systembuf_short_read); -ATF_TEST_CASE_HEAD(systembuf_short_read) -{ - set_md_var("descr", "Tests that a short read (one that fits in the " - "internal buffer) works when using systembuf"); -} -ATF_TEST_CASE_BODY(systembuf_short_read) -{ - systembuf_test_read(64, 1024); -} - -ATF_TEST_CASE(systembuf_long_read); -ATF_TEST_CASE_HEAD(systembuf_long_read) -{ - set_md_var("descr", "Tests that a long read (one that does not fit in " - "the internal buffer) works when using systembuf"); -} -ATF_TEST_CASE_BODY(systembuf_long_read) -{ - systembuf_test_read(64 * 1024, 1024); -} - -ATF_TEST_CASE(systembuf_short_write); -ATF_TEST_CASE_HEAD(systembuf_short_write) -{ - set_md_var("descr", "Tests that a short write (one that fits in the " - "internal buffer) works when using systembuf"); -} -ATF_TEST_CASE_BODY(systembuf_short_write) -{ - systembuf_test_write(64, 1024); -} - -ATF_TEST_CASE(systembuf_long_write); -ATF_TEST_CASE_HEAD(systembuf_long_write) -{ - set_md_var("descr", "Tests that a long write (one that does not fit " - "in the internal buffer) works when using systembuf"); -} -ATF_TEST_CASE_BODY(systembuf_long_write) -{ - systembuf_test_write(64 * 1024, 1024); -} - -// ------------------------------------------------------------------------ -// Test cases for the "pipe" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(pipe_read_and_write); -ATF_TEST_CASE_HEAD(pipe_read_and_write) -{ - set_md_var("descr", "Tests reading from and writing to a pipe"); -} -ATF_TEST_CASE_BODY(pipe_read_and_write) -{ - using atf::io::pipe; - using atf::io::systembuf; - - pipe p; - systembuf rbuf(p.rend().get()); - systembuf wbuf(p.wend().get()); - std::istream rend(&rbuf); - std::ostream wend(&wbuf); - - // XXX This assumes that the pipe's buffer is big enough to accept - // the data written without blocking! - wend << "1Test 1message" << std::endl; - std::string tmp; - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "1Test"); - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "1message"); -} - -ATF_TEST_CASE(pipe_remap_read); -ATF_TEST_CASE_HEAD(pipe_remap_read) -{ - set_md_var("descr", "Tests the pipe::remap_read method"); -} -ATF_TEST_CASE_BODY(pipe_remap_read) -{ - using atf::io::pipe; - using atf::io::systembuf; - - pipe p; - systembuf wbuf(p.wend().get()); - std::ostream wend(&wbuf); - p.rend().posix_remap(STDIN_FILENO); - - // XXX This assumes that the pipe's buffer is big enough to accept - // the data written without blocking! - wend << "2Test 2message" << std::endl; - std::string tmp; - std::cin >> tmp; - ATF_CHECK_EQUAL(tmp, "2Test"); - std::cin >> tmp; - ATF_CHECK_EQUAL(tmp, "2message"); -} - -ATF_TEST_CASE(pipe_remap_write); -ATF_TEST_CASE_HEAD(pipe_remap_write) -{ - set_md_var("descr", "Tests the pipe::remap_write method"); -} -ATF_TEST_CASE_BODY(pipe_remap_write) -{ - using atf::io::pipe; - using atf::io::systembuf; - - pipe p; - if (p.rend().get() == STDOUT_FILENO) { - if (p.rend().get() > p.wend().get()) - p.rend().posix_remap(p.rend().get() + 1); - else - p.rend().posix_remap(p.wend().get() + 1); - } - systembuf rbuf(p.rend().get()); - std::istream rend(&rbuf); - p.wend().posix_remap(STDOUT_FILENO); - - // XXX This assumes that the pipe's buffer is big enough to accept - // the data written without blocking! - std::cout << "3Test 3message" << std::endl; - std::string tmp; - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "3Test"); - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "3message"); -} - -// ------------------------------------------------------------------------ -// Test cases for the "pistream" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(pistream); -ATF_TEST_CASE_HEAD(pistream) -{ - set_md_var("descr", "Tests the pistream class"); -} -ATF_TEST_CASE_BODY(pistream) -{ - using atf::io::pipe; - using atf::io::pistream; - using atf::io::systembuf; - - pipe p; - int fh = p.rend().get(); - pistream rend(p.rend()); - ATF_CHECK_EQUAL(fh, rend.handle().get()); - systembuf wbuf(p.wend().get()); - std::ostream wend(&wbuf); - - // XXX This assumes that the pipe's buffer is big enough to accept - // the data written without blocking! - wend << "1Test 1message" << std::endl; - std::string tmp; - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "1Test"); - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "1message"); -} - -// ------------------------------------------------------------------------ -// Test cases for the "postream" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(postream); -ATF_TEST_CASE_HEAD(postream) -{ - set_md_var("descr", "Tests the postream class"); -} -ATF_TEST_CASE_BODY(postream) -{ - using atf::io::pipe; - using atf::io::postream; - using atf::io::systembuf; - - pipe p; - int fh = p.wend().get(); - postream wend(p.wend()); - ATF_CHECK_EQUAL(fh, wend.handle().get()); - - // The following block is to ensure that the read end is closed - // before the write one. Otherwise we get a SIGPIPE, at least - // under FreeBSD 6.2. - { - systembuf rbuf(p.rend().get()); - std::istream rend(&rbuf); - - // XXX This assumes that the pipe's buffer is big enough to accept - // the data written without blocking! - wend << "1Test 1message" << std::endl; - std::string tmp; - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "1Test"); - rend >> tmp; - ATF_CHECK_EQUAL(tmp, "1message"); - } -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add the tests for the "file_handle" class. - ATF_ADD_TEST_CASE(tcs, file_handle_ctor); - ATF_ADD_TEST_CASE(tcs, file_handle_copy); - ATF_ADD_TEST_CASE(tcs, file_handle_get); - ATF_ADD_TEST_CASE(tcs, file_handle_posix_remap); - - // Add the tests for the "systembuf" class. - ATF_ADD_TEST_CASE(tcs, systembuf_short_read); - ATF_ADD_TEST_CASE(tcs, systembuf_long_read); - ATF_ADD_TEST_CASE(tcs, systembuf_short_write); - ATF_ADD_TEST_CASE(tcs, systembuf_long_write); - - // Add the tests for the "pipe" class. - ATF_ADD_TEST_CASE(tcs, pipe_read_and_write); - ATF_ADD_TEST_CASE(tcs, pipe_remap_read); - ATF_ADD_TEST_CASE(tcs, pipe_remap_write); - - // Add the tests for the "pistream" class. - ATF_ADD_TEST_CASE(tcs, pistream); - - // Add the tests for the "postream" class. - ATF_ADD_TEST_CASE(tcs, postream); -} diff --git a/dist/atf/tests/atf/atf-c++/t_macros.cpp b/dist/atf/tests/atf/atf-c++/t_macros.cpp deleted file mode 100644 index 26bc608cd55a..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_macros.cpp +++ /dev/null @@ -1,367 +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. -// - -extern "C" { -#include -} - -#include -#include - -#include "atf-c++/fs.hpp" -#include "atf-c++/macros.hpp" -#include "atf-c++/text.hpp" - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -static -void -create_ctl_file(const atf::tests::tc& tc, const char *name) -{ - atf::fs::path p = atf::fs::path(tc.get_config_var("ctldir")) / name; - ATF_CHECK(open(p.c_str(), O_CREAT | O_WRONLY | O_TRUNC, 0644) != -1); -} - -static -atf::tests::vars_map -init_config(void) -{ - atf::tests::vars_map config; - config["ctldir"] = atf::fs::get_current_dir().str(); - return config; -} - -// ------------------------------------------------------------------------ -// Auxiliary test cases. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(h_pass); -ATF_TEST_CASE_HEAD(h_pass) -{ - set_md_var("descr", "Helper test case"); -} -ATF_TEST_CASE_BODY(h_pass) -{ - create_ctl_file(*this, "before"); - ATF_PASS(); - create_ctl_file(*this, "after"); -} - -ATF_TEST_CASE(h_fail); -ATF_TEST_CASE_HEAD(h_fail) -{ - set_md_var("descr", "Helper test case"); -} -ATF_TEST_CASE_BODY(h_fail) -{ - create_ctl_file(*this, "before"); - ATF_FAIL("Failed on purpose"); - create_ctl_file(*this, "after"); -} - -ATF_TEST_CASE(h_skip); -ATF_TEST_CASE_HEAD(h_skip) -{ - set_md_var("descr", "Helper test case"); -} -ATF_TEST_CASE_BODY(h_skip) -{ - create_ctl_file(*this, "before"); - ATF_SKIP("Skipped on purpose"); - create_ctl_file(*this, "after"); -} - -ATF_TEST_CASE(h_check); -ATF_TEST_CASE_HEAD(h_check) -{ - set_md_var("descr", "Helper test case"); -} -ATF_TEST_CASE_BODY(h_check) -{ - bool condition = atf::text::to_bool(get_config_var("condition")); - - create_ctl_file(*this, "before"); - ATF_CHECK(condition); - create_ctl_file(*this, "after"); -} - -ATF_TEST_CASE(h_check_equal); -ATF_TEST_CASE_HEAD(h_check_equal) -{ - set_md_var("descr", "Helper test case"); -} -ATF_TEST_CASE_BODY(h_check_equal) -{ - long v1 = atf::text::to_type< long >(get_config_var("v1")); - long v2 = atf::text::to_type< long >(get_config_var("v2")); - - create_ctl_file(*this, "before"); - ATF_CHECK_EQUAL(v1, v2); - create_ctl_file(*this, "after"); -} - -ATF_TEST_CASE(h_check_throw); -ATF_TEST_CASE_HEAD(h_check_throw) -{ - set_md_var("descr", "Helper test case"); -} -ATF_TEST_CASE_BODY(h_check_throw) -{ - create_ctl_file(*this, "before"); - - if (get_config_var("what") == "throw_int") - ATF_CHECK_THROW(if (1) throw int(5), - std::runtime_error); - else if (get_config_var("what") == "throw_rt") - ATF_CHECK_THROW(if (1) throw std::runtime_error("e"), - std::runtime_error); - else if (get_config_var("what") == "no_throw_rt") - ATF_CHECK_THROW(if (0) throw std::runtime_error("e"), - std::runtime_error); - - create_ctl_file(*this, "after"); -} - -// ------------------------------------------------------------------------ -// Test cases for the macros. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(pass); -ATF_TEST_CASE_HEAD(pass) -{ - set_md_var("descr", "Tests the ATF_PASS macro"); -} -ATF_TEST_CASE_BODY(pass) -{ - ATF_TEST_CASE_NAME(h_pass) tcaux; - tcaux.init(init_config()); - atf::tests::tcr tcr = tcaux.run(atf::fs::get_current_dir()); - - ATF_CHECK(tcr.get_state() == atf::tests::tcr::passed_state); - ATF_CHECK(atf::fs::exists(atf::fs::path("before"))); - ATF_CHECK(!atf::fs::exists(atf::fs::path("after"))); -} - -ATF_TEST_CASE(fail); -ATF_TEST_CASE_HEAD(fail) -{ - set_md_var("descr", "Tests the ATF_FAIL macro"); -} -ATF_TEST_CASE_BODY(fail) -{ - ATF_TEST_CASE_NAME(h_fail) tcaux; - tcaux.init(init_config()); - atf::tests::tcr tcr = tcaux.run(atf::fs::get_current_dir()); - - ATF_CHECK(tcr.get_state() == atf::tests::tcr::failed_state); - ATF_CHECK(tcr.get_reason() == "Failed on purpose"); - ATF_CHECK(atf::fs::exists(atf::fs::path("before"))); - ATF_CHECK(!atf::fs::exists(atf::fs::path("after"))); -} - -ATF_TEST_CASE(skip); -ATF_TEST_CASE_HEAD(skip) -{ - set_md_var("descr", "Tests the ATF_SKIP macro"); -} -ATF_TEST_CASE_BODY(skip) -{ - ATF_TEST_CASE_NAME(h_skip) tcaux; - tcaux.init(init_config()); - atf::tests::tcr tcr = tcaux.run(atf::fs::get_current_dir()); - - ATF_CHECK(tcr.get_state() == atf::tests::tcr::skipped_state); - ATF_CHECK(tcr.get_reason() == "Skipped on purpose"); - ATF_CHECK(atf::fs::exists(atf::fs::path("before"))); - ATF_CHECK(!atf::fs::exists(atf::fs::path("after"))); -} - -ATF_TEST_CASE(check); -ATF_TEST_CASE_HEAD(check) -{ - set_md_var("descr", "Tests the ATF_CHECK macro"); -} -ATF_TEST_CASE_BODY(check) -{ - struct test { - const char *cond; - bool ok; - } *t, tests[] = { - { "false", false }, - { "true", true }, - { NULL, false } - }; - - const atf::fs::path before("before"); - const atf::fs::path after("after"); - - for (t = &tests[0]; t->cond != NULL; t++) { - atf::tests::vars_map config = init_config(); - config["condition"] = t->cond; - - std::cout << "Checking with a " << t->cond << " value" << std::endl; - - ATF_TEST_CASE_NAME(h_check) tcaux; - tcaux.init(config); - atf::tests::tcr tcr = tcaux.run(atf::fs::get_current_dir()); - - ATF_CHECK(atf::fs::exists(before)); - if (t->ok) { - ATF_CHECK(tcr.get_state() == atf::tests::tcr::passed_state); - ATF_CHECK(atf::fs::exists(after)); - } else { - ATF_CHECK(tcr.get_state() == atf::tests::tcr::failed_state); - ATF_CHECK(tcr.get_reason().find("condition not met") != - std::string::npos); - ATF_CHECK(!atf::fs::exists(after)); - } - - atf::fs::remove(before); - if (t->ok) - atf::fs::remove(after); - } -} - -ATF_TEST_CASE(check_equal); -ATF_TEST_CASE_HEAD(check_equal) -{ - set_md_var("descr", "Tests the ATF_CHECK_EQUAL macro"); -} -ATF_TEST_CASE_BODY(check_equal) -{ - struct test { - const char *v1; - const char *v2; - bool ok; - } *t, tests[] = { - { "1", "1", true }, - { "1", "2", false }, - { "2", "1", false }, - { "2", "2", true }, - { NULL, NULL, false } - }; - - const atf::fs::path before("before"); - const atf::fs::path after("after"); - - for (t = &tests[0]; t->v1 != NULL; t++) { - atf::tests::vars_map config = init_config(); - config["v1"] = t->v1; - config["v2"] = t->v2; - - std::cout << "Checking with " << t->v1 << ", " << t->v2 - << " and expecting " << (t->ok ? "true" : "false") - << std::endl; - - ATF_TEST_CASE_NAME(h_check_equal) tcaux; - tcaux.init(config); - atf::tests::tcr tcr = tcaux.run(atf::fs::get_current_dir()); - - ATF_CHECK(atf::fs::exists(before)); - if (t->ok) { - ATF_CHECK(tcr.get_state() == atf::tests::tcr::passed_state); - ATF_CHECK(atf::fs::exists(after)); - } else { - ATF_CHECK(tcr.get_state() == atf::tests::tcr::failed_state); - ATF_CHECK(tcr.get_reason().find("v1 != v2") != - std::string::npos); - ATF_CHECK(!atf::fs::exists(after)); - } - - atf::fs::remove(before); - if (t->ok) - atf::fs::remove(after); - } -} - -ATF_TEST_CASE(check_throw); -ATF_TEST_CASE_HEAD(check_throw) -{ - set_md_var("descr", "Tests the ATF_CHECK_THROW macro"); -} -ATF_TEST_CASE_BODY(check_throw) -{ - struct test { - const char *what; - bool ok; - const char *msg; - } *t, tests[] = { - { "throw_int", false, "unexpected error" }, - { "throw_rt", true, NULL }, - { "no_throw_rt", false, "did not throw" }, - { NULL, false, NULL } - }; - - const atf::fs::path before("before"); - const atf::fs::path after("after"); - - for (t = &tests[0]; t->what != NULL; t++) { - atf::tests::vars_map config = init_config(); - config["what"] = t->what; - - std::cout << "Checking with " << t->what << " and expecting " - << (t->ok ? "true" : "false") << std::endl; - - ATF_TEST_CASE_NAME(h_check_throw) tcaux; - tcaux.init(config); - atf::tests::tcr tcr = tcaux.run(atf::fs::get_current_dir()); - - ATF_CHECK(atf::fs::exists(before)); - if (t->ok) { - ATF_CHECK(tcr.get_state() == atf::tests::tcr::passed_state); - ATF_CHECK(atf::fs::exists(after)); - } else { - ATF_CHECK(tcr.get_state() == atf::tests::tcr::failed_state); - std::cout << "Checking that message contains '" << t->msg - << "'" << std::endl; - ATF_CHECK(tcr.get_reason().find(t->msg) != std::string::npos); - ATF_CHECK(!atf::fs::exists(after)); - } - - atf::fs::remove(before); - if (t->ok) - atf::fs::remove(after); - } -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, pass); - ATF_ADD_TEST_CASE(tcs, fail); - ATF_ADD_TEST_CASE(tcs, skip); - ATF_ADD_TEST_CASE(tcs, check); - ATF_ADD_TEST_CASE(tcs, check_equal); - ATF_ADD_TEST_CASE(tcs, check_throw); -} diff --git a/dist/atf/tests/atf/atf-c++/t_parser.cpp b/dist/atf/tests/atf/atf-c++/t_parser.cpp deleted file mode 100644 index b3a067e89ca6..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_parser.cpp +++ /dev/null @@ -1,704 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/macros.hpp" -#include "atf-c++/parser.hpp" - -// ------------------------------------------------------------------------ -// Tests for the "token" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(token_getters); -ATF_TEST_CASE_HEAD(token_getters) -{ - set_md_var("descr", "Tests the token getters"); -} -ATF_TEST_CASE_BODY(token_getters) -{ - using atf::parser::token; - - { - token t(10, 0); - ATF_CHECK_EQUAL(t.lineno(), 10); - ATF_CHECK_EQUAL(t.type(), 0); - ATF_CHECK(t.text().empty()); - } - - { - token t(10, 0, "foo"); - ATF_CHECK_EQUAL(t.lineno(), 10); - ATF_CHECK_EQUAL(t.type(), 0); - ATF_CHECK_EQUAL(t.text(), "foo"); - } - - { - token t(20, 1); - ATF_CHECK_EQUAL(t.lineno(), 20); - ATF_CHECK_EQUAL(t.type(), 1); - ATF_CHECK(t.text().empty()); - } - - { - token t(20, 1, "bar"); - ATF_CHECK_EQUAL(t.lineno(), 20); - ATF_CHECK_EQUAL(t.type(), 1); - ATF_CHECK_EQUAL(t.text(), "bar"); - } -} - -// ------------------------------------------------------------------------ -// Tests for the "tokenizer" class. -// ------------------------------------------------------------------------ - -#define EXPECT(tkz, ttype, ttext) \ - do { \ - atf::parser::token t = tkz.next(); \ - ATF_CHECK(t.type() == ttype); \ - ATF_CHECK_EQUAL(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; - - class tokenizer : public atf::parser::tokenizer< std::istream > { - public: - tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > - (is, skipws, eof_type, nl_type, word_type) - { - } - }; - -} - -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; - - class tokenizer : public atf::parser::tokenizer< std::istream > { - public: - tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > - (is, skipws, eof_type, nl_type, word_type) - { - add_delim('+', plus_type); - add_delim('-', minus_type); - add_delim('=', equal_type); - } - }; - -} - -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; - - class tokenizer : public atf::parser::tokenizer< std::istream > { - public: - tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > - (is, skipws, eof_type, nl_type, word_type) - { - add_keyword("var", var_type); - add_keyword("loop", loop_type); - add_keyword("endloop", endloop_type); - } - }; - -} - -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; - - class tokenizer : public atf::parser::tokenizer< std::istream > { - public: - tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > - (is, skipws, eof_type, nl_type, word_type) - { - add_quote('"', dblquote_type); - } - }; - -} - -ATF_TEST_CASE(tokenizer_minimal_nows); -ATF_TEST_CASE_HEAD(tokenizer_minimal_nows) -{ - set_md_var("descr", "Tests the tokenizer class using a minimal parser " - "and not skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_minimal_nows) -{ - using namespace minimal; - - { - std::istringstream iss(""); - tokenizer mt(iss, false); - - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("\n"); - tokenizer mt(iss, false); - - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("\n\n\n"); - tokenizer mt(iss, false); - - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "line 1"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1\n"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "line 1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1\nline 2"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "line 1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line 2"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1\nline 2\nline 3\n"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "line 1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line 2"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line 3"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_minimal_ws); -ATF_TEST_CASE_HEAD(tokenizer_minimal_ws) -{ - set_md_var("descr", "Tests the tokenizer class using a minimal parser " - "and skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_minimal_ws) -{ - using namespace minimal; - - { - std::istringstream iss(""); - minimal::tokenizer mt(iss, true); - - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" \t "); - tokenizer mt(iss, true); - - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("\n"); - tokenizer mt(iss, true); - - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" \t \n \t "); - tokenizer mt(iss, true); - - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("\n\n\n"); - tokenizer mt(iss, true); - - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1"); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "1"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" \tline\t 1\t"); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "1"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1\n"); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1\nline 2"); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "2"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("line 1\nline 2\nline 3\n"); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "2"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "3"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" \t line \t 1\n\tline\t2\n line 3 \n"); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "1"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "2"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, word_type, "line"); - EXPECT(mt, word_type, "3"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_delims_nows); -ATF_TEST_CASE_HEAD(tokenizer_delims_nows) -{ - set_md_var("descr", "Tests the tokenizer class using a parser with some " - "additional delimiters and not skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_delims_nows) -{ - using namespace delims; - - { - std::istringstream iss("+-="); - tokenizer mt(iss, false); - - EXPECT(mt, plus_type, "+"); - EXPECT(mt, minus_type, "-"); - EXPECT(mt, equal_type, "="); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("+++"); - tokenizer mt(iss, false); - - EXPECT(mt, plus_type, "+"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("\n+\n++\n"); - tokenizer mt(iss, false); - - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("foo+bar=baz"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "foo"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, word_type, "bar"); - EXPECT(mt, equal_type, "="); - EXPECT(mt, word_type, "baz"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" foo\t+\tbar = baz "); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, " foo\t"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, word_type, "\tbar "); - EXPECT(mt, equal_type, "="); - EXPECT(mt, word_type, " baz "); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_delims_ws); -ATF_TEST_CASE_HEAD(tokenizer_delims_ws) -{ - set_md_var("descr", "Tests the tokenizer class using a parser with some " - "additional delimiters and skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_delims_ws) -{ - using namespace delims; - - { - std::istringstream iss(" foo\t+\tbar = baz "); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "foo"); - EXPECT(mt, plus_type, "+"); - EXPECT(mt, word_type, "bar"); - EXPECT(mt, equal_type, "="); - EXPECT(mt, word_type, "baz"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_keywords_nows); -ATF_TEST_CASE_HEAD(tokenizer_keywords_nows) -{ - set_md_var("descr", "Tests the tokenizer class using a parser with some " - "additional keywords and not skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_keywords_nows) -{ - using namespace keywords; - - { - std::istringstream iss("var"); - tokenizer mt(iss, false); - - EXPECT(mt, var_type, "var"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("va"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "va"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("vara"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "vara"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("var "); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "var "); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("var\nloop\nendloop"); - tokenizer mt(iss, false); - - EXPECT(mt, var_type, "var"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, loop_type, "loop"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, endloop_type, "endloop"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_keywords_ws); -ATF_TEST_CASE_HEAD(tokenizer_keywords_ws) -{ - set_md_var("descr", "Tests the tokenizer class using a parser with some " - "additional keywords and not skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_keywords_ws) -{ - using namespace keywords; - - { - std::istringstream iss("var "); - tokenizer mt(iss, true); - - EXPECT(mt, var_type, "var"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" var \n\tloop\t\n \tendloop \t"); - tokenizer mt(iss, true); - - EXPECT(mt, var_type, "var"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, loop_type, "loop"); - EXPECT(mt, nl_type, "<>"); - EXPECT(mt, endloop_type, "endloop"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("var loop endloop"); - tokenizer mt(iss, true); - - EXPECT(mt, var_type, "var"); - EXPECT(mt, loop_type, "loop"); - EXPECT(mt, endloop_type, "endloop"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_quotes_nows); -ATF_TEST_CASE_HEAD(tokenizer_quotes_nows) -{ - set_md_var("descr", "Tests the tokenizer class using a parser with " - "quoted strings and not skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_quotes_nows) -{ - using namespace quotes; - - { - std::istringstream iss("var"); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "var"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("\"var\""); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "var"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("var1\"var2\""); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "var1"); - EXPECT(mt, word_type, "var2"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss("var1\" var2 \""); - tokenizer mt(iss, false); - - EXPECT(mt, word_type, "var1"); - EXPECT(mt, word_type, " var2 "); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -ATF_TEST_CASE(tokenizer_quotes_ws); -ATF_TEST_CASE_HEAD(tokenizer_quotes_ws) -{ - set_md_var("descr", "Tests the tokenizer class using a parser with " - "quoted strings and skipping whitespace"); -} -ATF_TEST_CASE_BODY(tokenizer_quotes_ws) -{ - using namespace quotes; - - { - std::istringstream iss(" var "); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "var"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" \"var\" "); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "var"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" var1 \"var2\" "); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "var1"); - EXPECT(mt, word_type, "var2"); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } - - { - std::istringstream iss(" var1 \" var2 \" "); - tokenizer mt(iss, true); - - EXPECT(mt, word_type, "var1"); - EXPECT(mt, word_type, " var2 "); - EXPECT(mt, eof_type, "<>"); - EXPECT(mt, eof_type, "<>"); - } -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add test cases for the "token" class. - ATF_ADD_TEST_CASE(tcs, token_getters); - - // Add test cases for the "tokenizer" class. - ATF_ADD_TEST_CASE(tcs, tokenizer_minimal_nows); - ATF_ADD_TEST_CASE(tcs, tokenizer_minimal_ws); - ATF_ADD_TEST_CASE(tcs, tokenizer_delims_nows); - ATF_ADD_TEST_CASE(tcs, tokenizer_delims_ws); - ATF_ADD_TEST_CASE(tcs, tokenizer_keywords_nows); - ATF_ADD_TEST_CASE(tcs, tokenizer_keywords_ws); - ATF_ADD_TEST_CASE(tcs, tokenizer_quotes_nows); - ATF_ADD_TEST_CASE(tcs, tokenizer_quotes_ws); -} diff --git a/dist/atf/tests/atf/atf-c++/t_signals.cpp b/dist/atf/tests/atf/atf-c++/t_signals.cpp deleted file mode 100644 index 0a39e4d47e55..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_signals.cpp +++ /dev/null @@ -1,225 +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. -// - -extern "C" { -#include -#include -#include -} - -#include - -#include "atf-c++/exceptions.hpp" -#include "atf-c++/macros.hpp" -#include "atf-c++/signals.hpp" - -namespace sigusr1 { - static bool happened = false; - - static - void - handler(int signo) - { - happened = true; - } - - static - void - program(void) - { - struct sigaction sa; - sa.sa_handler = handler; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - if (::sigaction(SIGUSR1, &sa, NULL) == -1) - throw atf::system_error("sigusr1::program", - "sigaction(2) failed", errno); - } -} // namespace sigusr1 - -namespace sigusr1_2 { - static bool happened = false; - - static - void - handler(int signo) - { - happened = true; - } -} // namespace sigusr1_2 - -// ------------------------------------------------------------------------ -// Tests for the "signal_holder" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(signal_holder_preserve); -ATF_TEST_CASE_HEAD(signal_holder_preserve) -{ - set_md_var("descr", "Tests that signal_holder preserves the original " - "signal handler and restores it upon destruction"); -} -ATF_TEST_CASE_BODY(signal_holder_preserve) -{ - using atf::signals::signal_holder; - - sigusr1::program(); - - sigusr1::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1::happened); - - { - signal_holder hld(SIGUSR1); - ::kill(::getpid(), SIGUSR1); - } - - sigusr1::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1::happened); -} - -ATF_TEST_CASE(signal_holder_destructor); -ATF_TEST_CASE_HEAD(signal_holder_destructor) -{ - set_md_var("descr", "Tests that signal_holder processes a pending " - "signal upon destruction"); -} -ATF_TEST_CASE_BODY(signal_holder_destructor) -{ - using atf::signals::signal_holder; - - sigusr1::program(); - - sigusr1::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1::happened); - - { - signal_holder hld(SIGUSR1); - - sigusr1::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(!sigusr1::happened); - } - ATF_CHECK(sigusr1::happened); -} - -ATF_TEST_CASE(signal_holder_process); -ATF_TEST_CASE_HEAD(signal_holder_process) -{ - set_md_var("descr", "Tests that signal_holder's process method works " - "to process a delayed signal explicitly"); -} -ATF_TEST_CASE_BODY(signal_holder_process) -{ - using atf::signals::signal_holder; - - sigusr1::program(); - - sigusr1::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1::happened); - - { - signal_holder hld(SIGUSR1); - - sigusr1::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(!sigusr1::happened); - - hld.process(); - ATF_CHECK(sigusr1::happened); - - sigusr1::happened = false; - } - ATF_CHECK(!sigusr1::happened); -} - -// ------------------------------------------------------------------------ -// Tests for the "signal_programmer" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(signal_programmer_program); -ATF_TEST_CASE_HEAD(signal_programmer_program) -{ - set_md_var("descr", "Tests that signal_programmer correctly installs a " - "handler"); -} -ATF_TEST_CASE_BODY(signal_programmer_program) -{ - using atf::signals::signal_programmer; - - signal_programmer sp(SIGUSR1, sigusr1_2::handler); - - sigusr1_2::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1_2::happened); -} - -ATF_TEST_CASE(signal_programmer_preserve); -ATF_TEST_CASE_HEAD(signal_programmer_preserve) -{ - set_md_var("descr", "Tests that signal_programmer uninstalls the " - "handler during destruction"); -} -ATF_TEST_CASE_BODY(signal_programmer_preserve) -{ - using atf::signals::signal_programmer; - - sigusr1::program(); - sigusr1::happened = false; - - { - signal_programmer sp(SIGUSR1, sigusr1_2::handler); - - sigusr1_2::happened = false; - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1_2::happened); - } - - ATF_CHECK(!sigusr1::happened); - ::kill(::getpid(), SIGUSR1); - ATF_CHECK(sigusr1::happened); -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add the tests for the "signal_holder" class. - ATF_ADD_TEST_CASE(tcs, signal_holder_preserve); - ATF_ADD_TEST_CASE(tcs, signal_holder_destructor); - ATF_ADD_TEST_CASE(tcs, signal_holder_process); - - // Add the tests for the "signal_programmer" class. - ATF_ADD_TEST_CASE(tcs, signal_programmer_program); - ATF_ADD_TEST_CASE(tcs, signal_programmer_preserve); -} diff --git a/dist/atf/tests/atf/atf-c++/t_tests.cpp b/dist/atf/tests/atf/atf-c++/t_tests.cpp deleted file mode 100644 index c9fbb47d0482..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_tests.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -// ------------------------------------------------------------------------ -// Tests for the "tcr" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(tcr_ctor_wo_reason); -ATF_TEST_CASE_HEAD(tcr_ctor_wo_reason) -{ - set_md_var("descr", "Tests that the passed pseudo-constructor works."); -} -ATF_TEST_CASE_BODY(tcr_ctor_wo_reason) -{ - using atf::tests::tcr; - - tcr tcr(tcr::passed_state); - ATF_CHECK(tcr.get_state() == tcr::passed_state); -} - -ATF_TEST_CASE(tcr_ctor_w_reason); -ATF_TEST_CASE_HEAD(tcr_ctor_w_reason) -{ - set_md_var("descr", "Tests that the skipped pseudo-constructor works."); -} -ATF_TEST_CASE_BODY(tcr_ctor_w_reason) -{ - using atf::tests::tcr; - - { - tcr t(tcr::skipped_state, "Reason 1"); - ATF_CHECK(t.get_state() == tcr::skipped_state); - ATF_CHECK_EQUAL(t.get_reason(), "Reason 1"); - } - - { - tcr t(tcr::skipped_state, "Reason 2"); - ATF_CHECK(t.get_state() == tcr::skipped_state); - ATF_CHECK_EQUAL(t.get_reason(), "Reason 2"); - } - - { - tcr t(tcr::failed_state, "Reason 1"); - ATF_CHECK(t.get_state() == tcr::failed_state); - ATF_CHECK_EQUAL(t.get_reason(), "Reason 1"); - } - - { - tcr t(tcr::failed_state, "Reason 2"); - ATF_CHECK(t.get_state() == tcr::failed_state); - ATF_CHECK_EQUAL(t.get_reason(), "Reason 2"); - } -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add tests for the "tcr" class. - ATF_ADD_TEST_CASE(tcs, tcr_ctor_wo_reason); - ATF_ADD_TEST_CASE(tcs, tcr_ctor_w_reason); -} diff --git a/dist/atf/tests/atf/atf-c++/t_text.cpp b/dist/atf/tests/atf/atf-c++/t_text.cpp deleted file mode 100644 index 6939de291059..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_text.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/macros.hpp" -#include "atf-c++/text.hpp" - -ATF_TEST_CASE(join); -ATF_TEST_CASE_HEAD(join) -{ - set_md_var("descr", "Tests the join function"); -} -ATF_TEST_CASE_BODY(join) -{ - using atf::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_CHECK_EQUAL(str, ""); - - words.clear(); - words.push_back(""); - str = join(words, ","); - ATF_CHECK_EQUAL(str, ""); - - words.clear(); - words.push_back(""); - words.push_back(""); - str = join(words, ","); - ATF_CHECK_EQUAL(str, ","); - - words.clear(); - words.push_back("foo"); - words.push_back(""); - words.push_back("baz"); - str = join(words, ","); - ATF_CHECK_EQUAL(str, "foo,,baz"); - - words.clear(); - words.push_back("foo"); - words.push_back("bar"); - words.push_back("baz"); - str = join(words, ","); - ATF_CHECK_EQUAL(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_CHECK_EQUAL(str, ""); - - words.clear(); - words.insert(""); - str = join(words, ","); - ATF_CHECK_EQUAL(str, ""); - - words.clear(); - words.insert("foo"); - words.insert(""); - words.insert("baz"); - str = join(words, ","); - ATF_CHECK_EQUAL(str, ",baz,foo"); - - words.clear(); - words.insert("foo"); - words.insert("bar"); - words.insert("baz"); - str = join(words, ","); - ATF_CHECK_EQUAL(str, "bar,baz,foo"); - } -} - -ATF_TEST_CASE(split); -ATF_TEST_CASE_HEAD(split) -{ - set_md_var("descr", "Tests the split function"); -} -ATF_TEST_CASE_BODY(split) -{ - using atf::text::split; - - std::vector< std::string > words; - - words = split("", " "); - ATF_CHECK_EQUAL(words.size(), 0); - - words = split(" ", " "); - ATF_CHECK_EQUAL(words.size(), 0); - - words = split(" ", " "); - ATF_CHECK_EQUAL(words.size(), 0); - - words = split("a b", " "); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "a"); - ATF_CHECK_EQUAL(words[1], "b"); - - words = split("a b c d", " "); - ATF_CHECK_EQUAL(words.size(), 4); - ATF_CHECK_EQUAL(words[0], "a"); - ATF_CHECK_EQUAL(words[1], "b"); - ATF_CHECK_EQUAL(words[2], "c"); - ATF_CHECK_EQUAL(words[3], "d"); - - words = split("foo bar", " "); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "foo"); - ATF_CHECK_EQUAL(words[1], "bar"); - - words = split("foo bar baz foobar", " "); - ATF_CHECK_EQUAL(words.size(), 4); - ATF_CHECK_EQUAL(words[0], "foo"); - ATF_CHECK_EQUAL(words[1], "bar"); - ATF_CHECK_EQUAL(words[2], "baz"); - ATF_CHECK_EQUAL(words[3], "foobar"); - - words = split(" foo bar", " "); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "foo"); - ATF_CHECK_EQUAL(words[1], "bar"); - - words = split("foo bar", " "); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "foo"); - ATF_CHECK_EQUAL(words[1], "bar"); - - words = split("foo bar ", " "); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "foo"); - ATF_CHECK_EQUAL(words[1], "bar"); - - words = split(" foo bar ", " "); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "foo"); - ATF_CHECK_EQUAL(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 atf::text::split; - - std::vector< std::string > words; - - words = split("", "/"); - ATF_CHECK_EQUAL(words.size(), 0); - - words = split(" ", "/"); - ATF_CHECK_EQUAL(words.size(), 1); - ATF_CHECK_EQUAL(words[0], " "); - - words = split(" ", "/"); - ATF_CHECK_EQUAL(words.size(), 1); - ATF_CHECK_EQUAL(words[0], " "); - - words = split("a/b", "/"); - ATF_CHECK_EQUAL(words.size(), 2); - ATF_CHECK_EQUAL(words[0], "a"); - ATF_CHECK_EQUAL(words[1], "b"); - - words = split("aLONGDELIMbcdLONGDELIMef", "LONGDELIM"); - ATF_CHECK_EQUAL(words.size(), 3); - ATF_CHECK_EQUAL(words[0], "a"); - ATF_CHECK_EQUAL(words[1], "bcd"); - ATF_CHECK_EQUAL(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 atf::text::trim; - - ATF_CHECK_EQUAL(trim(""), ""); - ATF_CHECK_EQUAL(trim(" "), ""); - ATF_CHECK_EQUAL(trim("\t"), ""); - - ATF_CHECK_EQUAL(trim(" foo"), "foo"); - ATF_CHECK_EQUAL(trim("\t foo"), "foo"); - ATF_CHECK_EQUAL(trim(" \tfoo"), "foo"); - ATF_CHECK_EQUAL(trim("foo\t "), "foo"); - ATF_CHECK_EQUAL(trim("foo \t"), "foo"); - - ATF_CHECK_EQUAL(trim("foo bar"), "foo bar"); - ATF_CHECK_EQUAL(trim("\t foo bar"), "foo bar"); - ATF_CHECK_EQUAL(trim(" \tfoo bar"), "foo bar"); - ATF_CHECK_EQUAL(trim("foo bar\t "), "foo bar"); - ATF_CHECK_EQUAL(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 atf::text::to_bool; - - ATF_CHECK(to_bool("true")); - ATF_CHECK(to_bool("TRUE")); - ATF_CHECK(to_bool("yes")); - ATF_CHECK(to_bool("YES")); - - ATF_CHECK(!to_bool("false")); - ATF_CHECK(!to_bool("FALSE")); - ATF_CHECK(!to_bool("no")); - ATF_CHECK(!to_bool("NO")); - - ATF_CHECK_THROW(to_bool(""), std::runtime_error); - ATF_CHECK_THROW(to_bool("tru"), std::runtime_error); - ATF_CHECK_THROW(to_bool("true2"), std::runtime_error); - ATF_CHECK_THROW(to_bool("fals"), std::runtime_error); - ATF_CHECK_THROW(to_bool("false2"), std::runtime_error); -} - -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 atf::text::to_string; - - ATF_CHECK_EQUAL(to_string('a'), "a"); - ATF_CHECK_EQUAL(to_string("a"), "a"); - ATF_CHECK_EQUAL(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 atf::text::to_type; - - ATF_CHECK_EQUAL(to_type< int >("0"), 0); - ATF_CHECK_EQUAL(to_type< int >("1234"), 1234); - ATF_CHECK_THROW(to_type< int >("0 a"), std::runtime_error); - ATF_CHECK_THROW(to_type< int >("a"), std::runtime_error); - - ATF_CHECK_EQUAL(to_type< float >("0.5"), 0.5); - ATF_CHECK_EQUAL(to_type< float >("1234.5"), 1234.5); - ATF_CHECK_THROW(to_type< float >("0.5 a"), std::runtime_error); - ATF_CHECK_THROW(to_type< float >("a"), std::runtime_error); - - ATF_CHECK_EQUAL(to_type< std::string >("a"), "a"); -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, join); - 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_string); - ATF_ADD_TEST_CASE(tcs, to_type); -} diff --git a/dist/atf/tests/atf/atf-c++/t_user.cpp b/dist/atf/tests/atf/atf-c++/t_user.cpp deleted file mode 100644 index b1af720ff077..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_user.cpp +++ /dev/null @@ -1,141 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/exceptions.hpp" -#include "atf-c++/macros.hpp" -#include "atf-c++/user.hpp" - -// ------------------------------------------------------------------------ -// Test cases for the free functions. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(euid); -ATF_TEST_CASE_HEAD(euid) -{ - set_md_var("descr", "Tests the euid function"); -} -ATF_TEST_CASE_BODY(euid) -{ - using atf::user::euid; - - ATF_CHECK_EQUAL(euid(), ::geteuid()); -} - -ATF_TEST_CASE(is_member_of_group); -ATF_TEST_CASE_HEAD(is_member_of_group) -{ - set_md_var("descr", "Tests the is_member_of_group function"); -} -ATF_TEST_CASE_BODY(is_member_of_group) -{ - using atf::user::is_member_of_group; - - std::set< gid_t > groups; - gid_t maxgid = 0; - { - gid_t gids[NGROUPS_MAX]; - int ngids = ::getgroups(NGROUPS_MAX, gids); - if (ngids == -1) - ATF_FAIL("Call to ::getgroups failed"); - for (int i = 0; i < ngids; i++) { - groups.insert(gids[i]); - if (gids[i] > maxgid) - maxgid = gids[i]; - } - std::cout << "User belongs to " << ngids << " groups" << std::endl; - std::cout << "Last GID is " << maxgid << std::endl; - } - - for (gid_t g = 0; g <= maxgid; g++) { - if (groups.find(g) == groups.end()) { - std::cout << "Checking if user does not belong to group " - << g << std::endl; - ATF_CHECK(!is_member_of_group(g)); - } else { - std::cout << "Checking if user belongs to group " - << g << std::endl; - ATF_CHECK(is_member_of_group(g)); - } - } -} - -ATF_TEST_CASE(is_root); -ATF_TEST_CASE_HEAD(is_root) -{ - set_md_var("descr", "Tests the is_root function"); -} -ATF_TEST_CASE_BODY(is_root) -{ - using atf::user::is_root; - - if (::geteuid() == 0) { - ATF_CHECK(is_root()); - } else { - ATF_CHECK(!is_root()); - } -} - -ATF_TEST_CASE(is_unprivileged); -ATF_TEST_CASE_HEAD(is_unprivileged) -{ - set_md_var("descr", "Tests the is_unprivileged function"); -} -ATF_TEST_CASE_BODY(is_unprivileged) -{ - using atf::user::is_unprivileged; - - if (::geteuid() != 0) { - ATF_CHECK(is_unprivileged()); - } else { - ATF_CHECK(!is_unprivileged()); - } -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add the tests for the free functions. - ATF_ADD_TEST_CASE(tcs, euid); - ATF_ADD_TEST_CASE(tcs, is_member_of_group); - ATF_ADD_TEST_CASE(tcs, is_root); - ATF_ADD_TEST_CASE(tcs, is_unprivileged); -} diff --git a/dist/atf/tests/atf/atf-c++/t_utils.cpp b/dist/atf/tests/atf/atf-c++/t_utils.cpp deleted file mode 100644 index 4465bdaa0ff0..000000000000 --- a/dist/atf/tests/atf/atf-c++/t_utils.cpp +++ /dev/null @@ -1,238 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/macros.hpp" -#include "atf-c++/utils.hpp" - -// ------------------------------------------------------------------------ -// Tests for the "auto_array" class. -// ------------------------------------------------------------------------ - -class test_array { -public: - int m_value; - - static ssize_t m_nblocks; - - void* operator new(size_t size) - { - 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 << std::endl; - return mem; - } - - void operator delete(void* mem) - { - ATF_FAIL("Delete called but should have been delete[]"); - } - - void operator delete[](void* mem) - { - std::cout << "Releasing 'test_array' object " << mem << std::endl; - 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 atf::utils::auto_array; - - ATF_CHECK_EQUAL(test_array::m_nblocks, 0); - { - auto_array< test_array > t(new test_array[10]); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - } - ATF_CHECK_EQUAL(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 atf::utils::auto_array; - - ATF_CHECK_EQUAL(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2(t1); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - } - ATF_CHECK_EQUAL(test_array::m_nblocks, 0); - } - ATF_CHECK_EQUAL(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 atf::utils::auto_array; - - test_array* ta = new test_array[10]; - auto_array< test_array > t(ta); - ATF_CHECK_EQUAL(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 atf::utils::auto_array; - - test_array* ta1 = new test_array[10]; - { - auto_array< test_array > t(ta1); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - test_array* ta2 = t.release(); - ATF_CHECK_EQUAL(ta2, ta1); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - } - ATF_CHECK_EQUAL(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 atf::utils::auto_array; - - test_array* ta1 = new test_array[10]; - test_array* ta2 = new test_array[10]; - ATF_CHECK_EQUAL(test_array::m_nblocks, 2); - - { - auto_array< test_array > t(ta1); - ATF_CHECK_EQUAL(test_array::m_nblocks, 2); - t.reset(ta2); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - t.reset(); - ATF_CHECK_EQUAL(test_array::m_nblocks, 0); - } - ATF_CHECK_EQUAL(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 atf::utils::auto_array; - - ATF_CHECK_EQUAL(test_array::m_nblocks, 0); - { - auto_array< test_array > t1(new test_array[10]); - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - - { - auto_array< test_array > t2; - t2 = t1; - ATF_CHECK_EQUAL(test_array::m_nblocks, 1); - } - ATF_CHECK_EQUAL(test_array::m_nblocks, 0); - } - ATF_CHECK_EQUAL(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 atf::utils::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_CHECK_EQUAL(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_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_access); -} diff --git a/dist/atf/tests/atf/atf-c/Atffile b/dist/atf/tests/atf/atf-c/Atffile deleted file mode 100644 index 135e08073363..000000000000 --- a/dist/atf/tests/atf/atf-c/Atffile +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: t_* diff --git a/dist/atf/tests/atf/atf-c/t_config.c b/dist/atf/tests/atf/atf-c/t_config.c deleted file mode 100644 index 8013bf6f313a..000000000000 --- a/dist/atf/tests/atf/atf-c/t_config.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 "atf-c/config.h" -#include "atf-c/env.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -void __atf_config_reinit(void); - -/* --------------------------------------------------------------------- - * 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) -{ - /* Unset all known environment variables and make sure the built-in - * values do not match the bogus value we will use for testing. */ - CE(atf_env_unset("ATF_ARCH")); - CE(atf_env_unset("ATF_CONFDIR")); - CE(atf_env_unset("ATF_LIBEXECDIR")); - CE(atf_env_unset("ATF_MACHINE")); - CE(atf_env_unset("ATF_PKGDATADIR")); - CE(atf_env_unset("ATF_SHELL")); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(atf_config_get("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_workdir"), "env-value") != 0); - - /* Make sure empty values in the environment are not considered. */ - atf_env_set("ATF_ARCH", ""); - atf_env_set("ATF_CONFDIR", ""); - atf_env_set("ATF_LIBEXECDIR", ""); - atf_env_set("ATF_MACHINE", ""); - atf_env_set("ATF_PKGDATADIR", ""); - atf_env_set("ATF_SHELL", ""); - atf_env_set("ATF_WORKDIR", ""); - __atf_config_reinit(); - ATF_CHECK(strlen(atf_config_get("atf_arch")) > 0); - ATF_CHECK(strlen(atf_config_get("atf_confdir")) > 0); - ATF_CHECK(strlen(atf_config_get("atf_libexecdir")) > 0); - ATF_CHECK(strlen(atf_config_get("atf_machine")) > 0); - ATF_CHECK(strlen(atf_config_get("atf_pkgdatadir")) > 0); - ATF_CHECK(strlen(atf_config_get("atf_shell")) > 0); - ATF_CHECK(strlen(atf_config_get("atf_workdir")) > 0); - - /* Check if the ATF_ARCH variable is recognized. */ - atf_env_set ("ATF_ARCH", "env-value"); - CE(atf_env_unset("ATF_LIBEXECDIR")); - CE(atf_env_unset("ATF_MACHINE")); - CE(atf_env_unset("ATF_PKGDATADIR")); - CE(atf_env_unset("ATF_SHELL")); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(atf_config_get("atf_arch"), "env-value") == 0); - ATF_CHECK(strcmp(atf_config_get("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_workdir"), "env-value") != 0); - - /* Check if the ATF_CONFDIR variable is recognized. */ - CE(atf_env_unset("ATF_ARCH")); - atf_env_set ("ATF_CONFDIR", "env-value"); - CE(atf_env_unset("ATF_LIBEXECDIR")); - CE(atf_env_unset("ATF_MACHINE")); - CE(atf_env_unset("ATF_PKGDATADIR")); - CE(atf_env_unset("ATF_SHELL")); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_confdir"), "env-value") == 0); - ATF_CHECK(strcmp(("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_workdir"), "env-value") != 0); - - /* Check if the ATF_LIBEXECDIR variable is recognized. */ - CE(atf_env_unset("ATF_ARCH")); - CE(atf_env_unset("ATF_CONFDIR")); - atf_env_set ("ATF_LIBEXECDIR", "env-value"); - CE(atf_env_unset("ATF_MACHINE")); - CE(atf_env_unset("ATF_PKGDATADIR")); - CE(atf_env_unset("ATF_SHELL")); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_libexecdir"), "env-value") == 0); - ATF_CHECK(strcmp(("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_workdir"), "env-value") != 0); - - /* Check if the ATF_MACHINE variable is recognized. */ - CE(atf_env_unset("ATF_ARCH")); - CE(atf_env_unset("ATF_CONFDIR")); - CE(atf_env_unset("ATF_LIBEXECDIR")); - atf_env_set ("ATF_MACHINE", "env-value"); - CE(atf_env_unset("ATF_PKGDATADIR")); - CE(atf_env_unset("ATF_SHELL")); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_machine"), "env-value") == 0); - ATF_CHECK(strcmp(("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_workdir"), "env-value") != 0); - - /* Check if the ATF_PKGDATADIR variable is recognized. */ - CE(atf_env_unset("ATF_ARCH")); - CE(atf_env_unset("ATF_CONFDIR")); - CE(atf_env_unset("ATF_LIBEXECDIR")); - CE(atf_env_unset("ATF_MACHINE")); - atf_env_set ("ATF_PKGDATADIR", "env-value"); - CE(atf_env_unset("ATF_SHELL")); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_pkgdatadir"), "env-value") == 0); - ATF_CHECK(strcmp(("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_workdir"), "env-value") != 0); - - /* Check if the ATF_SHELL variable is recognized. */ - CE(atf_env_unset("ATF_ARCH")); - CE(atf_env_unset("ATF_CONFDIR")); - CE(atf_env_unset("ATF_LIBEXECDIR")); - CE(atf_env_unset("ATF_MACHINE")); - CE(atf_env_unset("ATF_PKGDATADIR")); - atf_env_set ("ATF_SHELL", "env-value"); - CE(atf_env_unset("ATF_WORKDIR")); - __atf_config_reinit(); - ATF_CHECK(strcmp(("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_shell"), "env-value") == 0); - ATF_CHECK(strcmp(("atf_workdir"), "env-value") != 0); - - /* Check if the ATF_WORKDIR variable is recognized. */ - CE(atf_env_unset("ATF_ARCH")); - CE(atf_env_unset("ATF_CONFDIR")); - CE(atf_env_unset("ATF_LIBEXECDIR")); - CE(atf_env_unset("ATF_MACHINE")); - CE(atf_env_unset("ATF_PKGDATADIR")); - CE(atf_env_unset("ATF_SHELL")); - atf_env_set ("ATF_WORKDIR", "env-value"); - __atf_config_reinit(); - ATF_CHECK(strcmp(("atf_arch"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_confdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_libexecdir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_machine"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_pkgdatadir"), "env-value") != 0); - ATF_CHECK(strcmp(("atf_shell"), "env-value") != 0); - ATF_CHECK(strcmp(atf_config_get("atf_workdir"), "env-value") == 0); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, get); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_dynstr.c b/dist/atf/tests/atf/atf-c/t_dynstr.c deleted file mode 100644 index fad1b02adc8f..000000000000 --- a/dist/atf/tests/atf/atf-c/t_dynstr.c +++ /dev/null @@ -1,626 +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 - -#include "atf-c/dynstr.h" - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Tests for the "atf_dynstr" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors and destructors. - */ - -ATF_TC(init); -ATF_TC_HEAD(init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the empty constructor"); -} -ATF_TC_BODY(init, tc) -{ - atf_dynstr_t str; - - CE(atf_dynstr_init(&str)); - ATF_CHECK_EQUAL(atf_dynstr_length(&str), 0); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "") == 0); - atf_dynstr_fini(&str); -} - -static -void -init_fmt(atf_dynstr_t *str, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - CE(atf_dynstr_init_ap(str, fmt, ap)); - va_end(ap); -} - -ATF_TC(init_ap); -ATF_TC_HEAD(init_ap, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the formatted constructor using " - "a va_list argument"); -} -ATF_TC_BODY(init_ap, tc) -{ - atf_dynstr_t str; - - init_fmt(&str, "String 1"); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 1") == 0); - atf_dynstr_fini(&str); - - init_fmt(&str, "String %d", 2); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 2") == 0); - atf_dynstr_fini(&str); - - init_fmt(&str, "%s %d", "String", 3); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 3") == 0); - atf_dynstr_fini(&str); - - init_fmt(&str, "%s%s%s%s%s%s%s", "This ", "should ", "be ", "a ", - "large ", "string ", "aaaabbbbccccdddd"); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), - "This should be a large string " - "aaaabbbbccccdddd") == 0); - atf_dynstr_fini(&str); -} - -ATF_TC(init_fmt); -ATF_TC_HEAD(init_fmt, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the formatted constructor using " - "a variable list of parameters"); -} -ATF_TC_BODY(init_fmt, tc) -{ - atf_dynstr_t str; - - CE(atf_dynstr_init_fmt(&str, "String 1")); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 1") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_fmt(&str, "String %d", 2)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 2") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_fmt(&str, "%s %d", "String", 3)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 3") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_fmt(&str, "%s%s%s%s%s%s%s", "This ", "should ", - "be ", "a ", "large ", "string ", - "aaaabbbbccccdddd")); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), - "This should be a large string " - "aaaabbbbccccdddd") == 0); - atf_dynstr_fini(&str); -} - -ATF_TC(init_raw); -ATF_TC_HEAD(init_raw, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of a string " - "using a raw memory pointer"); -} -ATF_TC_BODY(init_raw, tc) -{ - const char *src = "String 1, String 2"; - atf_dynstr_t str; - - CE(atf_dynstr_init_raw(&str, src, 0)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_raw(&str, src, 8)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 1") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_raw(&str, src + 10, 8)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String 2") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_raw(&str, "String\0Lost", 11)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "String") == 0); - atf_dynstr_fini(&str); -} - -ATF_TC(init_rep); -ATF_TC_HEAD(init_rep, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of a string by " - "repeating characters"); -} -ATF_TC_BODY(init_rep, tc) -{ - const size_t maxlen = 8192; - char buf[maxlen + 1]; - size_t i; - - buf[0] = '\0'; - - for (i = 0; i < maxlen; i++) { - atf_dynstr_t str; - - CE(atf_dynstr_init_rep(&str, i, 'a')); - - if (strcmp(atf_dynstr_cstring(&str), buf) != 0) { - fprintf(stderr, "Failed at iteration %zd\n", i); - atf_tc_fail("Failed to construct dynstr by repeating %d " - "times the '%c' character", i, 'a'); - } - - atf_dynstr_fini(&str); - - strcat(buf, "a"); - } - - { - atf_dynstr_t str; - atf_error_t err; - - err = atf_dynstr_init_rep(&str, SIZE_MAX, 'a'); - ATF_CHECK(atf_is_error(err)); - ATF_CHECK(atf_error_is(err, "no_memory")); - - err = atf_dynstr_init_rep(&str, SIZE_MAX - 1, 'a'); - ATF_CHECK(atf_is_error(err)); - ATF_CHECK(atf_error_is(err, "no_memory")); - } -} - -ATF_TC(init_substr); -ATF_TC_HEAD(init_substr, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of a string " - "using a substring of another one"); -} -ATF_TC_BODY(init_substr, tc) -{ - atf_dynstr_t src; - atf_dynstr_t str; - - CE(atf_dynstr_init_fmt(&src, "Str 1, Str 2")); - - CE(atf_dynstr_init_substr(&str, &src, 0, 0)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_substr(&str, &src, 0, atf_dynstr_npos)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "Str 1, Str 2") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_substr(&str, &src, 0, 100)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "Str 1, Str 2") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_substr(&str, &src, 0, 5)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "Str 1") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_substr(&str, &src, 100, atf_dynstr_npos)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_substr(&str, &src, 7, atf_dynstr_npos)); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "Str 2") == 0); - atf_dynstr_fini(&str); -} - -ATF_TC(copy); -ATF_TC_HEAD(copy, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_dynstr_copy constructor"); -} -ATF_TC_BODY(copy, tc) -{ - atf_dynstr_t str, str2; - - CE(atf_dynstr_init_fmt(&str, "Test string")); - CE(atf_dynstr_copy(&str2, &str)); - - ATF_CHECK(atf_equal_dynstr_dynstr(&str, &str2)); - - CE(atf_dynstr_append_fmt(&str2, " non-shared text")); - - ATF_CHECK(!atf_equal_dynstr_dynstr(&str, &str2)); - - atf_dynstr_fini(&str2); - atf_dynstr_fini(&str); -} - -ATF_TC(fini_disown); -ATF_TC_HEAD(fini_disown, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks grabbing ownership of the " - "internal plain C string"); -} -ATF_TC_BODY(fini_disown, tc) -{ - const char *cstr; - char *cstr2; - atf_dynstr_t str; - - CE(atf_dynstr_init_fmt(&str, "Test string 1")); - cstr = atf_dynstr_cstring(&str); - cstr2 = atf_dynstr_fini_disown(&str); - - ATF_CHECK_EQUAL(cstr, cstr2); - free(cstr2); -} - -/* - * Getters. - */ - -ATF_TC(cstring); -ATF_TC_HEAD(cstring, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the method to obtain a plain C " - "string"); -} -ATF_TC_BODY(cstring, tc) -{ - const char *cstr; - atf_dynstr_t str; - - CE(atf_dynstr_init_fmt(&str, "Test string 1")); - cstr = atf_dynstr_cstring(&str); - ATF_CHECK(cstr != NULL); - ATF_CHECK(strcmp(cstr, "Test string 1") == 0); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_fmt(&str, "Test string 2")); - cstr = atf_dynstr_cstring(&str); - ATF_CHECK(cstr != NULL); - ATF_CHECK(strcmp(cstr, "Test string 2") == 0); - atf_dynstr_fini(&str); -} - -ATF_TC(length); -ATF_TC_HEAD(length, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the method to obtain the length"); -} -ATF_TC_BODY(length, tc) -{ - size_t i; - - for (i = 0; i < 8192; i++) { - atf_dynstr_t str; - CE(atf_dynstr_init_rep(&str, i, 'a')); - ATF_CHECK_EQUAL(atf_dynstr_length(&str), i); - atf_dynstr_fini(&str); - } -} - -ATF_TC(rfind_ch); -ATF_TC_HEAD(rfind_ch, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the method to locate the first " - "occurrence of a character starting from the end"); -} -ATF_TC_BODY(rfind_ch, tc) -{ - atf_dynstr_t str; - - CE(atf_dynstr_init_fmt(&str, "Foo1/Bar2/,.Baz")); - - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, '\0'), atf_dynstr_npos); - - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, '0'), atf_dynstr_npos); - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, 'b'), atf_dynstr_npos); - - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, 'F'), 0); - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, '/'), 9); - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, 'a'), 13); - ATF_CHECK_EQUAL(atf_dynstr_rfind_ch(&str, 'z'), 14); - - atf_dynstr_fini(&str); -} - -/* - * Modifiers. - */ - -static -void -check_append(atf_error_t (*append)(atf_dynstr_t *, const char *, ...)) -{ - const size_t maxlen = 8192; - char buf[maxlen + 1]; - size_t i; - atf_dynstr_t str; - - printf("Appending with plain string\n"); - buf[0] = '\0'; - CE(atf_dynstr_init(&str)); - for (i = 0; i < maxlen; i++) { - if (strcmp(atf_dynstr_cstring(&str), buf) != 0) { - fprintf(stderr, "Failed at iteration %zd\n", i); - atf_tc_fail("Failed to append character at iteration %d", i); - } - - CE(append(&str, "a")); - strcat(buf, "a"); - } - atf_dynstr_fini(&str); - - printf("Appending with formatted string\n"); - buf[0] = '\0'; - CE(atf_dynstr_init(&str)); - for (i = 0; i < maxlen; i++) { - if (strcmp(atf_dynstr_cstring(&str), buf) != 0) { - fprintf(stderr, "Failed at iteration %zd\n", i); - atf_tc_fail("Failed to append character at iteration %d", i); - } - - CE(append(&str, "%s", "a")); - strcat(buf, "a"); - } - atf_dynstr_fini(&str); -} - -static -atf_error_t -append_ap_aux(atf_dynstr_t *str, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_dynstr_append_ap(str, fmt, ap); - va_end(ap); - - return err; -} - -ATF_TC(append_ap); -ATF_TC_HEAD(append_ap, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that appending a string to " - "another one works"); -} -ATF_TC_BODY(append_ap, tc) -{ - check_append(append_ap_aux); -} - -ATF_TC(append_fmt); -ATF_TC_HEAD(append_fmt, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that appending a string to " - "another one works"); -} -ATF_TC_BODY(append_fmt, tc) -{ - check_append(atf_dynstr_append_fmt); -} - -ATF_TC(clear); -ATF_TC_HEAD(clear, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks clearing a string"); -} -ATF_TC_BODY(clear, tc) -{ - atf_dynstr_t str; - - printf("Clear an empty string\n"); - CE(atf_dynstr_init(&str)); - atf_dynstr_clear(&str); - ATF_CHECK_EQUAL(atf_dynstr_length(&str), 0); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "") == 0); - atf_dynstr_fini(&str); - - printf("Clear a non-empty string\n"); - CE(atf_dynstr_init_fmt(&str, "Not empty")); - ATF_CHECK_EQUAL(atf_dynstr_length(&str), strlen("Not empty")); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "Not empty") == 0); - atf_dynstr_clear(&str); - ATF_CHECK_EQUAL(atf_dynstr_length(&str), 0); - ATF_CHECK(strcmp(atf_dynstr_cstring(&str), "") == 0); - atf_dynstr_fini(&str); -} - -static -void -check_prepend(atf_error_t (*prepend)(atf_dynstr_t *, const char *, ...)) -{ - const size_t maxlen = 8192; - char buf[maxlen + 1]; - size_t i; - atf_dynstr_t str; - - printf("Prepending with plain string\n"); - buf[0] = '\0'; - CE(atf_dynstr_init(&str)); - for (i = 0; i < maxlen; i++) { - if (strcmp(atf_dynstr_cstring(&str), buf) != 0) { - fprintf(stderr, "Failed at iteration %zd\n", i); - atf_tc_fail("Failed to prepend character at iteration %d", i); - } - - memmove(buf + 1, buf, i + 1); - if (i % 2 == 0) { - CE(prepend(&str, "%s", "a")); - buf[0] = 'a'; - } else { - CE(prepend(&str, "%s", "b")); - buf[0] = 'b'; - } - } - atf_dynstr_fini(&str); - - printf("Prepending with formatted string\n"); - buf[0] = '\0'; - CE(atf_dynstr_init(&str)); - for (i = 0; i < maxlen; i++) { - if (strcmp(atf_dynstr_cstring(&str), buf) != 0) { - fprintf(stderr, "Failed at iteration %zd\n", i); - atf_tc_fail("Failed to prepend character at iteration %d", i); - } - - memmove(buf + 1, buf, i + 1); - if (i % 2 == 0) { - CE(prepend(&str, "%s", "a")); - buf[0] = 'a'; - } else { - CE(prepend(&str, "%s", "b")); - buf[0] = 'b'; - } - } - atf_dynstr_fini(&str); -} - -static -atf_error_t -prepend_ap_aux(atf_dynstr_t *str, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_dynstr_prepend_ap(str, fmt, ap); - va_end(ap); - - return err; -} - -ATF_TC(prepend_ap); -ATF_TC_HEAD(prepend_ap, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that prepending a string to " - "another one works"); -} -ATF_TC_BODY(prepend_ap, tc) -{ - check_prepend(prepend_ap_aux); -} - -ATF_TC(prepend_fmt); -ATF_TC_HEAD(prepend_fmt, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that prepending a string to " - "another one works"); -} -ATF_TC_BODY(prepend_fmt, tc) -{ - check_prepend(atf_dynstr_prepend_fmt); -} - -/* - * Operators. - */ - -ATF_TC(equal_cstring); -ATF_TC_HEAD(equal_cstring, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_equal_dynstr_cstring " - "function"); -} -ATF_TC_BODY(equal_cstring, tc) -{ - atf_dynstr_t str; - - CE(atf_dynstr_init(&str)); - ATF_CHECK( atf_equal_dynstr_cstring(&str, "")); - ATF_CHECK(!atf_equal_dynstr_cstring(&str, "Test")); - atf_dynstr_fini(&str); - - CE(atf_dynstr_init_fmt(&str, "Test")); - ATF_CHECK( atf_equal_dynstr_cstring(&str, "Test")); - ATF_CHECK(!atf_equal_dynstr_cstring(&str, "")); - ATF_CHECK(!atf_equal_dynstr_cstring(&str, "Tes")); - ATF_CHECK(!atf_equal_dynstr_cstring(&str, "Test ")); - atf_dynstr_fini(&str); -} - -ATF_TC(equal_dynstr); -ATF_TC_HEAD(equal_dynstr, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_equal_dynstr_dynstr " - "function"); -} -ATF_TC_BODY(equal_dynstr, tc) -{ - atf_dynstr_t str, str2; - - CE(atf_dynstr_init(&str)); - CE(atf_dynstr_init_fmt(&str2, "Test")); - ATF_CHECK( atf_equal_dynstr_dynstr(&str, &str)); - ATF_CHECK(!atf_equal_dynstr_dynstr(&str, &str2)); - atf_dynstr_fini(&str2); - atf_dynstr_fini(&str); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Constructors and destructors. */ - ATF_TP_ADD_TC(tp, init); - ATF_TP_ADD_TC(tp, init_ap); - ATF_TP_ADD_TC(tp, init_fmt); - ATF_TP_ADD_TC(tp, init_raw); - ATF_TP_ADD_TC(tp, init_rep); - ATF_TP_ADD_TC(tp, init_substr); - ATF_TP_ADD_TC(tp, copy); - ATF_TP_ADD_TC(tp, fini_disown); - - /* Getters. */ - ATF_TP_ADD_TC(tp, cstring); - ATF_TP_ADD_TC(tp, length); - ATF_TP_ADD_TC(tp, rfind_ch); - - /* Modifiers. */ - ATF_TP_ADD_TC(tp, append_ap); - ATF_TP_ADD_TC(tp, append_fmt); - ATF_TP_ADD_TC(tp, clear); - ATF_TP_ADD_TC(tp, prepend_ap); - ATF_TP_ADD_TC(tp, prepend_fmt); - - /* Operators. */ - ATF_TP_ADD_TC(tp, equal_cstring); - ATF_TP_ADD_TC(tp, equal_dynstr); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_env.c b/dist/atf/tests/atf/atf-c/t_env.c deleted file mode 100644 index e344bdb4467e..000000000000 --- a/dist/atf/tests/atf/atf-c/t_env.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 "atf-c/env.h" -#include "atf-c/text.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(has); -ATF_TC_HEAD(has, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_env_has function"); -} -ATF_TC_BODY(has, tc) -{ - ATF_CHECK(atf_env_has("PATH")); - ATF_CHECK(!atf_env_has("_UNDEFINED_VARIABLE_")); -} - -ATF_TC(get); -ATF_TC_HEAD(get, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_env_get function"); -} -ATF_TC_BODY(get, tc) -{ - const char *val; - - ATF_CHECK(atf_env_has("PATH")); - - val = atf_env_get("PATH"); - ATF_CHECK(strlen(val) > 0); - ATF_CHECK(strchr(val, ':') != NULL); -} - -ATF_TC(set); -ATF_TC_HEAD(set, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_env_set function"); -} -ATF_TC_BODY(set, tc) -{ - char *oldval; - - ATF_CHECK(atf_env_has("PATH")); - CE(atf_text_format(&oldval, "%s", atf_env_get("PATH"))); - CE(atf_env_set("PATH", "foo-bar")); - ATF_CHECK(strcmp(atf_env_get("PATH"), oldval) != 0); - ATF_CHECK(strcmp(atf_env_get("PATH"), "foo-bar") == 0); - free(oldval); - - ATF_CHECK(!atf_env_has("_UNDEFINED_VARIABLE_")); - CE(atf_env_set("_UNDEFINED_VARIABLE_", "foo2-bar2")); - ATF_CHECK(strcmp(atf_env_get("_UNDEFINED_VARIABLE_"), - "foo2-bar2") == 0); -} - -ATF_TC(unset); -ATF_TC_HEAD(unset, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_env_unset function"); -} -ATF_TC_BODY(unset, tc) -{ - ATF_CHECK(atf_env_has("PATH")); - CE(atf_env_unset("PATH")); - ATF_CHECK(!atf_env_has("PATH")); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, has); - ATF_TP_ADD_TC(tp, get); - ATF_TP_ADD_TC(tp, set); - ATF_TP_ADD_TC(tp, unset); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_error.c b/dist/atf/tests/atf/atf-c/t_error.c deleted file mode 100644 index d9642167f494..000000000000 --- a/dist/atf/tests/atf/atf-c/t_error.c +++ /dev/null @@ -1,270 +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/error.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -void -test_format(const atf_error_t err, char *buf, size_t buflen) -{ - snprintf(buf, buflen, "Test formatting function"); -} - -/* --------------------------------------------------------------------- - * Tests for the "atf_error" type. - * --------------------------------------------------------------------- */ - -ATF_TC(error_new); -ATF_TC_HEAD(error_new, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of an error " - "object"); -} -ATF_TC_BODY(error_new, tc) -{ - atf_error_t err; - int data; - - err = atf_error_new("test_error", NULL, 0, NULL); - ATF_CHECK(atf_error_is(err, "test_error")); - ATF_CHECK(!atf_error_is(err, "unknown_error")); - ATF_CHECK(atf_error_data(err) == NULL); - atf_error_free(err); - - data = 5; - err = atf_error_new("test_data_error", &data, sizeof(data), NULL); - ATF_CHECK(atf_error_is(err, "test_data_error")); - ATF_CHECK(!atf_error_is(err, "unknown_error")); - ATF_CHECK(atf_error_data(err) != NULL); - ATF_CHECK_EQUAL(*((const int *)atf_error_data(err)), 5); - atf_error_free(err); -} - -ATF_TC(error_new_wo_memory); -ATF_TC_HEAD(error_new_wo_memory, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that an unavailable memory error " - "raised when constructing an error object " - "is properly converted to the no_memory " - "static error type"); -} -ATF_TC_BODY(error_new_wo_memory, tc) -{ - atf_error_t err; - void *invalid; - - invalid = (void *)1; - - err = atf_error_new("test_error", invalid, SIZE_MAX, NULL); - ATF_CHECK(atf_error_is(err, "no_memory")); - ATF_CHECK(atf_error_data(err) == NULL); - atf_error_free(err); -} - -ATF_TC(no_error); -ATF_TC_HEAD(no_error, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that constructing a non-error " - "object works"); -} -ATF_TC_BODY(no_error, tc) -{ - atf_error_t err; - - err = atf_no_error(); - ATF_CHECK(!atf_is_error(err)); -} - -ATF_TC(is_error); -ATF_TC_HEAD(is_error, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the is_error method to determine " - "if an error object holds success or an error"); -} -ATF_TC_BODY(is_error, tc) -{ - atf_error_t err; - - err = atf_no_error(); - ATF_CHECK(!atf_is_error(err)); - - err = atf_error_new("test_error", NULL, 0, NULL); - ATF_CHECK(atf_is_error(err)); - atf_error_free(err); -} - -ATF_TC(format); -ATF_TC_HEAD(format, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the default formatting function " - "and the ability to change it"); -} -ATF_TC_BODY(format, tc) -{ - atf_error_t err; - char buf[1024]; - - printf("Testing default formatting function\n"); - err = atf_error_new("test_error", NULL, 0, NULL); - atf_error_format(err, buf, sizeof(buf)); - printf("Error string is: %s\n", buf); - ATF_CHECK(strcmp(buf, "Error 'test_error'") == 0); - atf_error_free(err); - - printf("Testing custom formatting function\n"); - err = atf_error_new("test_error", NULL, 0, test_format); - atf_error_format(err, buf, sizeof(buf)); - printf("Error string is: %s\n", buf); - ATF_CHECK(strcmp(buf, "Test formatting function") == 0); - atf_error_free(err); -} - -/* --------------------------------------------------------------------- - * Tests for the "libc" error. - * --------------------------------------------------------------------- */ - -ATF_TC(libc_new); -ATF_TC_HEAD(libc_new, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of libc errors"); -} -ATF_TC_BODY(libc_new, tc) -{ - atf_error_t err; - - err = atf_libc_error(ENOMEM, "Test message 1"); - ATF_CHECK(atf_error_is(err, "libc")); - ATF_CHECK_EQUAL(atf_libc_error_code(err), ENOMEM); - atf_error_free(err); - - err = atf_libc_error(EPERM, "%s message %d", "Test", 2); - ATF_CHECK(atf_error_is(err, "libc")); - ATF_CHECK_EQUAL(atf_libc_error_code(err), EPERM); - atf_error_free(err); -} - -ATF_TC(libc_format); -ATF_TC_HEAD(libc_format, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the formatting of libc errors"); -} -ATF_TC_BODY(libc_format, tc) -{ - atf_error_t err; - char buf[1024]; - - err = atf_libc_error(ENOMEM, "Test message 1"); - atf_error_format(err, buf, sizeof(buf)); - ATF_CHECK(strstr(buf, strerror(ENOMEM)) != NULL); - ATF_CHECK(strstr(buf, "Test message 1") != NULL); - atf_error_free(err); - - err = atf_libc_error(EPERM, "Test message 2"); - atf_error_format(err, buf, sizeof(buf)); - ATF_CHECK(strstr(buf, strerror(EPERM)) != NULL); - ATF_CHECK(strstr(buf, "Test message 2") != NULL); - atf_error_free(err); - - err = atf_libc_error(EPERM, "%s message %d", "Test", 3); - atf_error_format(err, buf, sizeof(buf)); - ATF_CHECK(strstr(buf, strerror(EPERM)) != NULL); - ATF_CHECK(strstr(buf, "Test message 3") != NULL); - atf_error_free(err); -} - -/* --------------------------------------------------------------------- - * Tests for the "no_memory" error. - * --------------------------------------------------------------------- */ - -ATF_TC(no_memory_new); -ATF_TC_HEAD(no_memory_new, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of no_memory " - "errors"); -} -ATF_TC_BODY(no_memory_new, tc) -{ - atf_error_t err; - - err = atf_no_memory_error(); - ATF_CHECK(atf_error_is(err, "no_memory")); - ATF_CHECK(atf_error_data(err) == NULL); - atf_error_free(err); -} - -ATF_TC(no_memory_format); -ATF_TC_HEAD(no_memory_format, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the formatting of no_memory " - "errors"); -} -ATF_TC_BODY(no_memory_format, tc) -{ - atf_error_t err; - char buf[1024]; - - err = atf_no_memory_error(); - atf_error_format(err, buf, sizeof(buf)); - ATF_CHECK(strcmp(buf, "Not enough memory") == 0); - atf_error_free(err); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Add the tests for the "atf_error" type. */ - ATF_TP_ADD_TC(tp, error_new); - ATF_TP_ADD_TC(tp, error_new_wo_memory); - ATF_TP_ADD_TC(tp, no_error); - ATF_TP_ADD_TC(tp, is_error); - ATF_TP_ADD_TC(tp, format); - - /* Add the tests for the "libc" error. */ - ATF_TP_ADD_TC(tp, libc_new); - ATF_TP_ADD_TC(tp, libc_format); - - /* Add the tests for the "no_memory" error. */ - ATF_TP_ADD_TC(tp, no_memory_new); - ATF_TP_ADD_TC(tp, no_memory_format); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_expand.c b/dist/atf/tests/atf/atf-c/t_expand.c deleted file mode 100644 index a5654bcf7082..000000000000 --- a/dist/atf/tests/atf/atf-c/t_expand.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 "atf-c/expand.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -static -bool -matches_glob(const char *glob, const char *candidate) -{ - bool result; - - CE(atf_expand_matches_glob(glob, candidate, &result)); - - return result; -} - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(is_glob); -ATF_TC_HEAD(is_glob, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_expand_is_glob function"); -} -ATF_TC_BODY(is_glob, tc) -{ - ATF_CHECK(!atf_expand_is_glob("")); - ATF_CHECK(!atf_expand_is_glob("a")); - ATF_CHECK(!atf_expand_is_glob("foo")); - - ATF_CHECK( atf_expand_is_glob("*")); - ATF_CHECK( atf_expand_is_glob("a*")); - ATF_CHECK( atf_expand_is_glob("*a")); - ATF_CHECK( atf_expand_is_glob("a*b")); - - ATF_CHECK( atf_expand_is_glob("?")); - ATF_CHECK( atf_expand_is_glob("a?")); - ATF_CHECK( atf_expand_is_glob("?a")); - ATF_CHECK( atf_expand_is_glob("a?b")); -} - -ATF_TC(matches_glob_plain); -ATF_TC_HEAD(matches_glob_plain, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_expand_is_glob function " - "by using plain text strings as globs"); -} -ATF_TC_BODY(matches_glob_plain, tc) -{ - ATF_CHECK( matches_glob("", "")); - ATF_CHECK(!matches_glob("a", "")); - ATF_CHECK(!matches_glob("", "a")); - - ATF_CHECK( matches_glob("ab", "ab")); - ATF_CHECK(!matches_glob("abc", "ab")); - ATF_CHECK(!matches_glob("ab", "abc")); -} - -ATF_TC(matches_glob_star); -ATF_TC_HEAD(matches_glob_star, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_expand_is_glob function " - "by using the '*' glob-character"); -} -ATF_TC_BODY(matches_glob_star, tc) -{ - ATF_CHECK( matches_glob("*", "")); - ATF_CHECK( matches_glob("*", "a")); - ATF_CHECK( matches_glob("*", "ab")); - - ATF_CHECK(!matches_glob("a*", "")); - ATF_CHECK( matches_glob("a*", "a")); - ATF_CHECK( matches_glob("a*", "aa")); - ATF_CHECK( matches_glob("a*", "ab")); - ATF_CHECK( matches_glob("a*", "abc")); - ATF_CHECK(!matches_glob("a*", "ba")); - - ATF_CHECK( matches_glob("*a", "a")); - ATF_CHECK( matches_glob("*a", "ba")); - ATF_CHECK(!matches_glob("*a", "bc")); - ATF_CHECK(!matches_glob("*a", "bac")); - - ATF_CHECK( matches_glob("*ab", "ab")); - ATF_CHECK( matches_glob("*ab", "aab")); - ATF_CHECK( matches_glob("*ab", "aaab")); - ATF_CHECK( matches_glob("*ab", "bab")); - ATF_CHECK(!matches_glob("*ab", "bcb")); - ATF_CHECK(!matches_glob("*ab", "bacb")); - - ATF_CHECK( matches_glob("a*b", "ab")); - ATF_CHECK( matches_glob("a*b", "acb")); - ATF_CHECK( matches_glob("a*b", "acdeb")); - ATF_CHECK(!matches_glob("a*b", "acdebz")); - ATF_CHECK(!matches_glob("a*b", "zacdeb")); -} - -ATF_TC(matches_glob_question); -ATF_TC_HEAD(matches_glob_question, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_expand_is_glob function " - "by using the '?' glob-character"); -} -ATF_TC_BODY(matches_glob_question, tc) -{ - ATF_CHECK(!matches_glob("?", "")); - ATF_CHECK( matches_glob("?", "a")); - ATF_CHECK(!matches_glob("?", "ab")); - - ATF_CHECK( matches_glob("?", "b")); - ATF_CHECK( matches_glob("?", "c")); - - ATF_CHECK( matches_glob("a?", "ab")); - ATF_CHECK( matches_glob("a?", "ac")); - ATF_CHECK(!matches_glob("a?", "ca")); - - ATF_CHECK( matches_glob("???", "abc")); - ATF_CHECK( matches_glob("???", "def")); - ATF_CHECK(!matches_glob("???", "a")); - ATF_CHECK(!matches_glob("???", "ab")); - ATF_CHECK(!matches_glob("???", "abcd")); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, is_glob); - ATF_TP_ADD_TC(tp, matches_glob_plain); - ATF_TP_ADD_TC(tp, matches_glob_star); - ATF_TP_ADD_TC(tp, matches_glob_question); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_fs.c b/dist/atf/tests/atf/atf-c/t_fs.c deleted file mode 100644 index 66084672e8d4..000000000000 --- a/dist/atf/tests/atf/atf-c/t_fs.c +++ /dev/null @@ -1,799 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 -#include -#include -#include - -#include - -#include "atf-c/fs.h" -#include "atf-c/user.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -static -void -create_dir(const char *p, int mode) -{ - int fd; - - fd = mkdir(p, mode); - if (fd == -1) - atf_tc_fail("Could not create helper directory %s", p); -} - -static -void -create_file(const char *p, int mode) -{ - int fd; - - fd = open(p, O_CREAT | O_WRONLY | O_TRUNC, mode); - if (fd == -1) - atf_tc_fail("Could not create helper file %s", p); -} - -static -bool -exists(const atf_fs_path_t *p) -{ - return access(atf_fs_path_cstring(p), F_OK) == 0; -} - -static -bool -not_exists(const atf_fs_path_t *p) -{ - return access(atf_fs_path_cstring(p), F_OK) == -1 && errno == ENOENT; -} - -/* --------------------------------------------------------------------- - * Test cases for the "atf_fs_path" type. - * --------------------------------------------------------------------- */ - -ATF_TC(path_normalize); -ATF_TC_HEAD(path_normalize, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the path's normalization"); -} -ATF_TC_BODY(path_normalize, tc) -{ - struct test { - const char *in; - const char *out; - } tests[] = { - { ".", ".", }, - { "..", "..", }, - - { "/", "/", }, - { "//", "/", }, /* NO_CHECK_STYLE */ - { "///", "/", }, /* NO_CHECK_STYLE */ - - { "foo", "foo", }, - { "foo/", "foo", }, - { "foo/bar", "foo/bar", }, - { "foo/bar/", "foo/bar", }, - - { "/foo", "/foo", }, - { "/foo/bar", "/foo/bar", }, - { "/foo/bar/", "/foo/bar", }, - - { "///foo", "/foo", }, /* NO_CHECK_STYLE */ - { "///foo///bar", "/foo/bar", }, /* NO_CHECK_STYLE */ - { "///foo///bar///", "/foo/bar", }, /* NO_CHECK_STYLE */ - - { NULL, NULL } - }; - struct test *t; - - for (t = &tests[0]; t->in != NULL; t++) { - atf_fs_path_t p; - - printf("Input : >%s<\n", t->in); - printf("Expected output: >%s<\n", t->out); - - CE(atf_fs_path_init_fmt(&p, "%s", t->in)); - printf("Output : >%s<\n", atf_fs_path_cstring(&p)); - ATF_CHECK(strcmp(atf_fs_path_cstring(&p), t->out) == 0); - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_copy); -ATF_TC_HEAD(path_copy, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_path_copy constructor"); -} -ATF_TC_BODY(path_copy, tc) -{ - atf_fs_path_t str, str2; - - CE(atf_fs_path_init_fmt(&str, "foo")); - CE(atf_fs_path_copy(&str2, &str)); - - ATF_CHECK(atf_equal_fs_path_fs_path(&str, &str2)); - - CE(atf_fs_path_append_fmt(&str2, "bar")); - - ATF_CHECK(!atf_equal_fs_path_fs_path(&str, &str2)); - - atf_fs_path_fini(&str2); - atf_fs_path_fini(&str); -} - -ATF_TC(path_is_absolute); -ATF_TC_HEAD(path_is_absolute, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the path::is_absolute function"); -} -ATF_TC_BODY(path_is_absolute, tc) -{ - struct test { - const char *in; - bool abs; - } tests[] = { - { "/", true }, - { "////", true }, /* NO_CHECK_STYLE */ - { "////a", true }, /* NO_CHECK_STYLE */ - { "//a//", true }, /* NO_CHECK_STYLE */ - { "a////", false }, /* NO_CHECK_STYLE */ - { "../foo", false }, - { NULL, false }, - }; - struct test *t; - - for (t = &tests[0]; t->in != NULL; t++) { - atf_fs_path_t p; - - printf("Input : %s\n", t->in); - printf("Expected result: %s\n", t->abs ? "true" : "false"); - - CE(atf_fs_path_init_fmt(&p, "%s", t->in)); - printf("Result : %s\n", - atf_fs_path_is_absolute(&p) ? "true" : "false"); - if (t->abs) - ATF_CHECK(atf_fs_path_is_absolute(&p)); - else - ATF_CHECK(!atf_fs_path_is_absolute(&p)); - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_is_root); -ATF_TC_HEAD(path_is_root, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the path::is_root function"); -} -ATF_TC_BODY(path_is_root, tc) -{ - struct test { - const char *in; - bool root; - } tests[] = { - { "/", true }, - { "////", true }, /* NO_CHECK_STYLE */ - { "////a", false }, /* NO_CHECK_STYLE */ - { "//a//", false }, /* NO_CHECK_STYLE */ - { "a////", false }, /* NO_CHECK_STYLE */ - { "../foo", false }, - { NULL, false }, - }; - struct test *t; - - for (t = &tests[0]; t->in != NULL; t++) { - atf_fs_path_t p; - - printf("Input : %s\n", t->in); - printf("Expected result: %s\n", t->root ? "true" : "false"); - - CE(atf_fs_path_init_fmt(&p, "%s", t->in)); - printf("Result : %s\n", - atf_fs_path_is_root(&p) ? "true" : "false"); - if (t->root) - ATF_CHECK(atf_fs_path_is_root(&p)); - else - ATF_CHECK(!atf_fs_path_is_root(&p)); - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_branch_path); -ATF_TC_HEAD(path_branch_path, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_path_branch_path " - "function"); -} -ATF_TC_BODY(path_branch_path, tc) -{ - struct test { - const char *in; - const char *branch; - } tests[] = { - { ".", "." }, - { "foo", "." }, - { "foo/bar", "foo" }, - { "/foo", "/" }, - { "/foo/bar", "/foo" }, - { NULL, NULL }, - }; - struct test *t; - - for (t = &tests[0]; t->in != NULL; t++) { - atf_fs_path_t p, bp; - - printf("Input : %s\n", t->in); - printf("Expected output: %s\n", t->branch); - - CE(atf_fs_path_init_fmt(&p, "%s", t->in)); - CE(atf_fs_path_branch_path(&p, &bp)); - printf("Output : %s\n", atf_fs_path_cstring(&bp)); - ATF_CHECK(strcmp(atf_fs_path_cstring(&bp), t->branch) == 0); - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_leaf_name); -ATF_TC_HEAD(path_leaf_name, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_path_leaf_name " - "function"); -} -ATF_TC_BODY(path_leaf_name, tc) -{ - struct test { - const char *in; - const char *leaf; - } tests[] = { - { ".", "." }, - { "foo", "foo" }, - { "foo/bar", "bar" }, - { "/foo", "foo" }, - { "/foo/bar", "bar" }, - { NULL, NULL }, - }; - struct test *t; - - for (t = &tests[0]; t->in != NULL; t++) { - atf_fs_path_t p; - atf_dynstr_t ln; - - printf("Input : %s\n", t->in); - printf("Expected output: %s\n", t->leaf); - - CE(atf_fs_path_init_fmt(&p, "%s", t->in)); - CE(atf_fs_path_leaf_name(&p, &ln)); - printf("Output : %s\n", atf_dynstr_cstring(&ln)); - ATF_CHECK(atf_equal_dynstr_cstring(&ln, t->leaf)); - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_append); -ATF_TC_HEAD(path_append, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the concatenation of multiple " - "paths"); -} -ATF_TC_BODY(path_append, tc) -{ - struct test { - const char *in; - const char *ap; - const char *out; - } tests[] = { - { "foo", "bar", "foo/bar" }, - { "foo/", "/bar", "foo/bar" }, - { "foo/", "/bar/baz", "foo/bar/baz" }, - { "foo/", "///bar///baz", "foo/bar/baz" }, /* NO_CHECK_STYLE */ - - { NULL, NULL, NULL } - }; - struct test *t; - - for (t = &tests[0]; t->in != NULL; t++) { - atf_fs_path_t p; - - printf("Input : >%s<\n", t->in); - printf("Append : >%s<\n", t->ap); - printf("Expected output: >%s<\n", t->out); - - CE(atf_fs_path_init_fmt(&p, "%s", t->in)); - - CE(atf_fs_path_append_fmt(&p, "%s", t->ap)); - - printf("Output : >%s<\n", atf_fs_path_cstring(&p)); - ATF_CHECK(strcmp(atf_fs_path_cstring(&p), t->out) == 0); - - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_to_absolute); -ATF_TC_HEAD(path_to_absolute, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_path_to_absolute " - "function"); -} -ATF_TC_BODY(path_to_absolute, tc) -{ - const char *names[] = { ".", "dir", NULL }; - const char **n; - - ATF_CHECK(mkdir("dir", 0755) != -1); - - for (n = names; *n != NULL; n++) { - atf_fs_path_t p, p2; - atf_fs_stat_t st1, st2; - - CE(atf_fs_path_init_fmt(&p, "%s", *n)); - CE(atf_fs_stat_init(&st1, &p)); - printf("Relative path: %s\n", atf_fs_path_cstring(&p)); - - CE(atf_fs_path_to_absolute(&p, &p2)); - printf("Absolute path: %s\n", atf_fs_path_cstring(&p2)); - - ATF_CHECK(atf_fs_path_is_absolute(&p2)); - CE(atf_fs_stat_init(&st2, &p2)); - - ATF_CHECK_EQUAL(atf_fs_stat_get_device(&st1), - atf_fs_stat_get_device(&st2)); - ATF_CHECK_EQUAL(atf_fs_stat_get_inode(&st1), - atf_fs_stat_get_inode(&st2)); - - atf_fs_stat_fini(&st2); - atf_fs_stat_fini(&st1); - atf_fs_path_fini(&p2); - atf_fs_path_fini(&p); - - printf("\n"); - } -} - -ATF_TC(path_equal); -ATF_TC_HEAD(path_equal, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the equality operators for paths"); -} -ATF_TC_BODY(path_equal, tc) -{ - atf_fs_path_t p1, p2; - - CE(atf_fs_path_init_fmt(&p1, "foo")); - - CE(atf_fs_path_init_fmt(&p2, "foo")); - ATF_CHECK(atf_equal_fs_path_fs_path(&p1, &p2)); - atf_fs_path_fini(&p2); - - CE(atf_fs_path_init_fmt(&p2, "bar")); - ATF_CHECK(!atf_equal_fs_path_fs_path(&p1, &p2)); - atf_fs_path_fini(&p2); - - atf_fs_path_fini(&p1); -} - -/* --------------------------------------------------------------------- - * Test cases for the "atf_fs_stat" type. - * --------------------------------------------------------------------- */ - -ATF_TC(stat_type); -ATF_TC_HEAD(stat_type, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_stat_get_type function " - "and, indirectly, the constructor"); -} -ATF_TC_BODY(stat_type, tc) -{ - atf_fs_path_t p; - atf_fs_stat_t st; - - create_dir("dir", 0755); - create_file("reg", 0644); - - CE(atf_fs_path_init_fmt(&p, "dir")); - CE(atf_fs_stat_init(&st, &p)); - ATF_CHECK_EQUAL(atf_fs_stat_get_type(&st), atf_fs_stat_dir_type); - atf_fs_stat_fini(&st); - atf_fs_path_fini(&p); - - CE(atf_fs_path_init_fmt(&p, "reg")); - CE(atf_fs_stat_init(&st, &p)); - ATF_CHECK_EQUAL(atf_fs_stat_get_type(&st), atf_fs_stat_reg_type); - atf_fs_stat_fini(&st); - atf_fs_path_fini(&p); -} - -ATF_TC(stat_perms); -ATF_TC_HEAD(stat_perms, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_stat_is_* functions"); -} -ATF_TC_BODY(stat_perms, tc) -{ - atf_fs_path_t p; - atf_fs_stat_t st; - - create_file("reg", 0); - - CE(atf_fs_path_init_fmt(&p, "reg")); - -#define perms(ur, uw, ux, gr, gw, gx, othr, othw, othx) \ - { \ - CE(atf_fs_stat_init(&st, &p)); \ - ATF_CHECK(atf_fs_stat_is_owner_readable(&st) == ur); \ - ATF_CHECK(atf_fs_stat_is_owner_writable(&st) == uw); \ - ATF_CHECK(atf_fs_stat_is_owner_executable(&st) == ux); \ - ATF_CHECK(atf_fs_stat_is_group_readable(&st) == gr); \ - ATF_CHECK(atf_fs_stat_is_group_writable(&st) == gw); \ - ATF_CHECK(atf_fs_stat_is_group_executable(&st) == gx); \ - ATF_CHECK(atf_fs_stat_is_other_readable(&st) == othr); \ - ATF_CHECK(atf_fs_stat_is_other_writable(&st) == othw); \ - ATF_CHECK(atf_fs_stat_is_other_executable(&st) == othx); \ - atf_fs_stat_fini(&st); \ - } - - chmod("reg", 0000); - perms(false, false, false, false, false, false, false, false, false); - - chmod("reg", 0001); - perms(false, false, false, false, false, false, false, false, true); - - chmod("reg", 0010); - perms(false, false, false, false, false, true, false, false, false); - - chmod("reg", 0100); - perms(false, false, true, false, false, false, false, false, false); - - chmod("reg", 0002); - perms(false, false, false, false, false, false, false, true, false); - - chmod("reg", 0020); - perms(false, false, false, false, true, false, false, false, false); - - chmod("reg", 0200); - perms(false, true, false, false, false, false, false, false, false); - - chmod("reg", 0004); - perms(false, false, false, false, false, false, true, false, false); - - chmod("reg", 0040); - perms(false, false, false, true, false, false, false, false, false); - - chmod("reg", 0400); - perms(true, false, false, false, false, false, false, false, false); - - chmod("reg", 0644); - perms(true, true, false, true, false, false, true, false, false); - - chmod("reg", 0755); - perms(true, true, true, true, false, true, true, false, true); - - chmod("reg", 0777); - perms(true, true, true, true, true, true, true, true, true); - -#undef perms - - atf_fs_path_fini(&p); -} - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(cleanup); -ATF_TC_HEAD(cleanup, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_cleanup function"); -} -ATF_TC_BODY(cleanup, tc) -{ - atf_fs_path_t root; - - create_dir ("root", 0755); - create_dir ("root/dir", 0755); - create_dir ("root/dir/1", 0755); - create_file("root/dir/2", 0644); - create_file("root/reg", 0644); - - CE(atf_fs_path_init_fmt(&root, "root")); - CE(atf_fs_cleanup(&root)); - ATF_CHECK(not_exists(&root)); - atf_fs_path_fini(&root); - - /* TODO: Cleanup with mount points, just as in tools/t_atf_cleanup. */ -} - -ATF_TC(exists); -ATF_TC_HEAD(exists, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_exists function"); -} -ATF_TC_BODY(exists, tc) -{ - atf_error_t err; - atf_fs_path_t pdir, pfile; - bool b; - - CE(atf_fs_path_init_fmt(&pdir, "dir")); - CE(atf_fs_path_init_fmt(&pfile, "dir/file")); - - create_dir(atf_fs_path_cstring(&pdir), 0755); - create_file(atf_fs_path_cstring(&pfile), 0644); - - printf("Checking existence of a directory\n"); - CE(atf_fs_exists(&pdir, &b)); - ATF_CHECK(b); - - printf("Checking existence of a file\n"); - CE(atf_fs_exists(&pfile, &b)); - ATF_CHECK(b); - - if (!atf_user_is_root()) { - printf("Checking existence of a file inside a directory without " - "permissions\n"); - ATF_CHECK(chmod(atf_fs_path_cstring(&pdir), 0000) != -1); - err = atf_fs_exists(&pfile, &b); - ATF_CHECK(atf_is_error(err)); - ATF_CHECK(atf_error_is(err, "libc")); - ATF_CHECK(chmod(atf_fs_path_cstring(&pdir), 0755) != -1); - } - - printf("Checking existence of a non-existent file\n"); - ATF_CHECK(unlink(atf_fs_path_cstring(&pfile)) != -1); - CE(atf_fs_exists(&pfile, &b)); - ATF_CHECK(!b); -} - -ATF_TC(eaccess); -ATF_TC_HEAD(eaccess, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_eaccess function"); -} -ATF_TC_BODY(eaccess, tc) -{ - const int modes[] = { atf_fs_access_f, atf_fs_access_r, atf_fs_access_w, - atf_fs_access_x, 0 }; - const int *m; - struct tests { - mode_t fmode; - int amode; - int uerror; - int rerror; - } tests[] = { - { 0000, atf_fs_access_r, EACCES, 0 }, - { 0000, atf_fs_access_w, EACCES, 0 }, - { 0000, atf_fs_access_x, EACCES, EACCES }, - - { 0001, atf_fs_access_r, EACCES, 0 }, - { 0001, atf_fs_access_w, EACCES, 0 }, - { 0001, atf_fs_access_x, EACCES, 0 }, - { 0002, atf_fs_access_r, EACCES, 0 }, - { 0002, atf_fs_access_w, EACCES, 0 }, - { 0002, atf_fs_access_x, EACCES, EACCES }, - { 0004, atf_fs_access_r, EACCES, 0 }, - { 0004, atf_fs_access_w, EACCES, 0 }, - { 0004, atf_fs_access_x, EACCES, EACCES }, - - { 0010, atf_fs_access_r, EACCES, 0 }, - { 0010, atf_fs_access_w, EACCES, 0 }, - { 0010, atf_fs_access_x, 0, 0 }, - { 0020, atf_fs_access_r, EACCES, 0 }, - { 0020, atf_fs_access_w, 0, 0 }, - { 0020, atf_fs_access_x, EACCES, EACCES }, - { 0040, atf_fs_access_r, 0, 0 }, - { 0040, atf_fs_access_w, EACCES, 0 }, - { 0040, atf_fs_access_x, EACCES, EACCES }, - - { 0100, atf_fs_access_r, EACCES, 0 }, - { 0100, atf_fs_access_w, EACCES, 0 }, - { 0100, atf_fs_access_x, 0, 0 }, - { 0200, atf_fs_access_r, EACCES, 0 }, - { 0200, atf_fs_access_w, 0, 0 }, - { 0200, atf_fs_access_x, EACCES, EACCES }, - { 0400, atf_fs_access_r, 0, 0 }, - { 0400, atf_fs_access_w, EACCES, 0 }, - { 0400, atf_fs_access_x, EACCES, EACCES }, - - { 0, 0, 0, 0 } - }; - struct tests *t; - atf_fs_path_t p; - atf_error_t err; - - CE(atf_fs_path_init_fmt(&p, "the-file")); - - printf("Non-existent file checks\n"); - for (m = &modes[0]; *m != 0; m++) { - err = atf_fs_eaccess(&p, *m); - ATF_CHECK(atf_is_error(err)); - ATF_CHECK(atf_error_is(err, "libc")); - ATF_CHECK_EQUAL(atf_libc_error_code(err), ENOENT); - atf_error_free(err); - } - - create_file(atf_fs_path_cstring(&p), 0000); - ATF_CHECK(chown(atf_fs_path_cstring(&p), geteuid(), getegid()) != -1); - - for (t = &tests[0]; t->amode != 0; t++) { - const int experr = atf_user_is_root() ? t->rerror : t->uerror; - - printf("\n"); - printf("File mode : %04o\n", t->fmode); - printf("Access mode : 0x%02x\n", t->amode); - - ATF_CHECK(chmod(atf_fs_path_cstring(&p), t->fmode) != -1); - - /* First, existence check. */ - err = atf_fs_eaccess(&p, atf_fs_access_f); - ATF_CHECK(!atf_is_error(err)); - - /* Now do the specific test case. */ - printf("Expected error: %d\n", experr); - err = atf_fs_eaccess(&p, t->amode); - if (atf_is_error(err)) { - if (atf_error_is(err, "libc")) - printf("Error : %d\n", atf_libc_error_code(err)); - else - printf("Error : Non-libc error\n"); - } else - printf("Error : None\n"); - if (experr == 0) { - ATF_CHECK(!atf_is_error(err)); - } else { - ATF_CHECK(atf_is_error(err)); - ATF_CHECK(atf_error_is(err, "libc")); - ATF_CHECK_EQUAL(atf_libc_error_code(err), experr); - atf_error_free(err); - } - } - - atf_fs_path_fini(&p); -} - -ATF_TC(getcwd); -ATF_TC_HEAD(getcwd, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_getcwd function"); -} -ATF_TC_BODY(getcwd, tc) -{ - atf_fs_path_t cwd1, cwd2; - - create_dir ("root", 0755); - - CE(atf_fs_getcwd(&cwd1)); - ATF_CHECK(chdir("root") != -1); - CE(atf_fs_getcwd(&cwd2)); - - CE(atf_fs_path_append_fmt(&cwd1, "root")); - - ATF_CHECK(atf_equal_fs_path_fs_path(&cwd1, &cwd2)); - - atf_fs_path_fini(&cwd2); - atf_fs_path_fini(&cwd1); -} - -ATF_TC(mkdtemp); -ATF_TC_HEAD(mkdtemp, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_fs_mkdtemp function"); -} -ATF_TC_BODY(mkdtemp, tc) -{ - atf_fs_path_t p1, p2; - atf_fs_stat_t s1, s2; - - CE(atf_fs_path_init_fmt(&p1, "testdir.XXXXXX")); - CE(atf_fs_path_init_fmt(&p2, "testdir.XXXXXX")); - CE(atf_fs_mkdtemp(&p1)); - CE(atf_fs_mkdtemp(&p2)); - ATF_CHECK(!atf_equal_fs_path_fs_path(&p1, &p2)); - ATF_CHECK(exists(&p1)); - ATF_CHECK(exists(&p2)); - - CE(atf_fs_stat_init(&s1, &p1)); - ATF_CHECK( atf_fs_stat_is_owner_readable(&s1)); - ATF_CHECK( atf_fs_stat_is_owner_writable(&s1)); - ATF_CHECK( atf_fs_stat_is_owner_executable(&s1)); - ATF_CHECK(!atf_fs_stat_is_group_readable(&s1)); - ATF_CHECK(!atf_fs_stat_is_group_writable(&s1)); - ATF_CHECK(!atf_fs_stat_is_group_executable(&s1)); - ATF_CHECK(!atf_fs_stat_is_other_readable(&s1)); - ATF_CHECK(!atf_fs_stat_is_other_writable(&s1)); - ATF_CHECK(!atf_fs_stat_is_other_executable(&s1)); - - CE(atf_fs_stat_init(&s2, &p2)); - ATF_CHECK( atf_fs_stat_is_owner_readable(&s2)); - ATF_CHECK( atf_fs_stat_is_owner_writable(&s2)); - ATF_CHECK( atf_fs_stat_is_owner_executable(&s2)); - ATF_CHECK(!atf_fs_stat_is_group_readable(&s2)); - ATF_CHECK(!atf_fs_stat_is_group_writable(&s2)); - ATF_CHECK(!atf_fs_stat_is_group_executable(&s2)); - ATF_CHECK(!atf_fs_stat_is_other_readable(&s2)); - ATF_CHECK(!atf_fs_stat_is_other_writable(&s2)); - ATF_CHECK(!atf_fs_stat_is_other_executable(&s2)); - - atf_fs_stat_fini(&s2); - atf_fs_stat_fini(&s1); - atf_fs_path_fini(&p2); - atf_fs_path_fini(&p1); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Add the tests for the "atf_fs_path" type. */ - ATF_TP_ADD_TC(tp, path_normalize); - ATF_TP_ADD_TC(tp, path_copy); - ATF_TP_ADD_TC(tp, path_is_absolute); - ATF_TP_ADD_TC(tp, path_is_root); - ATF_TP_ADD_TC(tp, path_branch_path); - ATF_TP_ADD_TC(tp, path_leaf_name); - ATF_TP_ADD_TC(tp, path_append); - ATF_TP_ADD_TC(tp, path_to_absolute); - ATF_TP_ADD_TC(tp, path_equal); - - /* Add the tests for the "atf_fs_stat" type. */ - ATF_TP_ADD_TC(tp, stat_type); - ATF_TP_ADD_TC(tp, stat_perms); - - /* Add the tests for the free functions. */ - ATF_TP_ADD_TC(tp, cleanup); - ATF_TP_ADD_TC(tp, eaccess); - ATF_TP_ADD_TC(tp, exists); - ATF_TP_ADD_TC(tp, getcwd); - ATF_TP_ADD_TC(tp, mkdtemp); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_io.c b/dist/atf/tests/atf/atf-c/t_io.c deleted file mode 100644 index 7476d17fd7d5..000000000000 --- a/dist/atf/tests/atf/atf-c/t_io.c +++ /dev/null @@ -1,171 +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 -#include - -#include - -#include "atf-c/dynstr.h" -#include "atf-c/io.h" - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(readline); -ATF_TC_HEAD(readline, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_io_readline function"); -} -ATF_TC_BODY(readline, tc) -{ - const char *l1 = "L1"; - const char *l2 = "Second line; much longer than the first one"; - const char *l3 = "Last line, without terminator"; - - { - FILE *f; - - f = fopen("test", "w"); - ATF_CHECK(f != NULL); - - fprintf(f, "%s\n", l1); - fprintf(f, "%s\n", l2); - fprintf(f, "%s", l3); - - fclose(f); - } - - { - int fd; - atf_dynstr_t dest; - - fd = open("test", O_RDONLY); - ATF_CHECK(fd != -1); - - CE(atf_dynstr_init(&dest)); - CE(atf_io_readline(fd, &dest)); - printf("1st line: >%s<\n", atf_dynstr_cstring(&dest)); - ATF_CHECK(atf_equal_dynstr_cstring(&dest, l1)); - atf_dynstr_fini(&dest); - - CE(atf_dynstr_init(&dest)); - CE(atf_io_readline(fd, &dest)); - printf("2nd line: >%s<\n", atf_dynstr_cstring(&dest)); - ATF_CHECK(atf_equal_dynstr_cstring(&dest, l2)); - atf_dynstr_fini(&dest); - - CE(atf_dynstr_init(&dest)); - CE(atf_io_readline(fd, &dest)); - printf("3rd line: >%s<\n", atf_dynstr_cstring(&dest)); - ATF_CHECK(atf_equal_dynstr_cstring(&dest, l3)); - atf_dynstr_fini(&dest); - - /* XXX Cannot detect eof condition. */ - - close(fd); - } -} - -ATF_TC(write_fmt); -ATF_TC_HEAD(write_fmt, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_io_write_fmt function"); -} -ATF_TC_BODY(write_fmt, tc) -{ - { - int fd; - - fd = open("test", O_WRONLY | O_CREAT | O_TRUNC, 0644); - ATF_CHECK(fd != -1); - - CE(atf_io_write_fmt(fd, "Plain string\n")); - CE(atf_io_write_fmt(fd, "Formatted %s %d\n", "string", 5)); - - close(fd); - } - - { - int fd; - char buf[1024]; - ssize_t cnt; - - fd = open("test", O_RDONLY); - ATF_CHECK(fd != -1); - - cnt = read(fd, buf, sizeof(buf)); - ATF_CHECK(cnt != -1); - buf[cnt] = '\0'; - ATF_CHECK(strcmp(buf, "Plain string\nFormatted string 5\n") == 0); - - close(fd); - } -} - -ATF_TC(write_fmt_fail); -ATF_TC_HEAD(write_fmt_fail, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_io_write_fmt function " - "writing to an invalid file descriptor"); -} -ATF_TC_BODY(write_fmt_fail, tc) -{ - const int fd = 16; - atf_error_t err; - char buf[1024]; - - close(fd); - - err = atf_io_write_fmt(fd, "Plain string\n"); - ATF_CHECK(atf_error_is(err, "libc")); - ATF_CHECK_EQUAL(atf_libc_error_code(err), EBADF); - atf_error_format(err, buf, sizeof(buf)); - ATF_CHECK(strstr(buf, "Plain string") != NULL); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, readline); - ATF_TP_ADD_TC(tp, write_fmt); - ATF_TP_ADD_TC(tp, write_fmt_fail); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_list.c b/dist/atf/tests/atf/atf-c/t_list.c deleted file mode 100644 index 3f1c6f786b50..000000000000 --- a/dist/atf/tests/atf/atf-c/t_list.c +++ /dev/null @@ -1,183 +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 "atf-c/list.h" - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Tests for the "atf_list" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors and destructors. - */ - -ATF_TC(list_init); -ATF_TC_HEAD(list_init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_list_init function"); -} -ATF_TC_BODY(list_init, tc) -{ - atf_list_t list; - - CE(atf_list_init(&list)); - ATF_CHECK_EQUAL(atf_list_size(&list), 0); - atf_list_fini(&list); -} - -/* - * Modifiers. - */ - -ATF_TC(list_append); -ATF_TC_HEAD(list_append, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_list_append function"); -} -ATF_TC_BODY(list_append, tc) -{ - atf_list_t list; - size_t i; - char buf[] = "Test string"; - - CE(atf_list_init(&list)); - for (i = 0; i < 1024; i++) { - ATF_CHECK_EQUAL(atf_list_size(&list), i); - CE(atf_list_append(&list, buf)); - } - atf_list_fini(&list); -} - -/* - * Macros. - */ - -ATF_TC(list_for_each); -ATF_TC_HEAD(list_for_each, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_list_for_each macro"); -} -ATF_TC_BODY(list_for_each, tc) -{ - atf_list_t list; - atf_list_iter_t iter; - size_t count; - int i, nums[10], size; - - printf("Iterating over empty list\n"); - CE(atf_list_init(&list)); - count = 0; - atf_list_for_each(iter, &list) { - count++; - printf("Item count is now %zd\n", count); - } - ATF_CHECK_EQUAL(count, 0); - atf_list_fini(&list); - - for (size = 0; size <= 10; size++) { - printf("Iterating over list of %d elements\n", size); - CE(atf_list_init(&list)); - for (i = 0; i < size; i++) { - nums[i] = i + 1; - CE(atf_list_append(&list, &nums[i])); - } - count = 0; - atf_list_for_each(iter, &list) { - printf("Retrieved item: %d\n", *(int *)atf_list_iter_data(iter)); - count++; - } - ATF_CHECK_EQUAL(count, size); - atf_list_fini(&list); - } -} - -ATF_TC(list_for_each_c); -ATF_TC_HEAD(list_for_each_c, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_list_for_each_c macro"); -} -ATF_TC_BODY(list_for_each_c, tc) -{ - atf_list_t list; - atf_list_citer_t iter; - size_t count; - int i, nums[10], size; - - printf("Iterating over empty list\n"); - CE(atf_list_init(&list)); - count = 0; - atf_list_for_each_c(iter, &list) { - count++; - printf("Item count is now %zd\n", count); - } - ATF_CHECK_EQUAL(count, 0); - atf_list_fini(&list); - - for (size = 0; size <= 10; size++) { - printf("Iterating over list of %d elements\n", size); - CE(atf_list_init(&list)); - for (i = 0; i < size; i++) { - nums[i] = i + 1; - CE(atf_list_append(&list, &nums[i])); - } - count = 0; - atf_list_for_each_c(iter, &list) { - printf("Retrieved item: %d\n", - *(const int *)atf_list_citer_data(iter)); - count++; - } - ATF_CHECK_EQUAL(count, size); - atf_list_fini(&list); - } -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Constructors and destructors. */ - ATF_TP_ADD_TC(tp, list_init); - - /* Modifiers. */ - ATF_TP_ADD_TC(tp, list_append); - - /* Macros. */ - ATF_TP_ADD_TC(tp, list_for_each); - ATF_TP_ADD_TC(tp, list_for_each_c); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_macros.c b/dist/atf/tests/atf/atf-c/t_macros.c deleted file mode 100644 index 191908eba2f9..000000000000 --- a/dist/atf/tests/atf/atf-c/t_macros.c +++ /dev/null @@ -1,262 +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 - -#include - -#include "atf-c/fs.h" -#include "atf-c/tcr.h" -#include "atf-c/text.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -static -void -create_ctl_file(const atf_tc_t *tc, const char *name) -{ - atf_fs_path_t p; - - CE(atf_fs_path_init_fmt(&p, "%s/%s", - atf_tc_get_config_var(tc, "ctldir"), name)); - ATF_CHECK(open(atf_fs_path_cstring(&p), - O_CREAT | O_WRONLY | O_TRUNC, 0644) != -1); - atf_fs_path_fini(&p); -} - -static -bool -exists(const char *p) -{ - bool b; - atf_fs_path_t pp; - - CE(atf_fs_path_init_fmt(&pp, "%s", p)); - CE(atf_fs_exists(&pp, &b)); - atf_fs_path_fini(&pp); - - return b; -} - -static -void -init_config(atf_map_t *config) -{ - atf_fs_path_t cwd; - - CE(atf_map_init(config)); - - CE(atf_fs_getcwd(&cwd)); - CE(atf_map_insert(config, "ctldir", - strdup(atf_fs_path_cstring(&cwd)), true)); - atf_fs_path_fini(&cwd); -} - -static -void -run_here(const atf_tc_t *tc, atf_tcr_t *tcr) -{ - atf_fs_path_t cwd; - - CE(atf_fs_getcwd(&cwd)); - CE(atf_tc_run(tc, tcr, &cwd)); - atf_fs_path_fini(&cwd); -} - -/* --------------------------------------------------------------------- - * Helper test cases. - * --------------------------------------------------------------------- */ - -ATF_TC_HEAD(h_check, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case"); -} -ATF_TC_BODY(h_check, tc) -{ - bool condition; - - CE(atf_text_to_bool(atf_tc_get_config_var(tc, "condition"), &condition)); - - create_ctl_file(tc, "before"); - ATF_CHECK(condition); - create_ctl_file(tc, "after"); -} - -ATF_TC_HEAD(h_check_equal, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case"); -} -ATF_TC_BODY(h_check_equal, tc) -{ - long v1, v2; - - CE(atf_text_to_long(atf_tc_get_config_var(tc, "v1"), &v1)); - CE(atf_text_to_long(atf_tc_get_config_var(tc, "v2"), &v2)); - - create_ctl_file(tc, "before"); - ATF_CHECK_EQUAL(v1, v2); - create_ctl_file(tc, "after"); -} - -/* --------------------------------------------------------------------- - * Test cases for the macros. - * --------------------------------------------------------------------- */ - -ATF_TC(check); -ATF_TC_HEAD(check, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the ATF_CHECK macro"); -} -ATF_TC_BODY(check, tc) -{ - struct test { - const char *cond; - bool ok; - } *t, tests[] = { - { "false", false }, - { "true", true }, - { NULL, false } - }; - - for (t = &tests[0]; t->cond != NULL; t++) { - atf_map_t config; - atf_tc_t tcaux; - atf_tcr_t tcr; - - init_config(&config); - CE(atf_map_insert(&config, "condition", strdup(t->cond), true)); - - printf("Checking with a %s value\n", t->cond); - - CE(atf_tc_init(&tcaux, "h_check", ATF_TC_HEAD_NAME(h_check), - ATF_TC_BODY_NAME(h_check), NULL, &config)); - run_here(&tcaux, &tcr); - atf_tc_fini(&tcaux); - - ATF_CHECK(exists("before")); - if (t->ok) { - ATF_CHECK(atf_tcr_get_state(&tcr) == atf_tcr_passed_state); - ATF_CHECK(exists("after")); - } else { - const char *r; - - ATF_CHECK(atf_tcr_get_state(&tcr) == atf_tcr_failed_state); - ATF_CHECK(!exists("after")); - - r = atf_dynstr_cstring(atf_tcr_get_reason(&tcr)); - ATF_CHECK(strstr(r, "condition not met") != NULL); - } - - atf_tcr_fini(&tcr); - atf_map_fini(&config); - - ATF_CHECK(unlink("before") != -1); - if (t->ok) - ATF_CHECK(unlink("after") != -1); - } -} - -ATF_TC(check_equal); -ATF_TC_HEAD(check_equal, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the ATF_CHECK_EQUAL macro"); -} -ATF_TC_BODY(check_equal, tc) -{ - struct test { - const char *v1; - const char *v2; - bool ok; - } *t, tests[] = { - { "1", "1", true }, - { "1", "2", false }, - { "2", "1", false }, - { "2", "2", true }, - { NULL, NULL, false } - }; - - for (t = &tests[0]; t->v1 != NULL; t++) { - atf_map_t config; - atf_tc_t tcaux; - atf_tcr_t tcr; - - init_config(&config); - CE(atf_map_insert(&config, "v1", strdup(t->v1), true)); - CE(atf_map_insert(&config, "v2", strdup(t->v2), true)); - - printf("Checking with %s, %s and expecting %s\n", t->v1, t->v2, - t->ok ? "true" : "false"); - - CE(atf_tc_init(&tcaux, "h_check", ATF_TC_HEAD_NAME(h_check_equal), - ATF_TC_BODY_NAME(h_check_equal), NULL, &config)); - run_here(&tcaux, &tcr); - atf_tc_fini(&tcaux); - - ATF_CHECK(exists("before")); - if (t->ok) { - ATF_CHECK(atf_tcr_get_state(&tcr) == atf_tcr_passed_state); - ATF_CHECK(exists("after")); - } else { - const char *r; - - ATF_CHECK(atf_tcr_get_state(&tcr) == atf_tcr_failed_state); - ATF_CHECK(!exists("after")); - - r = atf_dynstr_cstring(atf_tcr_get_reason(&tcr)); - ATF_CHECK(strstr(r, "v1 != v2") != NULL); - } - - atf_tcr_fini(&tcr); - atf_map_fini(&config); - - ATF_CHECK(unlink("before") != -1); - if (t->ok) - ATF_CHECK(unlink("after") != -1); - } -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, check); - ATF_TP_ADD_TC(tp, check_equal); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_map.c b/dist/atf/tests/atf/atf-c/t_map.c deleted file mode 100644 index 3845c2939639..000000000000 --- a/dist/atf/tests/atf/atf-c/t_map.c +++ /dev/null @@ -1,190 +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 "atf-c/map.h" - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Tests for the "atf_map" type. - * --------------------------------------------------------------------- */ - -/* - * Constructors and destructors. - */ - -ATF_TC(map_init); -ATF_TC_HEAD(map_init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_map_init function"); -} -ATF_TC_BODY(map_init, tc) -{ - atf_map_t map; - - CE(atf_map_init(&map)); - ATF_CHECK_EQUAL(atf_map_size(&map), 0); - atf_map_fini(&map); -} - -/* - * Getters. - */ - -ATF_TC(find_c); -ATF_TC_HEAD(find_c, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_map_find_c function"); -} -ATF_TC_BODY(find_c, tc) -{ - atf_map_t map; - char val1[] = "V1"; - char val2[] = "V2"; - atf_map_citer_t iter; - - CE(atf_map_init(&map)); - CE(atf_map_insert(&map, "K1", val1, false)); - CE(atf_map_insert(&map, "K2", val2, false)); - - iter = atf_map_find_c(&map, "K0"); - ATF_CHECK(atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - - iter = atf_map_find_c(&map, "K1"); - ATF_CHECK(!atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - ATF_CHECK(strcmp(atf_map_citer_data(iter), "V1") == 0); - - iter = atf_map_find_c(&map, "K2"); - ATF_CHECK(!atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - ATF_CHECK(strcmp(atf_map_citer_data(iter), "V2") == 0); - - atf_map_fini(&map); -} - -/* - * Modifiers. - */ - -ATF_TC(map_insert); -ATF_TC_HEAD(map_insert, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_map_insert function"); -} -ATF_TC_BODY(map_insert, tc) -{ - atf_map_t map; - char buf[] = "1st test string"; - char buf2[] = "2nd test string"; - const char *ptr; - atf_map_citer_t iter; - - CE(atf_map_init(&map)); - - printf("Inserting some values\n"); - ATF_CHECK_EQUAL(atf_map_size(&map), 0); - CE(atf_map_insert(&map, "K1", buf, false)); - ATF_CHECK_EQUAL(atf_map_size(&map), 1); - CE(atf_map_insert(&map, "K2", buf, false)); - ATF_CHECK_EQUAL(atf_map_size(&map), 2); - CE(atf_map_insert(&map, "K3", buf, false)); - ATF_CHECK_EQUAL(atf_map_size(&map), 3); - - printf("Replacing a value\n"); - iter = atf_map_find_c(&map, "K3"); - ATF_CHECK(!atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - ptr = atf_map_citer_data(iter); - ATF_CHECK_EQUAL(ptr, buf); - CE(atf_map_insert(&map, "K3", buf2, false)); - ATF_CHECK_EQUAL(atf_map_size(&map), 3); - iter = atf_map_find_c(&map, "K3"); - ATF_CHECK(!atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - ptr = atf_map_citer_data(iter); - ATF_CHECK_EQUAL(ptr, buf2); - - atf_map_fini(&map); -} - -/* - * Other. - */ - -ATF_TC(stable_keys); -ATF_TC_HEAD(stable_keys, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks that the keys do not change " - "even if their original values do"); -} -ATF_TC_BODY(stable_keys, tc) -{ - atf_map_t map; - atf_map_citer_t iter; - char key[] = "K1"; - - CE(atf_map_init(&map)); - - CE(atf_map_insert(&map, key, strdup("test-value"), true)); - iter = atf_map_find_c(&map, "K1"); - ATF_CHECK(!atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - iter = atf_map_find_c(&map, "K2"); - ATF_CHECK(atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - - strcpy(key, "K2"); - iter = atf_map_find_c(&map, "K1"); - ATF_CHECK(!atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - iter = atf_map_find_c(&map, "K2"); - ATF_CHECK(atf_equal_map_citer_map_citer(iter, atf_map_end_c(&map))); - - atf_map_fini(&map); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Constructors and destructors. */ - ATF_TP_ADD_TC(tp, map_init); - - /* Getters. */ - ATF_TP_ADD_TC(tp, find_c); - - /* Modifiers. */ - ATF_TP_ADD_TC(tp, map_insert); - - /* Other. */ - ATF_TP_ADD_TC(tp, stable_keys); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_sanity.c b/dist/atf/tests/atf/atf-c/t_sanity.c deleted file mode 100644 index b041f8e8c1af..000000000000 --- a/dist/atf/tests/atf/atf-c/t_sanity.c +++ /dev/null @@ -1,237 +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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "atf-c/dynstr.h" -#include "atf-c/io.h" -#include "atf-c/sanity.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -enum type { inv, pre, post, unreachable }; - -static -bool -grep(const atf_dynstr_t *line, const char *text) -{ - const char *l = atf_dynstr_cstring(line); - bool found; - - found = false; - - if (strstr(l, text) != NULL) - found = true; - - return found; -} - -static -void -do_test(enum type t, bool cond) -{ - int fds[2]; - pid_t pid; - - ATF_CHECK(pipe(fds) != -1); - - ATF_CHECK((pid = fork()) != -1); - if (pid == 0) { - ATF_CHECK(dup2(fds[1], STDERR_FILENO) != -1); - close(fds[0]); - close(fds[1]); - - switch (t) { - case inv: - INV(cond); - break; - - case pre: - PRE(cond); - break; - - case post: - POST(cond); - break; - - case unreachable: - if (!cond) - UNREACHABLE; - break; - } - - exit(EXIT_SUCCESS); - } else { - int ecode, i; - atf_dynstr_t lines[3]; - atf_error_t err; - - close(fds[1]); - - i = 0; - do { - err = atf_dynstr_init(&lines[i]); - if (!atf_is_error(err)) { - err = atf_io_readline(fds[0], &lines[i]); - if (!atf_is_error(err)) - i++; - } - } while (i < 3 && !atf_is_error(err)); - ATF_CHECK(i == 3); - i--; - - if (!cond) { - switch (t) { - case inv: - ATF_CHECK(grep(&lines[0], "Invariant")); - break; - - case pre: - ATF_CHECK(grep(&lines[0], "Precondition")); - break; - - case post: - ATF_CHECK(grep(&lines[0], "Postcondition")); - break; - - case unreachable: - ATF_CHECK(grep(&lines[0], "Invariant")); - break; - } - - ATF_CHECK(grep(&lines[0], __FILE__)); - ATF_CHECK(grep(&lines[2], PACKAGE_BUGREPORT)); - } - - ATF_CHECK(waitpid(pid, &ecode, 0) != -1); - if (!cond) { - ATF_CHECK(WIFSIGNALED(ecode)); - ATF_CHECK(WTERMSIG(ecode) == SIGABRT); - } else { - ATF_CHECK(WIFEXITED(ecode)); - ATF_CHECK(WEXITSTATUS(ecode) == EXIT_SUCCESS); - } - } -} - -static -void -require_ndebug(void) -{ -#if defined(NDEBUG) - atf_tc_skip("Sanity checks not available; code built with -DNDEBUG"); -#endif -} - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(inv); -ATF_TC_HEAD(inv, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the INV macro"); -} -ATF_TC_BODY(inv, tc) -{ - require_ndebug(); - - do_test(inv, false); - do_test(inv, true); -} - -ATF_TC(pre); -ATF_TC_HEAD(pre, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the PRE macro"); -} -ATF_TC_BODY(pre, tc) -{ - require_ndebug(); - - do_test(pre, false); - do_test(pre, true); -} - -ATF_TC(post); -ATF_TC_HEAD(post, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the POST macro"); -} -ATF_TC_BODY(post, tc) -{ - require_ndebug(); - - do_test(post, false); - do_test(post, true); -} - -ATF_TC(unreachable); -ATF_TC_HEAD(unreachable, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the UNREACHABLE macro"); -} -ATF_TC_BODY(unreachable, tc) -{ - require_ndebug(); - - do_test(unreachable, false); - do_test(unreachable, true); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, inv); - ATF_TP_ADD_TC(tp, pre); - ATF_TP_ADD_TC(tp, post); - ATF_TP_ADD_TC(tp, unreachable); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_signals.c b/dist/atf/tests/atf/atf-c/t_signals.c deleted file mode 100644 index 8691839de26b..000000000000 --- a/dist/atf/tests/atf/atf-c/t_signals.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 -#include -#include - -#include - -#include "atf-c/signals.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -static -void -null_handler(int signo) -{ -} - -static bool test1_happened = false; - -static -void -test1_handler(int signo) -{ - test1_happened = true; -} - -static bool test2_happened = false; - -static -void -test2_handler(int signo) -{ - test2_happened = true; -} - -/* --------------------------------------------------------------------- - * Test cases for globals. - * --------------------------------------------------------------------- */ - -ATF_TC(last_signo); -ATF_TC_HEAD(last_signo, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the value of " - "atf_signals_last_signo"); -} -ATF_TC_BODY(last_signo, tc) -{ - struct sigaction sa; - - sa.sa_handler = null_handler; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - - if (sigaction(atf_signals_last_signo, &sa, NULL) == -1) - atf_tc_fail("Failed to program last signal (number %d)", - atf_signals_last_signo); - - if (sigaction(atf_signals_last_signo + 1, &sa, NULL) != -1) - atf_tc_fail("Successfully programmed a signal after last (number %d)", - atf_signals_last_signo + 1); -} - -/* --------------------------------------------------------------------- - * Test cases for the "signal_holder" type. - * --------------------------------------------------------------------- */ - -ATF_TC(signal_holder_init); -ATF_TC_HEAD(signal_holder_init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_signal_holder_init " - "function"); -} -ATF_TC_BODY(signal_holder_init, tc) -{ - atf_signal_programmer_t sp; - atf_signal_holder_t sh; - - CE(atf_signal_programmer_init(&sp, SIGUSR1, test1_handler)); - - CE(atf_signal_holder_init(&sh, SIGUSR1)); - ATF_CHECK(!test1_happened); - ATF_CHECK(kill(getpid(), SIGUSR1) != -1); - ATF_CHECK(!test1_happened); - atf_signal_holder_fini(&sh); - - atf_signal_programmer_fini(&sp); -} - -ATF_TC(signal_holder_fini); -ATF_TC_HEAD(signal_holder_fini, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_signal_holder_fini " - "function"); -} -ATF_TC_BODY(signal_holder_fini, tc) -{ - atf_signal_programmer_t sp; - atf_signal_holder_t sh; - - CE(atf_signal_programmer_init(&sp, SIGUSR1, test1_handler)); - - printf("Checking that the signal is not delivered if it did not " - "happen\n"); - test1_happened = false; - CE(atf_signal_holder_init(&sh, SIGUSR1)); - atf_signal_holder_fini(&sh); - ATF_CHECK(!test1_happened); - printf("Checking that the original handler is restored\n"); - kill(getpid(), SIGUSR1); - ATF_CHECK(test1_happened); - - printf("Checking that the signal is delivered if it happened\n"); - test1_happened = false; - CE(atf_signal_holder_init(&sh, SIGUSR1)); - ATF_CHECK(kill(getpid(), SIGUSR1) != -1); - atf_signal_holder_fini(&sh); - ATF_CHECK(test1_happened); - - atf_signal_programmer_fini(&sp); -} - -ATF_TC(signal_holder_process); -ATF_TC_HEAD(signal_holder_process, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_signal_holder_process " - "function"); -} -ATF_TC_BODY(signal_holder_process, tc) -{ - atf_signal_programmer_t sp; - atf_signal_holder_t sh; - - CE(atf_signal_programmer_init(&sp, SIGUSR1, test1_handler)); - - printf("Checking that the signal is delivered if it happened\n"); - CE(atf_signal_holder_init(&sh, SIGUSR1)); - ATF_CHECK(kill(getpid(), SIGUSR1) != -1); - ATF_CHECK(!test1_happened); - atf_signal_holder_process(&sh); - ATF_CHECK(test1_happened); - test1_happened = false; - printf("Checking that the signal is not re-delivered during " - "destruction\n"); - atf_signal_holder_fini(&sh); - ATF_CHECK(!test1_happened); - - atf_signal_programmer_fini(&sp); -} - -/* --------------------------------------------------------------------- - * Test cases for the "signal_programmer" type. - * --------------------------------------------------------------------- */ - -ATF_TC(signal_programmer_init); -ATF_TC_HEAD(signal_programmer_init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_signal_programmer_init " - "function"); -} -ATF_TC_BODY(signal_programmer_init, tc) -{ - atf_signal_programmer_t sp; - - CE(atf_signal_programmer_init(&sp, SIGUSR1, test1_handler)); - ATF_CHECK(!test1_happened); - ATF_CHECK(kill(getpid(), SIGUSR1) != -1); - ATF_CHECK(test1_happened); - - CE(atf_signal_programmer_init(&sp, SIGUSR2, test2_handler)); - ATF_CHECK(!test2_happened); - ATF_CHECK(kill(getpid(), SIGUSR2) != -1); - ATF_CHECK(test2_happened); -} - -ATF_TC(signal_programmer_fini); -ATF_TC_HEAD(signal_programmer_fini, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_signal_programmer_fini " - "function"); -} -ATF_TC_BODY(signal_programmer_fini, tc) -{ - atf_signal_programmer_t sp1, sp2; - - CE(atf_signal_programmer_init(&sp1, SIGUSR1, test1_handler)); - CE(atf_signal_programmer_init(&sp2, SIGUSR1, test2_handler)); - - test1_happened = test2_happened = false; - kill(getpid(), SIGUSR1); - ATF_CHECK(!test1_happened); - ATF_CHECK(test2_happened); - - atf_signal_programmer_fini(&sp2); - - test1_happened = test2_happened = false; - kill(getpid(), SIGUSR1); - ATF_CHECK(test1_happened); - ATF_CHECK(!test2_happened); - - atf_signal_programmer_fini(&sp1); -} - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(signal_reset); -ATF_TC_HEAD(signal_reset, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_signal_reset function"); -} -ATF_TC_BODY(signal_reset, tc) -{ - pid_t pid = fork(); - ATF_CHECK(pid != -1); - if (pid == 0) { - struct sigaction sa; - - sa.sa_handler = test1_handler; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - - ATF_CHECK(sigaction(SIGTERM, &sa, NULL) != -1); - ATF_CHECK(!test1_happened); - kill(getpid(), SIGTERM); - ATF_CHECK(test1_happened); - - test1_happened = false; - atf_signal_reset(SIGTERM); - kill(getpid(), SIGTERM); - - printf("Signal was not resetted correctly\n"); - abort(); - } else { - int ecode; - - ATF_CHECK(waitpid(pid, &ecode, 0) != -1); - ATF_CHECK(WIFEXITED(ecode) || WIFSIGNALED(ecode)); - ATF_CHECK(!WIFSIGNALED(ecode) || WTERMSIG(ecode) == SIGTERM); - } -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Add the tests for globals. */ - ATF_TP_ADD_TC(tp, last_signo); - - /* Add the tests for the "signal_holder" type. */ - ATF_TP_ADD_TC(tp, signal_holder_init); - ATF_TP_ADD_TC(tp, signal_holder_fini); - ATF_TP_ADD_TC(tp, signal_holder_process); - - /* Add the tests for the "signal_programmer" type. */ - ATF_TP_ADD_TC(tp, signal_programmer_init); - ATF_TP_ADD_TC(tp, signal_programmer_fini); - - /* Add the tests for the free functions. */ - ATF_TP_ADD_TC(tp, signal_reset); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_tc.c b/dist/atf/tests/atf/atf-c/t_tc.c deleted file mode 100644 index 8c3df689fa8d..000000000000 --- a/dist/atf/tests/atf/atf-c/t_tc.c +++ /dev/null @@ -1,196 +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 "atf-c/tcr.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Auxiliary test cases. - * --------------------------------------------------------------------- */ - -ATF_TC_HEAD(empty, tc) -{ -} - -ATF_TC_HEAD(test_var, tc) -{ - atf_tc_set_md_var(tc, "test-var", "Test text"); -} - -ATF_TC_BODY(empty, tc) -{ -} - -/* --------------------------------------------------------------------- - * Test cases for the "atf_tc_t" type. - * --------------------------------------------------------------------- */ - -ATF_TC(init); -ATF_TC_HEAD(init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_init function"); -} -ATF_TC_BODY(init, tcin) -{ - atf_tc_t tc; - - CE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty), - ATF_TC_BODY_NAME(empty), NULL, NULL)); - ATF_CHECK(strcmp(atf_tc_get_ident(&tc), "test1") == 0); - ATF_CHECK(!atf_tc_has_md_var(&tc, "test-var")); - atf_tc_fini(&tc); - - CE(atf_tc_init(&tc, "test2", ATF_TC_HEAD_NAME(test_var), - ATF_TC_BODY_NAME(empty), NULL, NULL)); - ATF_CHECK(strcmp(atf_tc_get_ident(&tc), "test2") == 0); - ATF_CHECK(atf_tc_has_md_var(&tc, "test-var")); - atf_tc_fini(&tc); -} - -ATF_TC(init_pack); -ATF_TC_HEAD(init_pack, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_init_pack function"); -} -ATF_TC_BODY(init_pack, tcin) -{ - atf_tc_t tc; - atf_tc_pack_t tcp1 = { - .m_ident = "test1", - .m_head = ATF_TC_HEAD_NAME(empty), - .m_body = ATF_TC_BODY_NAME(empty), - .m_cleanup = NULL, - }; - atf_tc_pack_t tcp2 = { - .m_ident = "test2", - .m_head = ATF_TC_HEAD_NAME(test_var), - .m_body = ATF_TC_BODY_NAME(empty), - .m_cleanup = NULL, - }; - - CE(atf_tc_init_pack(&tc, &tcp1, NULL)); - ATF_CHECK(strcmp(atf_tc_get_ident(&tc), "test1") == 0); - ATF_CHECK(!atf_tc_has_md_var(&tc, "test-var")); - atf_tc_fini(&tc); - - CE(atf_tc_init_pack(&tc, &tcp2, NULL)); - ATF_CHECK(strcmp(atf_tc_get_ident(&tc), "test2") == 0); - ATF_CHECK(atf_tc_has_md_var(&tc, "test-var")); - atf_tc_fini(&tc); -} - -ATF_TC(vars); -ATF_TC_HEAD(vars, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_get_md_var, " - "atf_tc_has_md_var and atf_tc_set_md_var functions"); -} -ATF_TC_BODY(vars, tcin) -{ - atf_tc_t tc; - - CE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty), - ATF_TC_BODY_NAME(empty), NULL, NULL)); - ATF_CHECK(!atf_tc_has_md_var(&tc, "test-var")); - CE(atf_tc_set_md_var(&tc, "test-var", "Test value")); - ATF_CHECK(atf_tc_has_md_var(&tc, "test-var")); - ATF_CHECK(strcmp(atf_tc_get_md_var(&tc, "test-var"), "Test value") == 0); - atf_tc_fini(&tc); -} - -ATF_TC(config); -ATF_TC_HEAD(config, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_get_config_var, " - "atf_tc_get_config_var_wd and atf_tc_has_config_var " - "functions"); -} -ATF_TC_BODY(config, tcin) -{ - atf_tc_t tc; - atf_map_t config; - - CE(atf_map_init(&config)); - CE(atf_map_insert(&config, "test-var", strdup("test-value"), true)); - - CE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty), - ATF_TC_BODY_NAME(empty), NULL, NULL)); - ATF_CHECK(!atf_tc_has_config_var(&tc, "test-var")); - ATF_CHECK(!atf_tc_has_md_var(&tc, "test-var")); - atf_tc_fini(&tc); - - CE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty), - ATF_TC_BODY_NAME(empty), NULL, &config)); - ATF_CHECK(atf_tc_has_config_var(&tc, "test-var")); - ATF_CHECK(strcmp(atf_tc_get_config_var(&tc, "test-var"), - "test-value") == 0); - ATF_CHECK(!atf_tc_has_md_var(&tc, "test-var")); - ATF_CHECK(!atf_tc_has_config_var(&tc, "test-var2")); - ATF_CHECK(strcmp(atf_tc_get_config_var_wd(&tc, "test-var2", "def-value"), - "def-value") == 0); - atf_tc_fini(&tc); - - atf_map_fini(&config); -} - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -/* TODO: Add test cases for atf_tc_run. This is going to be very tough, - * but good tests here could allow us to avoid much of the indirect - * testing done later on. */ - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Add the test cases for the "atf_tcr_t" type. */ - ATF_TP_ADD_TC(tp, init); - ATF_TP_ADD_TC(tp, init_pack); - ATF_TP_ADD_TC(tp, vars); - ATF_TP_ADD_TC(tp, config); - - /* Add the test cases for the free functions. */ - /* TODO */ - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_tcr.c b/dist/atf/tests/atf/atf-c/t_tcr.c deleted file mode 100644 index 3d777f5e32db..000000000000 --- a/dist/atf/tests/atf/atf-c/t_tcr.c +++ /dev/null @@ -1,150 +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 "atf-c/tcr.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Test cases for the "atf_tcr_t" type. - * --------------------------------------------------------------------- */ - -ATF_TC(init); -ATF_TC_HEAD(init, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tcr_init function"); -} -ATF_TC_BODY(init, tc) -{ - atf_tcr_t tcr; - - CE(atf_tcr_init(&tcr, atf_tcr_passed_state)); - atf_tcr_fini(&tcr); -} - -ATF_TC(init_reason); -ATF_TC_HEAD(init_reason, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tcr_init_reason_fmt " - "function"); -} -ATF_TC_BODY(init_reason, tc) -{ - atf_tcr_t tcr; - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_failed_state, "The reason")); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_failed_state, "The reason " - "with %s %d", "string", 5)); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_skipped_state, "The reason")); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_skipped_state, "The reason " - "with %s %d", "string", 5)); - atf_tcr_fini(&tcr); -} - -ATF_TC(get_state); -ATF_TC_HEAD(get_state, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tcr_get_state function"); -} -ATF_TC_BODY(get_state, tc) -{ - atf_tcr_t tcr; - - CE(atf_tcr_init(&tcr, atf_tcr_passed_state)); - ATF_CHECK_EQUAL(atf_tcr_get_state(&tcr), atf_tcr_passed_state); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_failed_state, "The reason")); - ATF_CHECK_EQUAL(atf_tcr_get_state(&tcr), atf_tcr_failed_state); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_skipped_state, "The reason")); - ATF_CHECK_EQUAL(atf_tcr_get_state(&tcr), atf_tcr_skipped_state); - atf_tcr_fini(&tcr); -} - -ATF_TC(get_reason); -ATF_TC_HEAD(get_reason, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_tcr_get_reason function"); -} -ATF_TC_BODY(get_reason, tc) -{ - atf_tcr_t tcr; - const atf_dynstr_t *reason; - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_failed_state, "Failed")); - reason = atf_tcr_get_reason(&tcr); - ATF_CHECK(atf_equal_dynstr_cstring(reason, "Failed")); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_failed_state, "Failed with " - "%s %d", "string", 5)); - reason = atf_tcr_get_reason(&tcr); - ATF_CHECK(atf_equal_dynstr_cstring(reason, "Failed with string 5")); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_skipped_state, "Skipped")); - reason = atf_tcr_get_reason(&tcr); - ATF_CHECK(atf_equal_dynstr_cstring(reason, "Skipped")); - atf_tcr_fini(&tcr); - - CE(atf_tcr_init_reason_fmt(&tcr, atf_tcr_skipped_state, "Skipped with " - "%s %d", "string", 5)); - reason = atf_tcr_get_reason(&tcr); - ATF_CHECK(atf_equal_dynstr_cstring(reason, "Skipped with string 5")); - atf_tcr_fini(&tcr); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Add the test cases for the "atf_tcr_t" type. */ - ATF_TP_ADD_TC(tp, init); - ATF_TP_ADD_TC(tp, init_reason); - ATF_TP_ADD_TC(tp, get_state); - ATF_TP_ADD_TC(tp, get_reason); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_text.c b/dist/atf/tests/atf/atf-c/t_text.c deleted file mode 100644 index 3dc176480a18..000000000000 --- a/dist/atf/tests/atf/atf-c/t_text.c +++ /dev/null @@ -1,246 +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 "atf-c/text.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -static -atf_error_t -word_acum(const char *word, void *data) -{ - char *acum = data; - - strcat(acum, word); - - return atf_no_error(); -} - -static -atf_error_t -word_count(const char *word, void *data) -{ - size_t *counter = data; - - (*counter)++; - - return atf_no_error(); -} - -ATF_TC(for_each_word); -ATF_TC_HEAD(for_each_word, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_text_for_each_word" - "function"); -} -ATF_TC_BODY(for_each_word, tc) -{ - size_t cnt; - char acum[1024]; - - cnt = 0; - strcpy(acum, ""); - CE(atf_text_for_each_word("1 2 3", " ", word_count, &cnt)); - CE(atf_text_for_each_word("1 2 3", " ", word_acum, acum)); - ATF_CHECK(cnt == 3); - ATF_CHECK(strcmp(acum, "123") == 0); - - cnt = 0; - strcpy(acum, ""); - CE(atf_text_for_each_word("1 2 3", ".", word_count, &cnt)); - CE(atf_text_for_each_word("1 2 3", ".", word_acum, acum)); - ATF_CHECK(cnt == 1); - ATF_CHECK(strcmp(acum, "1 2 3") == 0); - - cnt = 0; - strcpy(acum, ""); - CE(atf_text_for_each_word("1 2 3 4 5", " ", word_count, &cnt)); - CE(atf_text_for_each_word("1 2 3 4 5", " ", word_acum, acum)); - ATF_CHECK(cnt == 5); - ATF_CHECK(strcmp(acum, "12345") == 0); - - cnt = 0; - strcpy(acum, ""); - CE(atf_text_for_each_word("1 2.3.4 5", " .", word_count, &cnt)); - CE(atf_text_for_each_word("1 2.3.4 5", " .", word_acum, acum)); - ATF_CHECK(cnt == 5); - ATF_CHECK(strcmp(acum, "12345") == 0); -} - -ATF_TC(format); -ATF_TC_HEAD(format, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of free-form " - "strings using a variable parameters list"); -} -ATF_TC_BODY(format, tc) -{ - char *str; - atf_error_t err; - - err = atf_text_format(&str, "%s %s %d", "Test", "string", 1); - ATF_CHECK(!atf_is_error(err)); - ATF_CHECK(strcmp(str, "Test string 1") == 0); - free(str); -} - -static -void -format_ap(char **dest, const char *fmt, ...) -{ - va_list ap; - atf_error_t err; - - va_start(ap, fmt); - err = atf_text_format_ap(dest, fmt, ap); - va_end(ap); - - ATF_CHECK(!atf_is_error(err)); -} - -ATF_TC(format_ap); -ATF_TC_HEAD(format_ap, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the construction of free-form " - "strings using a va_list argument"); -} -ATF_TC_BODY(format_ap, tc) -{ - char *str; - - format_ap(&str, "%s %s %d", "Test", "string", 1); - ATF_CHECK(strcmp(str, "Test string 1") == 0); - free(str); -} - -ATF_TC(to_bool); -ATF_TC_HEAD(to_bool, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_text_to_bool function"); -} -ATF_TC_BODY(to_bool, tc) -{ - bool b; - - CE(atf_text_to_bool("true", &b)); ATF_CHECK(b); - CE(atf_text_to_bool("TRUE", &b)); ATF_CHECK(b); - CE(atf_text_to_bool("yes", &b)); ATF_CHECK(b); - CE(atf_text_to_bool("YES", &b)); ATF_CHECK(b); - - CE(atf_text_to_bool("false", &b)); ATF_CHECK(!b); - CE(atf_text_to_bool("FALSE", &b)); ATF_CHECK(!b); - CE(atf_text_to_bool("no", &b)); ATF_CHECK(!b); - CE(atf_text_to_bool("NO", &b)); ATF_CHECK(!b); - - b = false; - ATF_CHECK(atf_is_error(atf_text_to_bool("", &b))); - ATF_CHECK(!b); - b = true; - ATF_CHECK(atf_is_error(atf_text_to_bool("", &b))); - ATF_CHECK(b); - - b = false; - ATF_CHECK(atf_is_error(atf_text_to_bool("tru", &b))); - ATF_CHECK(!b); - b = true; - ATF_CHECK(atf_is_error(atf_text_to_bool("tru", &b))); - ATF_CHECK(b); - - b = false; - ATF_CHECK(atf_is_error(atf_text_to_bool("true2", &b))); - ATF_CHECK(!b); - b = true; - ATF_CHECK(atf_is_error(atf_text_to_bool("true2", &b))); - ATF_CHECK(b); - - b = false; - ATF_CHECK(atf_is_error(atf_text_to_bool("fals", &b))); - ATF_CHECK(!b); - b = true; - ATF_CHECK(atf_is_error(atf_text_to_bool("fals", &b))); - ATF_CHECK(b); - - b = false; - ATF_CHECK(atf_is_error(atf_text_to_bool("false2", &b))); - ATF_CHECK(!b); - b = true; - ATF_CHECK(atf_is_error(atf_text_to_bool("false2", &b))); - ATF_CHECK(b); -} - -ATF_TC(to_long); -ATF_TC_HEAD(to_long, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks the atf_text_to_long function"); -} -ATF_TC_BODY(to_long, tc) -{ - long l; - - CE(atf_text_to_long("0", &l)); ATF_CHECK_EQUAL(l, 0); - CE(atf_text_to_long("-5", &l)); ATF_CHECK_EQUAL(l, -5); - CE(atf_text_to_long("5", &l)); ATF_CHECK_EQUAL(l, 5); - CE(atf_text_to_long("123456789", &l)); ATF_CHECK_EQUAL(l, 123456789); - - l = 1212; - ATF_CHECK(atf_is_error(atf_text_to_long("", &l))); - ATF_CHECK_EQUAL(l, 1212); - ATF_CHECK(atf_is_error(atf_text_to_long("foo", &l))); - ATF_CHECK_EQUAL(l, 1212); - ATF_CHECK(atf_is_error(atf_text_to_long("1234x", &l))); - ATF_CHECK_EQUAL(l, 1212); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, for_each_word); - ATF_TP_ADD_TC(tp, format); - ATF_TP_ADD_TC(tp, format_ap); - ATF_TP_ADD_TC(tp, to_bool); - ATF_TP_ADD_TC(tp, to_long); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_ui.c b/dist/atf/tests/atf/atf-c/t_ui.c deleted file mode 100644 index 3b4b585b5dbb..000000000000 --- a/dist/atf/tests/atf/atf-c/t_ui.c +++ /dev/null @@ -1,478 +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 "atf-c/dynstr.h" -#include "atf-c/env.h" -#include "atf-c/ui.h" - -struct test { - const char *tc; - const char *tag; - bool repeat; - size_t col; - const char *fmt; - const char *result; -} tests[] = { - /* - * wo_tag - */ - - { - "wo_tag", - "", - false, - 0, - "12345", - "12345", - }, - - { - "wo_tag", - "", - false, - 0, - "12345 ", - "12345", - }, - - { - "wo_tag", - "", - false, - 0, - "12345 7890", - "12345 7890", - }, - - { - "wo_tag", - "", - false, - 0, - "12345 789012 45", - "12345 789012 45", - }, - - { - "wo_tag", - "", - false, - 0, - "12345 789012 456", - "12345 789012\n456", - }, - - { - "wo_tag", - "", - false, - 0, - "1234567890123456", - "1234567890123456", - }, - - { - "wo_tag", - "", - false, - 0, - " 2345678901234567", - "\n2345678901234567", - }, - - { - "wo_tag", - "", - false, - 0, - "12345 789012345 78", - "12345 789012345\n78", - }, - - /* - * wo_tag_col - */ - - { - "wo_tag_col", - "", - false, - 10, - "12345", - " 12345", - }, - - { - "wo_tag_col", - "", - false, - 10, - "12345 7890", - " 12345\n" - " 7890", - }, - - { - "wo_tag_col", - "", - false, - 10, - "1 3 5 7 9", - " 1 3 5\n" - " 7 9", - }, - - /* - * w_tag_no_repeat - */ - - { - "w_tag_no_repeat", - "1234: ", - false, - 0, - "789012345", - "1234: 789012345", - }, - - { - "w_tag_no_repeat", - "1234: ", - false, - 0, - "789 1234 56789", - "1234: 789 1234\n" - " 56789", - }, - - { - "w_tag_no_repeat", - "1234: ", - false, - 0, - "789012345", - "1234: 789012345", - }, - - { - "w_tag_no_repeat", - "1234: ", - false, - 0, - "789012345 7890", - "1234: 789012345\n" - " 7890", - }, - - /* - * w_tag_repeat - */ - - { - "w_tag_repeat", - "1234: ", - true, - 0, - "789012345", - "1234: 789012345", - }, - - { - "w_tag_repeat", - "1234: ", - true, - 0, - "789 1234 56789", - "1234: 789 1234\n" - "1234: 56789", - }, - - { - "w_tag_repeat", - "1234: ", - true, - 0, - "789012345", - "1234: 789012345", - }, - - { - "w_tag_no_repeat", - "1234: ", - true, - 0, - "789012345 7890", - "1234: 789012345\n" - "1234: 7890", - }, - - /* - * w_tag_col - */ - - { - "w_tag_col", - "1234:", - false, - 10, - "1 3 5", - "1234: 1 3 5", - }, - - { - "w_tag_col", - "1234:", - false, - 10, - "1 3 5 7 9", - "1234: 1 3 5\n" - " 7 9", - }, - - { - "w_tag_col", - "1234:", - true, - 10, - "1 3 5 7 9", - "1234: 1 3 5\n" - "1234: 7 9", - }, - - /* - * paragraphs - */ - - { - "paragraphs", - "", - false, - 0, - "1 3 5\n\n", - "1 3 5" - }, - - { - "paragraphs", - "", - false, - 0, - "1 3 5\n2 4 6", - "1 3 5\n\n2 4 6" - }, - - { - "paragraphs", - "", - false, - 0, - "1234 6789 123456\n2 4 6", - "1234 6789\n123456\n\n2 4 6" - }, - - { - "paragraphs", - "12: ", - false, - 0, - "56789 123456\n2 4 6", - "12: 56789\n 123456\n\n 2 4 6" - }, - - { - "paragraphs", - "12: ", - true, - 0, - "56789 123456\n2 4 6", - "12: 56789\n12: 123456\n12: \n12: 2 4 6" - }, - - { - "paragraphs", - "12:", - false, - 4, - "56789 123456\n2 4 6", - "12: 56789\n 123456\n\n 2 4 6" - }, - - { - "paragraphs", - "12:", - true, - 4, - "56789 123456\n2 4 6", - "12: 56789\n12: 123456\n12:\n12: 2 4 6" - }, - - /* - * end - */ - - { - NULL, - NULL, - false, - 0, - NULL, - NULL, - }, -}; - -static -void -run_tests(const char *tc) -{ - struct test *t; - - printf("Running tests for '%s'\n", tc); - - atf_env_set("COLUMNS", "15"); - - for (t = &tests[0]; t->tc != NULL; t++) { - if (strcmp(t->tc, tc) == 0) { - atf_dynstr_t str; - atf_error_t err; - - printf("\n"); - printf("Testing with tag '%s', %s, col '%zd'\n", - t->tag, t->repeat ? "repeat" : "no repeat", t->col); - printf("Input: >>>%s<<<\n", t->fmt); - printf("Expected output: >>>%s<<<\n", t->result); - - err = atf_dynstr_init(&str); - ATF_CHECK(!atf_is_error(err)); - atf_ui_format_fmt(&str, t->tag, t->repeat, t->col, t->fmt); - printf("Output : >>>%s<<<\n", atf_dynstr_cstring(&str)); - ATF_CHECK(atf_equal_dynstr_cstring(&str, t->result)); - atf_dynstr_fini(&str); - } - } -} - -ATF_TC(wo_tag); -ATF_TC_HEAD(wo_tag, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting without tags"); -} -ATF_TC_BODY(wo_tag, tc) -{ - run_tests("wo_tag"); -} - -ATF_TC(wo_tag_col); -ATF_TC_HEAD(wo_tag_col, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting without tags and with " - "a non-zero starting column"); -} -ATF_TC_BODY(wo_tag_col, tc) -{ - run_tests("wo_tag_col"); -} - -ATF_TC(w_tag_no_repeat); -ATF_TC_HEAD(w_tag_no_repeat, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting with a tag"); -} -ATF_TC_BODY(w_tag_no_repeat, tc) -{ - run_tests("w_tag_no_repeat"); -} - -ATF_TC(w_tag_repeat); -ATF_TC_HEAD(w_tag_repeat, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting with a tag and " - "repeating it on each line"); -} -ATF_TC_BODY(w_tag_repeat, tc) -{ - run_tests("w_tag_repeat"); -} - -ATF_TC(w_tag_col); -ATF_TC_HEAD(w_tag_col, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting with a tag and " - "starting at a column greater than its length"); -} -ATF_TC_BODY(w_tag_col, tc) -{ - run_tests("w_tag_col"); -} - -ATF_TC(paragraphs); -ATF_TC_HEAD(paragraphs, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting a string that " - "contains multiple paragraphs"); -} -ATF_TC_BODY(paragraphs, tc) -{ - run_tests("paragraphs"); -} - -ATF_TC(format); -ATF_TC_HEAD(format, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks formatting with a variable list " - "of arguments"); -} -ATF_TC_BODY(format, tc) -{ - atf_dynstr_t str; - atf_error_t err; - - err = atf_dynstr_init(&str); - ATF_CHECK(!atf_is_error(err)); - atf_ui_format_fmt(&str, "", false, 0, "Test %s %d", "string", 1); - ATF_CHECK(atf_equal_dynstr_cstring(&str, "Test string 1")); - atf_dynstr_fini(&str); -} - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, wo_tag); - ATF_TP_ADD_TC(tp, wo_tag_col); - ATF_TP_ADD_TC(tp, w_tag_no_repeat); - ATF_TP_ADD_TC(tp, w_tag_repeat); - ATF_TP_ADD_TC(tp, w_tag_col); - ATF_TP_ADD_TC(tp, paragraphs); - ATF_TP_ADD_TC(tp, format); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-c/t_user.c b/dist/atf/tests/atf/atf-c/t_user.c deleted file mode 100644 index 2c05b0b328f2..000000000000 --- a/dist/atf/tests/atf/atf-c/t_user.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 - -#include - -#include "atf-c/user.h" - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(euid); -ATF_TC_HEAD(euid, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_user_euid function"); -} -ATF_TC_BODY(euid, tc) -{ - ATF_CHECK_EQUAL(atf_user_euid(), geteuid()); -} - -ATF_TC(is_member_of_group); -ATF_TC_HEAD(is_member_of_group, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_user_is_member_of_group " - "function"); -} -ATF_TC_BODY(is_member_of_group, tc) -{ - gid_t gids[NGROUPS_MAX]; - gid_t g, maxgid; - int ngids; - - { - int i; - - ngids = getgroups(NGROUPS_MAX, gids); - if (ngids == -1) - atf_tc_fail("Call to getgroups failed"); - maxgid = 0; - for (i = 0; i < ngids; i++) { - if (maxgid < gids[i]) - maxgid = gids[i]; - } - printf("User belongs to %d groups\n", ngids); - printf("Last GID is %d\n", maxgid); - } - - for (g = 0; g < maxgid; g++) { - bool found = false; - int i; - - for (i = 0; !found && i < ngids; i++) { - if (gids[i] == g) - found = true; - } - - if (found) { - printf("Checking if user belongs to group %d\n", g); - ATF_CHECK(atf_user_is_member_of_group(g)); - } else { - printf("Checking if user does not belong to group %d\n", g); - ATF_CHECK(!atf_user_is_member_of_group(g)); - } - } -} - -ATF_TC(is_root); -ATF_TC_HEAD(is_root, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_user_is_root function"); -} -ATF_TC_BODY(is_root, tc) -{ - if (geteuid() == 0) - ATF_CHECK(atf_user_is_root()); - else - ATF_CHECK(!atf_user_is_root()); -} - -ATF_TC(is_unprivileged); -ATF_TC_HEAD(is_unprivileged, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_user_is_unprivileged " - "function"); -} -ATF_TC_BODY(is_unprivileged, tc) -{ - if (geteuid() != 0) - ATF_CHECK(atf_user_is_unprivileged()); - else - ATF_CHECK(!atf_user_is_unprivileged()); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, euid); - ATF_TP_ADD_TC(tp, is_member_of_group); - ATF_TP_ADD_TC(tp, is_root); - ATF_TP_ADD_TC(tp, is_unprivileged); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/atf-sh/Atffile b/dist/atf/tests/atf/atf-sh/Atffile deleted file mode 100644 index 713575ebf943..000000000000 --- a/dist/atf/tests/atf/atf-sh/Atffile +++ /dev/null @@ -1,9 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: t_tc -tp: t_tp -tp: t_normalize -tp: t_config -tp: t_atf_check diff --git a/dist/atf/tests/atf/atf-sh/h_misc.sh b/dist/atf/tests/atf/atf-sh/h_misc.sh deleted file mode 100644 index b842b89fb41f..000000000000 --- a/dist/atf/tests/atf/atf-sh/h_misc.sh +++ /dev/null @@ -1,294 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# ------------------------------------------------------------------------- -# Helper tests for "t_atf_check". -# ------------------------------------------------------------------------- - -atf_test_case atf_check_info_ok -atf_check_info_ok_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_info_ok_body() -{ - atf_check 'true' 0 null null -} - -atf_test_case atf_check_info_fail -atf_check_info_fail_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_info_fail_body() -{ - atf_check 'false' 1 null null -} - -atf_test_case atf_check_expout_mismatch -atf_check_expout_mismatch_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_expout_mismatch_body() -{ - cat >expout <experr <&2' 0 null experr -} - -atf_test_case atf_check_null_stdout -atf_check_null_stdout_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_null_stdout_body() -{ - atf_check 'echo "These are the contents"' 0 null null -} - -atf_test_case atf_check_null_stderr -atf_check_null_stderr_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_null_stderr_body() -{ - atf_check 'echo "These are the contents" 1>&2' 0 null null -} - -atf_test_case atf_check_change_cwd -atf_check_change_cwd_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_change_cwd_body() -{ - mkdir foo - chmod 555 foo - cd foo - atf_check 'echo Hello' 0 stdout null - cd - - test -f stdout || atf_fail "Used incorrect work directory" - echo Hello >bar - cmp -s stdout bar || atf_fail "Used incorrect work directory" -} - -atf_test_case atf_check_equal_ok -atf_check_equal_ok_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_equal_ok_body() -{ - atf_check_equal a a -} - -atf_test_case atf_check_equal_fail -atf_check_equal_fail_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_equal_fail_body() -{ - atf_check_equal a b -} - -atf_test_case atf_check_equal_eval_ok -atf_check_equal_eval_ok_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_equal_eval_ok_body() -{ - x=a - y=a - atf_check_equal '${x}' '${y}' -} - -atf_test_case atf_check_equal_eval_fail -atf_check_equal_eval_fail_head() -{ - atf_set "descr" "Helper test case for the t_atf_check test program" -} -atf_check_equal_eval_fail_body() -{ - x=a - y=b - atf_check_equal '${x}' '${y}' -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_config". -# ------------------------------------------------------------------------- - -atf_test_case config_get -config_get_head() -{ - atf_set "descr" "Helper test case for the t_config test program" -} -config_get_body() -{ - if atf_config_has ${TEST_VARIABLE}; then - echo "${TEST_VARIABLE} = $(atf_config_get ${TEST_VARIABLE})" - fi -} - -atf_test_case config_has -config_has_head() -{ - atf_set "descr" "Helper test case for the t_config test program" -} -config_has_body() -{ - if atf_config_has ${TEST_VARIABLE}; then - echo "${TEST_VARIABLE} found" - else - echo "${TEST_VARIABLE} not found" - fi -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_normalize". -# ------------------------------------------------------------------------- - -atf_test_case normalize -normalize_head() -{ - atf_set "descr" "Helper test case for the t_normalize test program" - atf_set "a.b" "test value 1" - atf_set "c-d" "test value 2" -} -normalize_body() -{ - echo "a.b: $(atf_get a.b)" - echo "c-d: $(atf_get c-d)" -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_tc". -# ------------------------------------------------------------------------- - -atf_test_case tc_pass_true -tc_pass_true_head() -{ - atf_set "descr" "Helper test case for the t_tc test program" -} -tc_pass_true_body() -{ - true -} - -atf_test_case tc_pass_false -tc_pass_false_head() -{ - atf_set "descr" "Helper test case for the t_tc test program" -} -tc_pass_false_body() -{ - false -} - -atf_test_case tc_fail -tc_fail_head() -{ - atf_set "descr" "Helper test case for the t_tc test program" -} -tc_fail_body() -{ - echo "An error" 1>&2 - exit 1 -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_tp". -# ------------------------------------------------------------------------- - -atf_test_case tp_srcdir -tp_srcdir_head() -{ - atf_set "descr" "Helper test case for the t_tp test program" -} -tp_srcdir_body() -{ - echo "Calling helper" - helper_subr || atf_fail "Could not call helper subroutine" -} - -# ------------------------------------------------------------------------- -# Main. -# ------------------------------------------------------------------------- - -atf_init_test_cases() -{ - # Add helper tests for t_atf_check. - atf_add_test_case atf_check_info_ok - atf_add_test_case atf_check_info_fail - atf_add_test_case atf_check_expout_mismatch - atf_add_test_case atf_check_experr_mismatch - atf_add_test_case atf_check_null_stdout - atf_add_test_case atf_check_null_stderr - atf_add_test_case atf_check_change_cwd - atf_add_test_case atf_check_equal_ok - atf_add_test_case atf_check_equal_fail - atf_add_test_case atf_check_equal_eval_ok - atf_add_test_case atf_check_equal_eval_fail - - # Add helper tests for t_config. - atf_add_test_case config_get - atf_add_test_case config_has - - # Add helper tests for t_normalize. - atf_add_test_case normalize - - # Add helper tests for t_tc. - atf_add_test_case tc_pass_true - atf_add_test_case tc_pass_false - atf_add_test_case tc_fail - - # Add helper tests for t_tp. - [ -f $(atf_get_srcdir)/subrs ] && . $(atf_get_srcdir)/subrs - atf_add_test_case tp_srcdir -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/atf-sh/t_atf_check.sh b/dist/atf/tests/atf/atf-sh/t_atf_check.sh deleted file mode 100644 index 030153222ed6..000000000000 --- a/dist/atf/tests/atf/atf-sh/t_atf_check.sh +++ /dev/null @@ -1,186 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# TODO: Bring in the checks in the bootstrap testsuite for atf_check. - -atf_test_case info_ok -info_ok_head() -{ - atf_set "descr" "Verifies that atf_check prints an informative" \ - "message even when the command is successful" -} -info_ok_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_info_ok 3>resout" 0 stdout stderr - grep 'Checking command.*true' stdout >/dev/null || \ - atf_fail "atf_check does not print an informative message" - - atf_check "${h} -r3 atf_check_info_fail 3>resout" 0 stdout stderr - grep 'Checking command.*false' stdout >/dev/null || \ - atf_fail "atf_check does not print an informative message" -} - -atf_test_case expout_mismatch -expout_mismatch_head() -{ - atf_set "descr" "Verifies that atf_check prints a diff of the" \ - "stdout and the expected stdout if the two do no" \ - "match" -} -expout_mismatch_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_expout_mismatch 3>resout" 1 stdout stderr - grep 'Checking command.*echo bar' stdout >/dev/null || \ - atf_fail "atf_check does not print an informative message" - grep 'stdout:' stdout >/dev/null || \ - atf_fail "atf_check does not print the stdout header" - grep 'stderr:' stdout >/dev/null && \ - atf_fail "atf_check prints the stdout header" - grep '^-foo' stdout >/dev/null || \ - atf_fail "atf_check does not print the stdout's diff" - grep '^+bar' stdout >/dev/null || \ - atf_fail "atf_check does not print the stdout's diff" -} - -atf_test_case experr_mismatch -experr_mismatch_head() -{ - atf_set "descr" "Verifies that atf_check prints a diff of the" \ - "stderr and the expected stderr if the two do no" \ - "match" -} -experr_mismatch_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_experr_mismatch 3>resout" 1 stdout stderr - grep 'Checking command.*echo bar' stdout >/dev/null || \ - atf_fail "atf_check does not print an informative message" - grep 'stdout:' stdout >/dev/null && \ - atf_fail "atf_check prints the stdout header" - grep 'stderr:' stdout >/dev/null || \ - atf_fail "atf_check does not print the stderr header" - grep '^-foo' stdout >/dev/null || \ - atf_fail "atf_check does not print the stderr's diff" - grep '^+bar' stdout >/dev/null || \ - atf_fail "atf_check does not print the stderr's diff" -} - -atf_test_case null_stdout -null_stdout_head() -{ - atf_set "descr" "Verifies that atf_check prints a the stdout it got" \ - "when it was supposed to be null" -} -null_stdout_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_null_stdout 3>resout" 1 stdout stderr - grep 'Checking command.*echo.*These.*contents' stdout >/dev/null || \ - atf_fail "atf_check does not print an informative message" - grep 'stdout:' stdout >/dev/null || \ - atf_fail "atf_check does not print the stdout header" - grep 'stderr:' stdout >/dev/null && \ - atf_fail "atf_check prints the stderr header" - grep 'These are the contents' stdout >/dev/null || \ - atf_fail "atf_check does not print stdout's contents" -} - -atf_test_case null_stderr -null_stderr_head() -{ - atf_set "descr" "Verifies that atf_check prints a the stderr it got" \ - "when it was supposed to be null" -} -null_stderr_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_null_stderr 3>resout" 1 stdout stderr - grep 'Checking command.*echo.*These.*contents' stdout >/dev/null || \ - atf_fail "atf_check does not print an informative message" - grep 'stdout:' stdout >/dev/null && \ - atf_fail "atf_check prints the stdout header" - grep 'stderr:' stdout >/dev/null || \ - atf_fail "atf_check does not print the stderr header" - grep 'These are the contents' stdout >/dev/null || \ - atf_fail "atf_check does not print stderr's contents" -} - -atf_test_case change_cwd -change_cwd_head() -{ - atf_set "descr" "Verifies that atf_check uses the correct work" \ - "directory even if changing the current one" -} -change_cwd_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_change_cwd 3>resout" 0 stdout stderr - atf_check 'grep -i passed resout' 0 ignore null -} - -atf_test_case equal -equal_head() -{ - atf_set "descr" "Verifies that atf_check_equal works" -} -equal_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - - atf_check "${h} -r3 atf_check_equal_ok 3>resout" 0 ignore ignore - - atf_check "${h} -r3 atf_check_equal_fail 3>resout" 1 ignore ignore - atf_check 'grep "a != b (a != b)" resout' 0 ignore null - - atf_check "${h} -r3 atf_check_equal_eval_ok 3>resout" 0 ignore ignore - - atf_check "${h} -r3 atf_check_equal_eval_fail 3>resout" 1 ignore ignore - atf_check 'grep "\${x} != \${y} (a != b)" resout' 0 ignore null -} - -atf_init_test_cases() -{ - atf_add_test_case info_ok - atf_add_test_case expout_mismatch - atf_add_test_case experr_mismatch - atf_add_test_case null_stdout - atf_add_test_case null_stderr - atf_add_test_case change_cwd - atf_add_test_case equal -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/atf-sh/t_config.sh b/dist/atf/tests/atf/atf-sh/t_config.sh deleted file mode 100644 index 250b5aef4404..000000000000 --- a/dist/atf/tests/atf/atf-sh/t_config.sh +++ /dev/null @@ -1,83 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case has -has_head() -{ - atf_set "descr" "Verifies that atf_config_has works" -} -has_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir) -r3 3>/dev/null" - - atf_check "TEST_VARIABLE=foo ${h} config_has" 0 stdout null - atf_check "grep 'foo not found' stdout" 0 ignore null - - atf_check "TEST_VARIABLE=foo ${h} -v foo=bar config_has" 0 stdout null - atf_check "grep 'foo found' stdout" 0 ignore null - - echo "Checking for deprecated variables" - atf_check "TEST_VARIABLE=workdir ${h} config_has" 0 stdout null - atf_check "grep 'workdir not found' stdout" 0 ignore null -} - -atf_test_case get -get_head() -{ - atf_set "descr" "Verifies that atf_config_get works" -} -get_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir) -r3 3>/dev/null" - - echo "Querying an undefined variable" - ( atf_config_get "undefined" ) >out 2>err && \ - atf_fail "Getting an undefined variable succeeded" - grep 'not find' err || \ - atf_fail "Getting an undefined variable did not report an error" - - echo "Querying an undefined variable using a default value" - v=$(atf_config_get "undefined" "the default value") - [ "${v}" = "the default value" ] || \ - atf_fail "Default value does not work" - - atf_check "TEST_VARIABLE=foo ${h} -v foo=bar config_get" 0 stdout null - atf_check "grep 'foo = bar' stdout" 0 ignore null - - atf_check "TEST_VARIABLE=foo ${h} -v foo=baz config_get" 0 stdout null - atf_check "grep 'foo = baz' stdout" 0 ignore null -} - -atf_init_test_cases() -{ - atf_add_test_case has - atf_add_test_case get -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/atf-sh/t_normalize.sh b/dist/atf/tests/atf/atf-sh/t_normalize.sh deleted file mode 100644 index 7af4fa93c540..000000000000 --- a/dist/atf/tests/atf/atf-sh/t_normalize.sh +++ /dev/null @@ -1,49 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case main -main_head() -{ - atf_set "descr" "Verifies that variable names with symbols not" \ - "allowed as part of shell variable names work" -} -main_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - atf_check "${h} normalize" 0 stdout ignore - atf_check 'grep "a.b: test value 1" stdout' 0 ignore null - atf_check 'grep "c-d: test value 2" stdout' 0 ignore null -} - -atf_init_test_cases() -{ - atf_add_test_case main -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/atf-sh/t_tc.sh b/dist/atf/tests/atf/atf-sh/t_tc.sh deleted file mode 100644 index 37d6b0853cb6..000000000000 --- a/dist/atf/tests/atf/atf-sh/t_tc.sh +++ /dev/null @@ -1,50 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case default_status -default_status_head() -{ - atf_set "descr" "Verifies that test cases get the correct default" \ - "status if they did not provide any" -} -default_status_body() -{ - h="$(atf_get_srcdir)/h_misc -s $(atf_get_srcdir)" - atf_check "${h} -r3 tc_pass_true 3>resout" 0 ignore ignore - atf_check "${h} -r3 tc_pass_false 3>resout" 0 ignore ignore - atf_check "${h} -r3 tc_fail 3>resout" 1 ignore stderr - atf_check 'grep "An error" stderr' 0 ignore null -} - -atf_init_test_cases() -{ - atf_add_test_case default_status -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/atf-sh/t_tp.sh b/dist/atf/tests/atf/atf-sh/t_tp.sh deleted file mode 100644 index 1261635a293c..000000000000 --- a/dist/atf/tests/atf/atf-sh/t_tp.sh +++ /dev/null @@ -1,56 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case srcdir -srcdir_head() -{ - atf_set "descr" "Verifies that the source directory can be queried" \ - "from the initialization function" -} -srcdir_body() -{ - mkdir work - atf_check "cp $(atf_get_srcdir)/h_misc work" 0 null null - cat >work/subrs <tp.c < - -#include - -ATF_TC(tp); -ATF_TC_HEAD(tp, tc) { - atf_tc_set_md_var(tc, "descr", "A test case"); -} -ATF_TC_BODY(tp, tc) { - printf("Running\n"); -} - -ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, tp); - - return atf_no_error(); -} -EOF - - atf_check "pkg-config --cflags atf-c" 0 stdout null - cflags=$(cat stdout) - echo "CFLAGS are: ${cflags}" - - atf_check "pkg-config --libs-only-L --libs-only-other atf-c" \ - 0 stdout null - ldflags=$(cat stdout) - atf_check "pkg-config --libs-only-l atf-c" 0 stdout null - libs=$(cat stdout) - echo "LDFLAGS are: ${ldflags}" - echo "LIBS are: ${libs}" - - atf_check "${cc} ${cflags} -o tp.o -c tp.c" 0 null null - atf_check "${cc} ${ldflags} -o tp tp.o ${libs}" 0 null null - - libpath= - for f in ${ldflags}; do - case ${f} in - -L*) - dir=$(echo ${f} | sed -e 's,^-L,,') - if [ -z "${libpath}" ]; then - libpath="${dir}" - else - libpath="${libpath}:${dir}" - fi - ;; - *) - ;; - esac - done - - atf_check "test -x tp" 0 null null - atf_check "LD_LIBRARY_PATH=${libpath} ./tp" 0 stdout null - atf_check "grep 'application/X-atf-tcs' stdout" 0 ignore null - atf_check "grep 'Running' stdout" 0 ignore null -} - -atf_test_case cxx_version -cxx_version_head() -{ - atf_set "descr" "Checks that the version in atf-c++ is correct" - atf_set "require.progs" "pkg-config" -} -cxx_version_body() -{ - require_pc "atf-c++" - - check_version "atf-c++" -} - -atf_test_case cxx_build -cxx_build_head() -{ - atf_set "descr" "Checks that a test program can be built against" \ - "the C++ library based on the pkg-config information" - atf_set "require.progs" "pkg-config" -} -cxx_build_body() -{ - require_pc "atf-c++" - - atf_check "pkg-config --variable=cxx atf-c++" 0 stdout null - cxx=$(cat stdout) - echo "Compiler is: ${cxx}" - atf_require_prog ${cxx} - - cat >tp.cpp < - -#include - -ATF_TEST_CASE(tp); -ATF_TEST_CASE_HEAD(tp) { - set_md_var("descr", "A test case"); -} -ATF_TEST_CASE_BODY(tp) { - std::cout << "Running" << std::endl; -} - -ATF_INIT_TEST_CASES(tcs) { - ATF_ADD_TEST_CASE(tcs, tp); -} -EOF - - atf_check "pkg-config --cflags atf-c++" 0 stdout null - cxxflags=$(cat stdout) - echo "CXXFLAGS are: ${cxxflags}" - - atf_check "pkg-config --libs-only-L --libs-only-other atf-c++" \ - 0 stdout null - ldflags=$(cat stdout) - atf_check "pkg-config --libs-only-l atf-c++" 0 stdout null - libs=$(cat stdout) - echo "LDFLAGS are: ${ldflags}" - echo "LIBS are: ${libs}" - - atf_check "${cxx} ${cxxflags} -o tp.o -c tp.cpp" 0 null null - atf_check "${cxx} ${ldflags} -o tp tp.o ${libs}" 0 null null - - libpath= - for f in ${ldflags}; do - case ${f} in - -L*) - dir=$(echo ${f} | sed -e 's,^-L,,') - if [ -z "${libpath}" ]; then - libpath="${dir}" - else - libpath="${libpath}:${dir}" - fi - ;; - *) - ;; - esac - done - - atf_check "test -x tp" 0 null null - atf_check "LD_LIBRARY_PATH=${libpath} ./tp" 0 stdout null - atf_check "grep 'application/X-atf-tcs' stdout" 0 ignore null - atf_check "grep 'Running' stdout" 0 ignore null -} - -atf_init_test_cases() -{ - atf_add_test_case c_version - atf_add_test_case c_build - atf_add_test_case cxx_version - atf_add_test_case cxx_build -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/formats/Atffile b/dist/atf/tests/atf/formats/Atffile deleted file mode 100644 index 3d7b0f07ef76..000000000000 --- a/dist/atf/tests/atf/formats/Atffile +++ /dev/null @@ -1,6 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: t_parsers -tp: t_writers diff --git a/dist/atf/tests/atf/formats/d_atffile_1 b/dist/atf/tests/atf/formats/d_atffile_1 deleted file mode 100644 index ffd2c0c70534..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_1 +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - diff --git a/dist/atf/tests/atf/formats/d_atffile_1.expout b/dist/atf/tests/atf/formats/d_atffile_1.expout deleted file mode 100644 index 36528dc3f349..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_1.expout +++ /dev/null @@ -1 +0,0 @@ -got_eof() diff --git a/dist/atf/tests/atf/formats/d_atffile_2 b/dist/atf/tests/atf/formats/d_atffile_2 deleted file mode 100644 index b0eaca7026c0..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_2 +++ /dev/null @@ -1,8 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -# This is a comment on a line of its own. -# And this is another one. - - # Another after some whitespace. - -# The last one after an empty line. diff --git a/dist/atf/tests/atf/formats/d_atffile_2.expout b/dist/atf/tests/atf/formats/d_atffile_2.expout deleted file mode 100644 index 36528dc3f349..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_2.expout +++ /dev/null @@ -1 +0,0 @@ -got_eof() diff --git a/dist/atf/tests/atf/formats/d_atffile_3 b/dist/atf/tests/atf/formats/d_atffile_3 deleted file mode 100644 index 9792bb146c2a..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_3 +++ /dev/null @@ -1,14 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -conf: var1=value1 -conf: var2 = value2 -conf: var3 = value3 -conf: var4 = value4 - -conf:var5=value5 - conf:var6=value6 - -conf: var7 = "This is a long value." -conf: var8 = "Single-word" -conf: var9 = " Single-word " -conf: var10 = Single-word diff --git a/dist/atf/tests/atf/formats/d_atffile_3.expout b/dist/atf/tests/atf/formats/d_atffile_3.expout deleted file mode 100644 index c52c700a0198..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_3.expout +++ /dev/null @@ -1,11 +0,0 @@ -got_conf(var1, value1) -got_conf(var2, value2) -got_conf(var3, value3) -got_conf(var4, value4) -got_conf(var5, value5) -got_conf(var6, value6) -got_conf(var7, This is a long value.) -got_conf(var8, Single-word) -got_conf(var9, Single-word ) -got_conf(var10, Single-word) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_atffile_4 b/dist/atf/tests/atf/formats/d_atffile_4 deleted file mode 100644 index 949f5b380af5..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_4 +++ /dev/null @@ -1,14 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: var1=value1 -prop: var2 = value2 -prop: var3 = value3 -prop: var4 = value4 - -prop:var5=value5 - prop:var6=value6 - -prop: var7 = "This is a long value." -prop: var8 = "Single-word" -prop: var9 = " Single-word " -prop: var10 = Single-word diff --git a/dist/atf/tests/atf/formats/d_atffile_4.expout b/dist/atf/tests/atf/formats/d_atffile_4.expout deleted file mode 100644 index 5143c63da27b..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_4.expout +++ /dev/null @@ -1,11 +0,0 @@ -got_prop(var1, value1) -got_prop(var2, value2) -got_prop(var3, value3) -got_prop(var4, value4) -got_prop(var5, value5) -got_prop(var6, value6) -got_prop(var7, This is a long value.) -got_prop(var8, Single-word) -got_prop(var9, Single-word ) -got_prop(var10, Single-word) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_atffile_5 b/dist/atf/tests/atf/formats/d_atffile_5 deleted file mode 100644 index 22e5365f5bc2..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_5 +++ /dev/null @@ -1,19 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -tp:foo -tp: foo -tp: foo -tp: foo -tp: foo -tp: "name with spaces" -tp: "single-word" -tp: single-word - -tp-glob:foo*?bar -tp-glob: foo*?bar -tp-glob: foo*?bar -tp-glob: foo*?bar -tp-glob: foo*?bar -tp-glob: "glob * with ? spaces" -tp-glob: "single-*-word" -tp-glob: single-*-word diff --git a/dist/atf/tests/atf/formats/d_atffile_5.expout b/dist/atf/tests/atf/formats/d_atffile_5.expout deleted file mode 100644 index bb70f990a951..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_5.expout +++ /dev/null @@ -1,17 +0,0 @@ -got_tp(foo, false) -got_tp(foo, false) -got_tp(foo, false) -got_tp(foo, false) -got_tp(foo, false) -got_tp(name with spaces, false) -got_tp(single-word, false) -got_tp(single-word, false) -got_tp(foo*?bar, true) -got_tp(foo*?bar, true) -got_tp(foo*?bar, true) -got_tp(foo*?bar, true) -got_tp(foo*?bar, true) -got_tp(glob * with ? spaces, true) -got_tp(single-*-word, true) -got_tp(single-*-word, true) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_atffile_50 b/dist/atf/tests/atf/formats/d_atffile_50 deleted file mode 100644 index 7d0e42bc5091..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_50 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -foo diff --git a/dist/atf/tests/atf/formats/d_atffile_50.experr b/dist/atf/tests/atf/formats/d_atffile_50.experr deleted file mode 100644 index e552b595b159..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_50.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `foo'; expected conf, #, prop, tp, tp-glob, a new line or eof diff --git a/dist/atf/tests/atf/formats/d_atffile_51 b/dist/atf/tests/atf/formats/d_atffile_51 deleted file mode 100644 index b11168f354cf..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_51 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -foo bar -baz diff --git a/dist/atf/tests/atf/formats/d_atffile_51.experr b/dist/atf/tests/atf/formats/d_atffile_51.experr deleted file mode 100644 index e8cd1c48a1e7..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_51.experr +++ /dev/null @@ -1,2 +0,0 @@ -3: Unexpected token `foo'; expected conf, #, prop, tp, tp-glob, a new line or eof -4: Unexpected token `baz'; expected conf, #, prop, tp, tp-glob, a new line or eof diff --git a/dist/atf/tests/atf/formats/d_atffile_52 b/dist/atf/tests/atf/formats/d_atffile_52 deleted file mode 100644 index 83d942a380a9..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_52 +++ /dev/null @@ -1,19 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -conf -conf: -conf: foo = -conf: bar = # A comment. - -prop -prop: -prop: foo = -prop: bar = # A comment. - -tp -tp: -tp: # A comment. - -tp-glob -tp-glob: -tp-glob: # A comment. diff --git a/dist/atf/tests/atf/formats/d_atffile_52.experr b/dist/atf/tests/atf/formats/d_atffile_52.experr deleted file mode 100644 index fc20c77807be..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_52.experr +++ /dev/null @@ -1,14 +0,0 @@ -3: Unexpected token `<>'; expected `:' -4: Unexpected token `<>'; expected variable name -5: Unexpected token `<>'; expected word or quoted string -6: Unexpected token `#'; expected word or quoted string -8: Unexpected token `<>'; expected `:' -9: Unexpected token `<>'; expected property name -10: Unexpected token `<>'; expected word or quoted string -11: Unexpected token `#'; expected word or quoted string -13: Unexpected token `<>'; expected `:' -14: Unexpected token `<>'; expected word or quoted string -15: Unexpected token `#'; expected word or quoted string -17: Unexpected token `<>'; expected `:' -18: Unexpected token `<>'; expected word or quoted string -19: Unexpected token `#'; expected word or quoted string diff --git a/dist/atf/tests/atf/formats/d_atffile_53 b/dist/atf/tests/atf/formats/d_atffile_53 deleted file mode 100644 index 9be359d889b7..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_53 +++ /dev/null @@ -1,9 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: foo = "Correct value" # With comment. - -prop: bar = # A comment. - -prop: baz = "Last variable" - -# End of file. diff --git a/dist/atf/tests/atf/formats/d_atffile_53.experr b/dist/atf/tests/atf/formats/d_atffile_53.experr deleted file mode 100644 index c8f3e0593a69..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_53.experr +++ /dev/null @@ -1 +0,0 @@ -5: Unexpected token `#'; expected word or quoted string diff --git a/dist/atf/tests/atf/formats/d_atffile_53.expout b/dist/atf/tests/atf/formats/d_atffile_53.expout deleted file mode 100644 index 90cce6be8100..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_53.expout +++ /dev/null @@ -1 +0,0 @@ -got_prop(foo, Correct value) diff --git a/dist/atf/tests/atf/formats/d_atffile_54 b/dist/atf/tests/atf/formats/d_atffile_54 deleted file mode 100644 index 90f0679c1b99..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_54 +++ /dev/null @@ -1,6 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: foo = " -prop: bar = "text -prop: baz = "te\"xt -prop: last = "\" diff --git a/dist/atf/tests/atf/formats/d_atffile_54.experr b/dist/atf/tests/atf/formats/d_atffile_54.experr deleted file mode 100644 index 66c57e97ff7f..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_54.experr +++ /dev/null @@ -1,4 +0,0 @@ -3: Missing double quotes before end of line -4: Missing double quotes before end of line -5: Missing double quotes before end of line -6: Missing double quotes before end of line diff --git a/dist/atf/tests/atf/formats/d_atffile_6 b/dist/atf/tests/atf/formats/d_atffile_6 deleted file mode 100644 index 9624b33a84c0..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_6 +++ /dev/null @@ -1,6 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: foo = bar # A comment. -conf: foo = bar # A comment. -tp: foo # A comment. -tp-glob: foo # A comment. diff --git a/dist/atf/tests/atf/formats/d_atffile_6.expout b/dist/atf/tests/atf/formats/d_atffile_6.expout deleted file mode 100644 index 1ed6706c53e2..000000000000 --- a/dist/atf/tests/atf/formats/d_atffile_6.expout +++ /dev/null @@ -1,5 +0,0 @@ -got_prop(foo, bar) -got_conf(foo, bar) -got_tp(foo, false) -got_tp(foo, true) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_config_1 b/dist/atf/tests/atf/formats/d_config_1 deleted file mode 100644 index a2706b439bc2..000000000000 --- a/dist/atf/tests/atf/formats/d_config_1 +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - diff --git a/dist/atf/tests/atf/formats/d_config_1.expout b/dist/atf/tests/atf/formats/d_config_1.expout deleted file mode 100644 index 36528dc3f349..000000000000 --- a/dist/atf/tests/atf/formats/d_config_1.expout +++ /dev/null @@ -1 +0,0 @@ -got_eof() diff --git a/dist/atf/tests/atf/formats/d_config_2 b/dist/atf/tests/atf/formats/d_config_2 deleted file mode 100644 index 1c683444154b..000000000000 --- a/dist/atf/tests/atf/formats/d_config_2 +++ /dev/null @@ -1,8 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -# This is a comment on a line of its own. -# And this is another one. - - # Another after some whitespace. - -# The last one after an empty line. diff --git a/dist/atf/tests/atf/formats/d_config_2.expout b/dist/atf/tests/atf/formats/d_config_2.expout deleted file mode 100644 index 36528dc3f349..000000000000 --- a/dist/atf/tests/atf/formats/d_config_2.expout +++ /dev/null @@ -1 +0,0 @@ -got_eof() diff --git a/dist/atf/tests/atf/formats/d_config_3 b/dist/atf/tests/atf/formats/d_config_3 deleted file mode 100644 index c07e80e4d3c1..000000000000 --- a/dist/atf/tests/atf/formats/d_config_3 +++ /dev/null @@ -1,14 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -var1=value1 -var2 = value2 -var3 = value3 -var4 = value4 - -var5=value5 - var6=value6 - -var7 = "This is a long value." -var8 = "Single-word" -var9 = " Single-word " -var10 = Single-word diff --git a/dist/atf/tests/atf/formats/d_config_3.expout b/dist/atf/tests/atf/formats/d_config_3.expout deleted file mode 100644 index dad5d7ef787f..000000000000 --- a/dist/atf/tests/atf/formats/d_config_3.expout +++ /dev/null @@ -1,11 +0,0 @@ -got_var(var1, value1) -got_var(var2, value2) -got_var(var3, value3) -got_var(var4, value4) -got_var(var5, value5) -got_var(var6, value6) -got_var(var7, This is a long value.) -got_var(var8, Single-word) -got_var(var9, Single-word ) -got_var(var10, Single-word) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_config_4 b/dist/atf/tests/atf/formats/d_config_4 deleted file mode 100644 index 034eaac95612..000000000000 --- a/dist/atf/tests/atf/formats/d_config_4 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -foo = bar # A comment. diff --git a/dist/atf/tests/atf/formats/d_config_4.expout b/dist/atf/tests/atf/formats/d_config_4.expout deleted file mode 100644 index 7be10be79c8f..000000000000 --- a/dist/atf/tests/atf/formats/d_config_4.expout +++ /dev/null @@ -1,2 +0,0 @@ -got_var(foo, bar) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_config_50 b/dist/atf/tests/atf/formats/d_config_50 deleted file mode 100644 index 9801f8303346..000000000000 --- a/dist/atf/tests/atf/formats/d_config_50 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -foo diff --git a/dist/atf/tests/atf/formats/d_config_50.experr b/dist/atf/tests/atf/formats/d_config_50.experr deleted file mode 100644 index d108e96f2ce0..000000000000 --- a/dist/atf/tests/atf/formats/d_config_50.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected equal sign diff --git a/dist/atf/tests/atf/formats/d_config_51 b/dist/atf/tests/atf/formats/d_config_51 deleted file mode 100644 index 8de951039e54..000000000000 --- a/dist/atf/tests/atf/formats/d_config_51 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -foo bar -baz diff --git a/dist/atf/tests/atf/formats/d_config_51.experr b/dist/atf/tests/atf/formats/d_config_51.experr deleted file mode 100644 index 56bc1cff2a92..000000000000 --- a/dist/atf/tests/atf/formats/d_config_51.experr +++ /dev/null @@ -1,2 +0,0 @@ -3: Unexpected token `bar'; expected equal sign -4: Unexpected token `<>'; expected equal sign diff --git a/dist/atf/tests/atf/formats/d_config_52 b/dist/atf/tests/atf/formats/d_config_52 deleted file mode 100644 index 3ecfab3c5c76..000000000000 --- a/dist/atf/tests/atf/formats/d_config_52 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -foo = -bar = # A comment. diff --git a/dist/atf/tests/atf/formats/d_config_52.experr b/dist/atf/tests/atf/formats/d_config_52.experr deleted file mode 100644 index c06aadee96a3..000000000000 --- a/dist/atf/tests/atf/formats/d_config_52.experr +++ /dev/null @@ -1,2 +0,0 @@ -3: Unexpected token `<>'; expected word or quoted string -4: Unexpected token `#'; expected word or quoted string diff --git a/dist/atf/tests/atf/formats/d_config_53 b/dist/atf/tests/atf/formats/d_config_53 deleted file mode 100644 index 83b01b65a935..000000000000 --- a/dist/atf/tests/atf/formats/d_config_53 +++ /dev/null @@ -1,9 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -foo = "Correct value" # With comment. - -bar = # A comment. - -baz = "Last variable" - -# End of file. diff --git a/dist/atf/tests/atf/formats/d_config_53.experr b/dist/atf/tests/atf/formats/d_config_53.experr deleted file mode 100644 index c8f3e0593a69..000000000000 --- a/dist/atf/tests/atf/formats/d_config_53.experr +++ /dev/null @@ -1 +0,0 @@ -5: Unexpected token `#'; expected word or quoted string diff --git a/dist/atf/tests/atf/formats/d_config_53.expout b/dist/atf/tests/atf/formats/d_config_53.expout deleted file mode 100644 index af3a4826b6aa..000000000000 --- a/dist/atf/tests/atf/formats/d_config_53.expout +++ /dev/null @@ -1 +0,0 @@ -got_var(foo, Correct value) diff --git a/dist/atf/tests/atf/formats/d_config_54 b/dist/atf/tests/atf/formats/d_config_54 deleted file mode 100644 index 16b0c2676785..000000000000 --- a/dist/atf/tests/atf/formats/d_config_54 +++ /dev/null @@ -1,6 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -foo = " -bar = "text -baz = "te\"xt -last = "\" diff --git a/dist/atf/tests/atf/formats/d_config_54.experr b/dist/atf/tests/atf/formats/d_config_54.experr deleted file mode 100644 index 66c57e97ff7f..000000000000 --- a/dist/atf/tests/atf/formats/d_config_54.experr +++ /dev/null @@ -1,4 +0,0 @@ -3: Missing double quotes before end of line -4: Missing double quotes before end of line -5: Missing double quotes before end of line -6: Missing double quotes before end of line diff --git a/dist/atf/tests/atf/formats/d_headers_1 b/dist/atf/tests/atf/formats/d_headers_1 deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/dist/atf/tests/atf/formats/d_headers_1.experr b/dist/atf/tests/atf/formats/d_headers_1.experr deleted file mode 100644 index acab3eb6829e..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_1.experr +++ /dev/null @@ -1 +0,0 @@ -1: Unexpected token `<>'; expected a header name diff --git a/dist/atf/tests/atf/formats/d_headers_10 b/dist/atf/tests/atf/formats/d_headers_10 deleted file mode 100644 index 9152bdaaeb94..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_10 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version=@CONTENT_VERSION@ diff --git a/dist/atf/tests/atf/formats/d_headers_10.experr b/dist/atf/tests/atf/formats/d_headers_10.experr deleted file mode 100644 index 480c3215aceb..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_10.experr +++ /dev/null @@ -1 +0,0 @@ -2: Unexpected token `<>'; expected a header name diff --git a/dist/atf/tests/atf/formats/d_headers_11 b/dist/atf/tests/atf/formats/d_headers_11 deleted file mode 100644 index 19f86eeda5b4..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_11 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version="@CONTENT_VERSION@" diff --git a/dist/atf/tests/atf/formats/d_headers_11.experr b/dist/atf/tests/atf/formats/d_headers_11.experr deleted file mode 100644 index 480c3215aceb..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_11.experr +++ /dev/null @@ -1 +0,0 @@ -2: Unexpected token `<>'; expected a header name diff --git a/dist/atf/tests/atf/formats/d_headers_12 b/dist/atf/tests/atf/formats/d_headers_12 deleted file mode 100644 index 7ec195fe3c47..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_12 +++ /dev/null @@ -1,14 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version="@CONTENT_VERSION@" -a b -a-b: -a-b: foo; -a-b: foo; var -a-b: foo; var= -a-b: foo; var="a -a-b: foo; var=a" -a-b: foo; var="a"; -a-b: foo; var="a"; second -a-b: foo; var="a"; second= -a-b: foo; var="a"; second="b -a-b: foo; var="a"; second=b" -a-b: foo; var="a"; second="b" diff --git a/dist/atf/tests/atf/formats/d_headers_12.experr b/dist/atf/tests/atf/formats/d_headers_12.experr deleted file mode 100644 index 2d00934ea3b9..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_12.experr +++ /dev/null @@ -1,12 +0,0 @@ -2: Unexpected token `b'; expected `:' -3: Unexpected token `<>'; expected a textual value -4: Unexpected token `<>'; expected an attribute name -5: Unexpected token `<>'; expected `=' -6: Unexpected token `<>'; expected word or quoted string -7: Missing double quotes before end of line -8: Missing double quotes before end of line -9: Unexpected token `<>'; expected an attribute name -10: Unexpected token `<>'; expected `=' -11: Unexpected token `<>'; expected word or quoted string -12: Missing double quotes before end of line -13: Missing double quotes before end of line diff --git a/dist/atf/tests/atf/formats/d_headers_2 b/dist/atf/tests/atf/formats/d_headers_2 deleted file mode 100644 index 95c347adff1d..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_2 +++ /dev/null @@ -1 +0,0 @@ -Content-Type diff --git a/dist/atf/tests/atf/formats/d_headers_2.experr b/dist/atf/tests/atf/formats/d_headers_2.experr deleted file mode 100644 index 6aad388caaf1..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_2.experr +++ /dev/null @@ -1 +0,0 @@ -1: Unexpected token `<>'; expected `:' diff --git a/dist/atf/tests/atf/formats/d_headers_3 b/dist/atf/tests/atf/formats/d_headers_3 deleted file mode 100644 index 29515ee7d4a2..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_3 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: diff --git a/dist/atf/tests/atf/formats/d_headers_3.experr b/dist/atf/tests/atf/formats/d_headers_3.experr deleted file mode 100644 index e59e58314b5e..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_3.experr +++ /dev/null @@ -1 +0,0 @@ -1: Unexpected token `<>'; expected a textual value diff --git a/dist/atf/tests/atf/formats/d_headers_4 b/dist/atf/tests/atf/formats/d_headers_4 deleted file mode 100644 index 606bdf98dafc..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_4 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@ diff --git a/dist/atf/tests/atf/formats/d_headers_4.experr b/dist/atf/tests/atf/formats/d_headers_4.experr deleted file mode 100644 index 480c3215aceb..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_4.experr +++ /dev/null @@ -1 +0,0 @@ -2: Unexpected token `<>'; expected a header name diff --git a/dist/atf/tests/atf/formats/d_headers_5 b/dist/atf/tests/atf/formats/d_headers_5 deleted file mode 100644 index fcad780ca24b..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_5 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; diff --git a/dist/atf/tests/atf/formats/d_headers_5.experr b/dist/atf/tests/atf/formats/d_headers_5.experr deleted file mode 100644 index 35fc4506de51..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_5.experr +++ /dev/null @@ -1 +0,0 @@ -1: Unexpected token `<>'; expected an attribute name diff --git a/dist/atf/tests/atf/formats/d_headers_6 b/dist/atf/tests/atf/formats/d_headers_6 deleted file mode 100644 index b0c4e18bd114..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_6 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version diff --git a/dist/atf/tests/atf/formats/d_headers_6.experr b/dist/atf/tests/atf/formats/d_headers_6.experr deleted file mode 100644 index a122027b2bab..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_6.experr +++ /dev/null @@ -1 +0,0 @@ -1: Unexpected token `<>'; expected `=' diff --git a/dist/atf/tests/atf/formats/d_headers_7 b/dist/atf/tests/atf/formats/d_headers_7 deleted file mode 100644 index 91c5f70ebd54..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_7 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version= diff --git a/dist/atf/tests/atf/formats/d_headers_7.experr b/dist/atf/tests/atf/formats/d_headers_7.experr deleted file mode 100644 index 0f80ea1c54a8..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_7.experr +++ /dev/null @@ -1 +0,0 @@ -1: Unexpected token `<>'; expected word or quoted string diff --git a/dist/atf/tests/atf/formats/d_headers_8 b/dist/atf/tests/atf/formats/d_headers_8 deleted file mode 100644 index 8e230afe935d..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_8 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version="@CONTENT_VERSION@ diff --git a/dist/atf/tests/atf/formats/d_headers_8.experr b/dist/atf/tests/atf/formats/d_headers_8.experr deleted file mode 100644 index 1a393978ff9f..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_8.experr +++ /dev/null @@ -1 +0,0 @@ -1: Missing double quotes before end of line diff --git a/dist/atf/tests/atf/formats/d_headers_9 b/dist/atf/tests/atf/formats/d_headers_9 deleted file mode 100644 index 9d2bb8175938..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_9 +++ /dev/null @@ -1 +0,0 @@ -Content-Type: @CONTENT_TYPE@; version=@CONTENT_VERSION@" diff --git a/dist/atf/tests/atf/formats/d_headers_9.experr b/dist/atf/tests/atf/formats/d_headers_9.experr deleted file mode 100644 index 1a393978ff9f..000000000000 --- a/dist/atf/tests/atf/formats/d_headers_9.experr +++ /dev/null @@ -1 +0,0 @@ -1: Missing double quotes before end of line diff --git a/dist/atf/tests/atf/formats/d_tcs_1 b/dist/atf/tests/atf/formats/d_tcs_1 deleted file mode 100644 index 652d468217bf..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_1 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 0 diff --git a/dist/atf/tests/atf/formats/d_tcs_1.errin b/dist/atf/tests/atf/formats/d_tcs_1.errin deleted file mode 100644 index 5716ca5987cb..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_1.errin +++ /dev/null @@ -1 +0,0 @@ -bar diff --git a/dist/atf/tests/atf/formats/d_tcs_1.expout b/dist/atf/tests/atf/formats/d_tcs_1.expout deleted file mode 100644 index 087408a7bcad..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_1.expout +++ /dev/null @@ -1,2 +0,0 @@ -got_ntcs(0) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tcs_1.outin b/dist/atf/tests/atf/formats/d_tcs_1.outin deleted file mode 100644 index 257cc5642cb1..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_1.outin +++ /dev/null @@ -1 +0,0 @@ -foo diff --git a/dist/atf/tests/atf/formats/d_tcs_2 b/dist/atf/tests/atf/formats/d_tcs_2 deleted file mode 100644 index 0a1a61266a1c..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_2 +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: a-test -tc-end: a-test, passed diff --git a/dist/atf/tests/atf/formats/d_tcs_2.errin b/dist/atf/tests/atf/formats/d_tcs_2.errin deleted file mode 100644 index 5026fb2e1cbf..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_2.errin +++ /dev/null @@ -1,2 +0,0 @@ -first stderr line -second stderr line diff --git a/dist/atf/tests/atf/formats/d_tcs_2.expout b/dist/atf/tests/atf/formats/d_tcs_2.expout deleted file mode 100644 index 10fc3ba53fc5..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_2.expout +++ /dev/null @@ -1,8 +0,0 @@ -got_ntcs(1) -got_tc_start(a-test) -got_stdout_line(first stdout line) -got_stderr_line(first stderr line) -got_stdout_line(second stdout line) -got_stderr_line(second stderr line) -got_tc_end(passed) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tcs_2.outin b/dist/atf/tests/atf/formats/d_tcs_2.outin deleted file mode 100644 index 56a8719c9f55..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_2.outin +++ /dev/null @@ -1,2 +0,0 @@ -first stdout line -second stdout line diff --git a/dist/atf/tests/atf/formats/d_tcs_3 b/dist/atf/tests/atf/formats/d_tcs_3 deleted file mode 100644 index 5160b3fc1a5a..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_3 +++ /dev/null @@ -1,9 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 3 -tc-start: first-test -tc-end: first-test, passed -tc-start: second-test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-end: third-test, failed, Testing failed reason diff --git a/dist/atf/tests/atf/formats/d_tcs_3.errin b/dist/atf/tests/atf/formats/d_tcs_3.errin deleted file mode 100644 index 2ad3b52efc74..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_3.errin +++ /dev/null @@ -1,8 +0,0 @@ -first stderr line for first-test -second stderr line for first-test -__atf_tc_separator__ -first stderr line for second-test -second stderr line for second-test -__atf_tc_separator__ -first stderr line for third-test -second stderr line for third-test diff --git a/dist/atf/tests/atf/formats/d_tcs_3.expout b/dist/atf/tests/atf/formats/d_tcs_3.expout deleted file mode 100644 index dcecbb9dacec..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_3.expout +++ /dev/null @@ -1,20 +0,0 @@ -got_ntcs(3) -got_tc_start(first-test) -got_stdout_line(first stdout line for first-test) -got_stderr_line(first stderr line for first-test) -got_stdout_line(second stdout line for first-test) -got_stderr_line(second stderr line for first-test) -got_tc_end(passed) -got_tc_start(second-test) -got_stdout_line(first stdout line for second-test) -got_stderr_line(first stderr line for second-test) -got_stdout_line(second stdout line for second-test) -got_stderr_line(second stderr line for second-test) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_stdout_line(first stdout line for third-test) -got_stderr_line(first stderr line for third-test) -got_stdout_line(second stdout line for third-test) -got_stderr_line(second stderr line for third-test) -got_tc_end(failed, Testing failed reason) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tcs_3.outin b/dist/atf/tests/atf/formats/d_tcs_3.outin deleted file mode 100644 index 5c60f583008e..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_3.outin +++ /dev/null @@ -1,8 +0,0 @@ -first stdout line for first-test -second stdout line for first-test -__atf_tc_separator__ -first stdout line for second-test -second stdout line for second-test -__atf_tc_separator__ -first stdout line for third-test -second stdout line for third-test diff --git a/dist/atf/tests/atf/formats/d_tcs_4 b/dist/atf/tests/atf/formats/d_tcs_4 deleted file mode 100644 index 8368cae38c3e..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_4 +++ /dev/null @@ -1,15 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 6 -tc-start: first-test -tc-end: first-test, passed -tc-start: second-test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-end: third-test, failed, Testing failed reason -tc-start: fourth-test -tc-end: fourth-test, passed -tc-start: fifth-test -tc-end: fifth-test, skipped, Testing skipped reason -tc-start: sixth-test -tc-end: sixth-test, failed, Testing failed reason diff --git a/dist/atf/tests/atf/formats/d_tcs_4.errin b/dist/atf/tests/atf/formats/d_tcs_4.errin deleted file mode 100644 index 93e18acfd3bf..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_4.errin +++ /dev/null @@ -1,5 +0,0 @@ -__atf_tc_separator__ -__atf_tc_separator__ -__atf_tc_separator__ -__atf_tc_separator__ -__atf_tc_separator__ diff --git a/dist/atf/tests/atf/formats/d_tcs_4.expout b/dist/atf/tests/atf/formats/d_tcs_4.expout deleted file mode 100644 index 42c4414814a0..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_4.expout +++ /dev/null @@ -1,20 +0,0 @@ -got_ntcs(6) -got_tc_start(first-test) -got_stdout_line(1st test line) -got_tc_end(passed) -got_tc_start(second-test) -got_stdout_line(2nd test line) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_stdout_line(3rd test line) -got_tc_end(failed, Testing failed reason) -got_tc_start(fourth-test) -got_stdout_line(4th test line) -got_tc_end(passed) -got_tc_start(fifth-test) -got_stdout_line(5th test line) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(sixth-test) -got_stdout_line(6th test line) -got_tc_end(failed, Testing failed reason) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tcs_4.outin b/dist/atf/tests/atf/formats/d_tcs_4.outin deleted file mode 100644 index 82edb6057c3e..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_4.outin +++ /dev/null @@ -1,11 +0,0 @@ -1st test line -__atf_tc_separator__ -2nd test line -__atf_tc_separator__ -3rd test line -__atf_tc_separator__ -4th test line -__atf_tc_separator__ -5th test line -__atf_tc_separator__ -6th test line diff --git a/dist/atf/tests/atf/formats/d_tcs_5 b/dist/atf/tests/atf/formats/d_tcs_5 deleted file mode 100644 index 8368cae38c3e..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_5 +++ /dev/null @@ -1,15 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 6 -tc-start: first-test -tc-end: first-test, passed -tc-start: second-test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-end: third-test, failed, Testing failed reason -tc-start: fourth-test -tc-end: fourth-test, passed -tc-start: fifth-test -tc-end: fifth-test, skipped, Testing skipped reason -tc-start: sixth-test -tc-end: sixth-test, failed, Testing failed reason diff --git a/dist/atf/tests/atf/formats/d_tcs_5.errin b/dist/atf/tests/atf/formats/d_tcs_5.errin deleted file mode 100644 index 82edb6057c3e..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_5.errin +++ /dev/null @@ -1,11 +0,0 @@ -1st test line -__atf_tc_separator__ -2nd test line -__atf_tc_separator__ -3rd test line -__atf_tc_separator__ -4th test line -__atf_tc_separator__ -5th test line -__atf_tc_separator__ -6th test line diff --git a/dist/atf/tests/atf/formats/d_tcs_5.expout b/dist/atf/tests/atf/formats/d_tcs_5.expout deleted file mode 100644 index 675711618bff..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_5.expout +++ /dev/null @@ -1,20 +0,0 @@ -got_ntcs(6) -got_tc_start(first-test) -got_stderr_line(1st test line) -got_tc_end(passed) -got_tc_start(second-test) -got_stderr_line(2nd test line) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_stderr_line(3rd test line) -got_tc_end(failed, Testing failed reason) -got_tc_start(fourth-test) -got_stderr_line(4th test line) -got_tc_end(passed) -got_tc_start(fifth-test) -got_stderr_line(5th test line) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(sixth-test) -got_stderr_line(6th test line) -got_tc_end(failed, Testing failed reason) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tcs_5.outin b/dist/atf/tests/atf/formats/d_tcs_5.outin deleted file mode 100644 index 93e18acfd3bf..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_5.outin +++ /dev/null @@ -1,5 +0,0 @@ -__atf_tc_separator__ -__atf_tc_separator__ -__atf_tc_separator__ -__atf_tc_separator__ -__atf_tc_separator__ diff --git a/dist/atf/tests/atf/formats/d_tcs_50 b/dist/atf/tests/atf/formats/d_tcs_50 deleted file mode 100644 index ca0904629fc1..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_50 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -foo diff --git a/dist/atf/tests/atf/formats/d_tcs_50.experr b/dist/atf/tests/atf/formats/d_tcs_50.experr deleted file mode 100644 index f04ac727ef71..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_50.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `foo'; expected tcs-count field diff --git a/dist/atf/tests/atf/formats/d_tcs_51 b/dist/atf/tests/atf/formats/d_tcs_51 deleted file mode 100644 index de35c62adf69..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_51 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count diff --git a/dist/atf/tests/atf/formats/d_tcs_51.experr b/dist/atf/tests/atf/formats/d_tcs_51.experr deleted file mode 100644 index 344db5b538f4..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_51.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected `:' diff --git a/dist/atf/tests/atf/formats/d_tcs_52 b/dist/atf/tests/atf/formats/d_tcs_52 deleted file mode 100644 index e69131f5a855..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_52 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: diff --git a/dist/atf/tests/atf/formats/d_tcs_52.experr b/dist/atf/tests/atf/formats/d_tcs_52.experr deleted file mode 100644 index c66d4408947c..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_52.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected number of test cases diff --git a/dist/atf/tests/atf/formats/d_tcs_53 b/dist/atf/tests/atf/formats/d_tcs_53 deleted file mode 100644 index 4a173867508d..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_53 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 0 -foo diff --git a/dist/atf/tests/atf/formats/d_tcs_53.experr b/dist/atf/tests/atf/formats/d_tcs_53.experr deleted file mode 100644 index eefa82c549c1..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_53.experr +++ /dev/null @@ -1 +0,0 @@ -4: Unexpected token `foo'; expected end of stream diff --git a/dist/atf/tests/atf/formats/d_tcs_53.expout b/dist/atf/tests/atf/formats/d_tcs_53.expout deleted file mode 100644 index 0012740e980d..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_53.expout +++ /dev/null @@ -1 +0,0 @@ -got_ntcs(0) diff --git a/dist/atf/tests/atf/formats/d_tcs_54 b/dist/atf/tests/atf/formats/d_tcs_54 deleted file mode 100644 index 3c954404adc5..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_54 +++ /dev/null @@ -1,18 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -foo -tc-start -tc-start: -tc-start: foo -bar -tc-start: foo -tc-end -tc-start: foo -tc-end: -tc-start: foo -tc-end: bar -tc-start: foo -tc-end: foo -tc-start: foo -tc-end: foo, diff --git a/dist/atf/tests/atf/formats/d_tcs_54.experr b/dist/atf/tests/atf/formats/d_tcs_54.experr deleted file mode 100644 index 79e32e64d0c2..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_54.experr +++ /dev/null @@ -1,9 +0,0 @@ -4: Unexpected token `foo'; expected start of test case -5: Unexpected token `<>'; expected `:' -6: Unexpected token `<>'; expected test case name -8: Unexpected token `bar'; expected end of test case -10: Unexpected token `<>'; expected `:' -12: Unexpected token `<>'; expected test case name -14: Test case name used in terminator does not match opening -16: Unexpected token `<>'; expected `,' -18: Unexpected token `<>'; expected passed, failed or skipped diff --git a/dist/atf/tests/atf/formats/d_tcs_54.expout b/dist/atf/tests/atf/formats/d_tcs_54.expout deleted file mode 100644 index 1af911b81d90..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_54.expout +++ /dev/null @@ -1 +0,0 @@ -got_ntcs(1) diff --git a/dist/atf/tests/atf/formats/d_tcs_55 b/dist/atf/tests/atf/formats/d_tcs_55 deleted file mode 100644 index 8e034e91655a..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_55 +++ /dev/null @@ -1,15 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 6 -tc-start: foo -tc-end: foo, passe -tc-start: foo -tc-end: foo, passed, -tc-start: bar -tc-end: bar, failed -tc-start: bar -tc-end: bar, failed, -tc-start: baz -tc-end: baz, skipped -tc-start: baz -tc-end: baz, skipped, diff --git a/dist/atf/tests/atf/formats/d_tcs_55.experr b/dist/atf/tests/atf/formats/d_tcs_55.experr deleted file mode 100644 index 6834d9f3b0a8..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_55.experr +++ /dev/null @@ -1,12 +0,0 @@ -0: Missing terminators in stdout or stderr -5: Unexpected token `passe'; expected passed, failed or skipped -0: Missing terminators in stdout or stderr -7: Unexpected token `,'; expected new line -0: Missing terminators in stdout or stderr -9: Unexpected token `<>'; expected `,' -0: Missing terminators in stdout or stderr -11: Empty reason for failed test case result -0: Missing terminators in stdout or stderr -13: Unexpected token `<>'; expected `,' -0: Missing terminators in stdout or stderr -15: Empty reason for skipped test case result diff --git a/dist/atf/tests/atf/formats/d_tcs_55.expout b/dist/atf/tests/atf/formats/d_tcs_55.expout deleted file mode 100644 index b5919c691211..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_55.expout +++ /dev/null @@ -1,2 +0,0 @@ -got_ntcs(6) -got_tc_start(foo) diff --git a/dist/atf/tests/atf/formats/d_tcs_56 b/dist/atf/tests/atf/formats/d_tcs_56 deleted file mode 100644 index 9178073dc30b..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_56 +++ /dev/null @@ -1,7 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: foo -tc-end: foo, passed -tc-start: bar -tc-end: bar, passed diff --git a/dist/atf/tests/atf/formats/d_tcs_56.errin b/dist/atf/tests/atf/formats/d_tcs_56.errin deleted file mode 100644 index 05c0f2cbafc4..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_56.errin +++ /dev/null @@ -1 +0,0 @@ -__atf_tc_separator__ diff --git a/dist/atf/tests/atf/formats/d_tcs_56.experr b/dist/atf/tests/atf/formats/d_tcs_56.experr deleted file mode 100644 index 2773da8b4971..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_56.experr +++ /dev/null @@ -1 +0,0 @@ -6: Unexpected token `tc-start'; expected end of stream diff --git a/dist/atf/tests/atf/formats/d_tcs_56.expout b/dist/atf/tests/atf/formats/d_tcs_56.expout deleted file mode 100644 index d1de9c9e6eba..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_56.expout +++ /dev/null @@ -1,3 +0,0 @@ -got_ntcs(1) -got_tc_start(foo) -got_tc_end(passed) diff --git a/dist/atf/tests/atf/formats/d_tcs_56.outin b/dist/atf/tests/atf/formats/d_tcs_56.outin deleted file mode 100644 index 05c0f2cbafc4..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_56.outin +++ /dev/null @@ -1 +0,0 @@ -__atf_tc_separator__ diff --git a/dist/atf/tests/atf/formats/d_tcs_57 b/dist/atf/tests/atf/formats/d_tcs_57 deleted file mode 100644 index f235dba2451e..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_57 +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 2 -tc-start: foo -tc-end: foo, passed diff --git a/dist/atf/tests/atf/formats/d_tcs_57.errin b/dist/atf/tests/atf/formats/d_tcs_57.errin deleted file mode 100644 index 05c0f2cbafc4..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_57.errin +++ /dev/null @@ -1 +0,0 @@ -__atf_tc_separator__ diff --git a/dist/atf/tests/atf/formats/d_tcs_57.experr b/dist/atf/tests/atf/formats/d_tcs_57.experr deleted file mode 100644 index f6e3ef745278..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_57.experr +++ /dev/null @@ -1 +0,0 @@ -6: Unexpected token `<>'; expected start of test case diff --git a/dist/atf/tests/atf/formats/d_tcs_57.expout b/dist/atf/tests/atf/formats/d_tcs_57.expout deleted file mode 100644 index 93d3e7cf8b88..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_57.expout +++ /dev/null @@ -1,3 +0,0 @@ -got_ntcs(2) -got_tc_start(foo) -got_tc_end(passed) diff --git a/dist/atf/tests/atf/formats/d_tcs_57.outin b/dist/atf/tests/atf/formats/d_tcs_57.outin deleted file mode 100644 index 05c0f2cbafc4..000000000000 --- a/dist/atf/tests/atf/formats/d_tcs_57.outin +++ /dev/null @@ -1 +0,0 @@ -__atf_tc_separator__ diff --git a/dist/atf/tests/atf/formats/d_tps_1 b/dist/atf/tests/atf/formats/d_tps_1 deleted file mode 100644 index 76b9ec02096a..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_1 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 0 diff --git a/dist/atf/tests/atf/formats/d_tps_1.expout b/dist/atf/tests/atf/formats/d_tps_1.expout deleted file mode 100644 index f9aa315c0301..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_1.expout +++ /dev/null @@ -1,2 +0,0 @@ -got_ntps(0) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tps_2 b/dist/atf/tests/atf/formats/d_tps_2 deleted file mode 100644 index 18eadfb89d76..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_2 +++ /dev/null @@ -1,7 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 2 -tp-start: first-prog, 0 -tp-end: first-prog -tp-start: second-prog, 0 -tp-end: second-prog, This program failed diff --git a/dist/atf/tests/atf/formats/d_tps_2.expout b/dist/atf/tests/atf/formats/d_tps_2.expout deleted file mode 100644 index 2b8d08ed44cd..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_2.expout +++ /dev/null @@ -1,6 +0,0 @@ -got_ntps(2) -got_tp_start(first-prog, 0) -got_tp_end() -got_tp_start(second-prog, 0) -got_tp_end(This program failed) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tps_3 b/dist/atf/tests/atf/formats/d_tps_3 deleted file mode 100644 index b93e18e405c0..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_3 +++ /dev/null @@ -1,31 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 2 -tp-start: first-prog, 3 -tc-start: first-test -tc-end: first-test, passed -tc-start: second-test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-end: third-test, failed, Testing failed reason -tp-end: first-prog -tp-start: second-prog, 3 -tc-start: first-test -tc-so:first stdout line for 1st test -tc-se:first stderr line for 1st test -tc-so:second stdout line for 1st test -tc-se:second stderr line for 1st test -tc-end: first-test, passed -tc-start: second-test -tc-so:first stdout line for 2nd test -tc-se:first stderr line for 2nd test -tc-so:second stdout line for 2nd test -tc-se:second stderr line for 2nd test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-so:first stdout line for 3rd test -tc-se:first stderr line for 3rd test -tc-so:second stdout line for 3rd test -tc-se:second stderr line for 3rd test -tc-end: third-test, failed, Testing failed reason -tp-end: second-prog, This program failed diff --git a/dist/atf/tests/atf/formats/d_tps_3.expout b/dist/atf/tests/atf/formats/d_tps_3.expout deleted file mode 100644 index 77c8686d1890..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_3.expout +++ /dev/null @@ -1,30 +0,0 @@ -got_ntps(2) -got_tp_start(first-prog, 3) -got_tc_start(first-test) -got_tc_end(passed) -got_tc_start(second-test) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_tc_end(failed, Testing failed reason) -got_tp_end() -got_tp_start(second-prog, 3) -got_tc_start(first-test) -got_tc_stdout_line(first stdout line for 1st test) -got_tc_stderr_line(first stderr line for 1st test) -got_tc_stdout_line(second stdout line for 1st test) -got_tc_stderr_line(second stderr line for 1st test) -got_tc_end(passed) -got_tc_start(second-test) -got_tc_stdout_line(first stdout line for 2nd test) -got_tc_stderr_line(first stderr line for 2nd test) -got_tc_stdout_line(second stdout line for 2nd test) -got_tc_stderr_line(second stderr line for 2nd test) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_tc_stdout_line(first stdout line for 3rd test) -got_tc_stderr_line(first stderr line for 3rd test) -got_tc_stdout_line(second stdout line for 3rd test) -got_tc_stderr_line(second stderr line for 3rd test) -got_tc_end(failed, Testing failed reason) -got_tp_end(This program failed) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tps_4 b/dist/atf/tests/atf/formats/d_tps_4 deleted file mode 100644 index 880822df01e7..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_4 +++ /dev/null @@ -1,37 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a, foo -info: b, bar -info: c, baz -tps-count: 2 -tp-start: first-prog, 3 -tc-start: first-test -tc-end: first-test, passed -tc-start: second-test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-end: third-test, failed, Testing failed reason -tp-end: first-prog -tp-start: second-prog, 3 -tc-start: first-test -tc-so:first stdout line for 1st test -tc-se:first stderr line for 1st test -tc-so:second stdout line for 1st test -tc-se:second stderr line for 1st test -tc-end: first-test, passed -tc-start: second-test -tc-so:first stdout line for 2nd test -tc-se:first stderr line for 2nd test -tc-so:second stdout line for 2nd test -tc-se:second stderr line for 2nd test -tc-end: second-test, skipped, Testing skipped reason -tc-start: third-test -tc-so:first stdout line for 3rd test -tc-se:first stderr line for 3rd test -tc-so:second stdout line for 3rd test -tc-se:second stderr line for 3rd test -tc-end: third-test, failed, Testing failed reason -tp-end: second-prog, This program failed -info: d, foo -info: e, bar -info: f, baz diff --git a/dist/atf/tests/atf/formats/d_tps_4.expout b/dist/atf/tests/atf/formats/d_tps_4.expout deleted file mode 100644 index 27b49490d87c..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_4.expout +++ /dev/null @@ -1,36 +0,0 @@ -got_info(a, foo) -got_info(b, bar) -got_info(c, baz) -got_ntps(2) -got_tp_start(first-prog, 3) -got_tc_start(first-test) -got_tc_end(passed) -got_tc_start(second-test) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_tc_end(failed, Testing failed reason) -got_tp_end() -got_tp_start(second-prog, 3) -got_tc_start(first-test) -got_tc_stdout_line(first stdout line for 1st test) -got_tc_stderr_line(first stderr line for 1st test) -got_tc_stdout_line(second stdout line for 1st test) -got_tc_stderr_line(second stderr line for 1st test) -got_tc_end(passed) -got_tc_start(second-test) -got_tc_stdout_line(first stdout line for 2nd test) -got_tc_stderr_line(first stderr line for 2nd test) -got_tc_stdout_line(second stdout line for 2nd test) -got_tc_stderr_line(second stderr line for 2nd test) -got_tc_end(skipped, Testing skipped reason) -got_tc_start(third-test) -got_tc_stdout_line(first stdout line for 3rd test) -got_tc_stderr_line(first stderr line for 3rd test) -got_tc_stdout_line(second stdout line for 3rd test) -got_tc_stderr_line(second stderr line for 3rd test) -got_tc_end(failed, Testing failed reason) -got_tp_end(This program failed) -got_info(d, foo) -got_info(e, bar) -got_info(f, baz) -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tps_5 b/dist/atf/tests/atf/formats/d_tps_5 deleted file mode 100644 index 0e8c4d28ac34..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_5 +++ /dev/null @@ -1,19 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 1 -tp-start: the-prog, 1 -tc-start: the-test -tc-so:--- a 2007-11-04 14:00:41.000000000 +0100 -tc-so:+++ b 2007-11-04 14:00:48.000000000 +0100 -tc-so:@@ -1,7 +1,7 @@ -tc-so: This test is meant to simulate a diff. -tc-so: Blank space at beginning of context lines must be preserved. -tc-so: -tc-so:-First original line. -tc-so:-Second original line. -tc-so:+First modified line. -tc-so:+Second modified line. -tc-so: -tc-so: EOF -tc-end: the-test, passed -tp-end: the-prog diff --git a/dist/atf/tests/atf/formats/d_tps_5.expout b/dist/atf/tests/atf/formats/d_tps_5.expout deleted file mode 100644 index c3cd17fb5bff..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_5.expout +++ /dev/null @@ -1,18 +0,0 @@ -got_ntps(1) -got_tp_start(the-prog, 1) -got_tc_start(the-test) -got_tc_stdout_line(--- a 2007-11-04 14:00:41.000000000 +0100) -got_tc_stdout_line(+++ b 2007-11-04 14:00:48.000000000 +0100) -got_tc_stdout_line(@@ -1,7 +1,7 @@) -got_tc_stdout_line( This test is meant to simulate a diff.) -got_tc_stdout_line( Blank space at beginning of context lines must be preserved.) -got_tc_stdout_line( ) -got_tc_stdout_line(-First original line.) -got_tc_stdout_line(-Second original line.) -got_tc_stdout_line(+First modified line.) -got_tc_stdout_line(+Second modified line.) -got_tc_stdout_line( ) -got_tc_stdout_line( EOF) -got_tc_end(passed) -got_tp_end() -got_eof() diff --git a/dist/atf/tests/atf/formats/d_tps_50 b/dist/atf/tests/atf/formats/d_tps_50 deleted file mode 100644 index 733e08a9d91a..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_50 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -foo diff --git a/dist/atf/tests/atf/formats/d_tps_50.experr b/dist/atf/tests/atf/formats/d_tps_50.experr deleted file mode 100644 index f43a8d4d8468..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_50.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `foo'; expected tps-count or info field diff --git a/dist/atf/tests/atf/formats/d_tps_51 b/dist/atf/tests/atf/formats/d_tps_51 deleted file mode 100644 index 2d0acd5ae502..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_51 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count diff --git a/dist/atf/tests/atf/formats/d_tps_51.experr b/dist/atf/tests/atf/formats/d_tps_51.experr deleted file mode 100644 index 344db5b538f4..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_51.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected `:' diff --git a/dist/atf/tests/atf/formats/d_tps_52 b/dist/atf/tests/atf/formats/d_tps_52 deleted file mode 100644 index 3a4fdbbee64b..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_52 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: diff --git a/dist/atf/tests/atf/formats/d_tps_52.experr b/dist/atf/tests/atf/formats/d_tps_52.experr deleted file mode 100644 index 841223bbcb14..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_52.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected number of test programs diff --git a/dist/atf/tests/atf/formats/d_tps_53 b/dist/atf/tests/atf/formats/d_tps_53 deleted file mode 100644 index 7ea9ec4e4fa6..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_53 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 1 -foo diff --git a/dist/atf/tests/atf/formats/d_tps_53.experr b/dist/atf/tests/atf/formats/d_tps_53.experr deleted file mode 100644 index 920edccc3718..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_53.experr +++ /dev/null @@ -1 +0,0 @@ -4: Unexpected token `foo'; expected start of test program diff --git a/dist/atf/tests/atf/formats/d_tps_53.expout b/dist/atf/tests/atf/formats/d_tps_53.expout deleted file mode 100644 index 23a13337d173..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_53.expout +++ /dev/null @@ -1 +0,0 @@ -got_ntps(1) diff --git a/dist/atf/tests/atf/formats/d_tps_54 b/dist/atf/tests/atf/formats/d_tps_54 deleted file mode 100644 index bcae1b9afa30..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_54 +++ /dev/null @@ -1,18 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 1 -foo -tp-start -tp-start: -tp-start: foo -tp-start: foo, -tp-start: foo, 0 -bar -tp-start: foo, 0 -tp-end -tp-start: foo, 0 -tp-end: -tp-start: foo, 0 -tp-end: bar -tp-start: foo, 0 -tp-end: foo, diff --git a/dist/atf/tests/atf/formats/d_tps_54.experr b/dist/atf/tests/atf/formats/d_tps_54.experr deleted file mode 100644 index 029ae156a5fe..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_54.experr +++ /dev/null @@ -1,10 +0,0 @@ -4: Unexpected token `foo'; expected start of test program -5: Unexpected token `<>'; expected `:' -6: Unexpected token `<>'; expected test program name -7: Unexpected token `<>'; expected `,' -8: Unexpected token `<>'; expected number of test programs -10: Unexpected token `bar'; expected end of test program -12: Unexpected token `<>'; expected `:' -14: Unexpected token `<>'; expected test program name -16: Test program name used in terminator does not match opening -18: Empty reason for failed test program diff --git a/dist/atf/tests/atf/formats/d_tps_54.expout b/dist/atf/tests/atf/formats/d_tps_54.expout deleted file mode 100644 index 23a13337d173..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_54.expout +++ /dev/null @@ -1 +0,0 @@ -got_ntps(1) diff --git a/dist/atf/tests/atf/formats/d_tps_55 b/dist/atf/tests/atf/formats/d_tps_55 deleted file mode 100644 index 01d516543d4d..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_55 +++ /dev/null @@ -1,20 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 1 -tp-start: foo, 1 -foo -tc-start -tc-start: -tc-start: foo -bar -tc-start: foo -tc-end -tc-start: foo -tc-end: -tc-start: foo -tc-end: bar -tc-start: foo -tc-end: foo -tc-start: foo -tc-end: foo, -tp-end: foo diff --git a/dist/atf/tests/atf/formats/d_tps_55.experr b/dist/atf/tests/atf/formats/d_tps_55.experr deleted file mode 100644 index d80807999387..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_55.experr +++ /dev/null @@ -1,10 +0,0 @@ -5: Unexpected token `foo'; expected start of test case -6: Unexpected token `<>'; expected `:' -7: Unexpected token `<>'; expected test case name -9: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line -11: Unexpected token `<>'; expected `:' -13: Unexpected token `<>'; expected test case name -15: Test case name used in terminator does not match opening -17: Unexpected token `<>'; expected `,' -19: Unexpected token `<>'; expected passed, failed or skipped -20: Unexpected token `tp-end'; expected start of test case diff --git a/dist/atf/tests/atf/formats/d_tps_55.expout b/dist/atf/tests/atf/formats/d_tps_55.expout deleted file mode 100644 index 3cbe3ff5e8f0..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_55.expout +++ /dev/null @@ -1,2 +0,0 @@ -got_ntps(1) -got_tp_start(foo, 1) diff --git a/dist/atf/tests/atf/formats/d_tps_56 b/dist/atf/tests/atf/formats/d_tps_56 deleted file mode 100644 index 32488c320db7..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_56 +++ /dev/null @@ -1,17 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 1 -tp-start: foo, 1 -tc-start: foo -tc-end: foo, passe -tc-start: foo -tc-end: foo, passed, -tc-start: bar -tc-end: bar, failed -tc-start: bar -tc-end: bar, failed, -tc-start: baz -tc-end: baz, skipped -tc-start: baz -tc-end: baz, skipped, -tp-end: foo diff --git a/dist/atf/tests/atf/formats/d_tps_56.experr b/dist/atf/tests/atf/formats/d_tps_56.experr deleted file mode 100644 index 1d1f5b9a78fb..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_56.experr +++ /dev/null @@ -1,7 +0,0 @@ -6: Unexpected token `passe'; expected passed, failed or skipped -8: Unexpected token `,'; expected new line -10: Unexpected token `<>'; expected `,' -12: Empty reason for failed test case result -14: Unexpected token `<>'; expected `,' -16: Empty reason for skipped test case result -17: Unexpected token `tp-end'; expected start of test case diff --git a/dist/atf/tests/atf/formats/d_tps_56.expout b/dist/atf/tests/atf/formats/d_tps_56.expout deleted file mode 100644 index a35c996683ef..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_56.expout +++ /dev/null @@ -1,3 +0,0 @@ -got_ntps(1) -got_tp_start(foo, 1) -got_tc_start(foo) diff --git a/dist/atf/tests/atf/formats/d_tps_57 b/dist/atf/tests/atf/formats/d_tps_57 deleted file mode 100644 index 0d41fd8a1653..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_57 +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 2 -tp-start: foo, 0 -tp-end: foo diff --git a/dist/atf/tests/atf/formats/d_tps_57.experr b/dist/atf/tests/atf/formats/d_tps_57.experr deleted file mode 100644 index ea2efbd0a0a4..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_57.experr +++ /dev/null @@ -1 +0,0 @@ -6: Unexpected token `<>'; expected start of test program diff --git a/dist/atf/tests/atf/formats/d_tps_57.expout b/dist/atf/tests/atf/formats/d_tps_57.expout deleted file mode 100644 index 44610c0f45c1..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_57.expout +++ /dev/null @@ -1,3 +0,0 @@ -got_ntps(2) -got_tp_start(foo, 0) -got_tp_end() diff --git a/dist/atf/tests/atf/formats/d_tps_58 b/dist/atf/tests/atf/formats/d_tps_58 deleted file mode 100644 index 0ed57e318b88..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_58 +++ /dev/null @@ -1,7 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -tps-count: 1 -tp-start: foo, 0 -tp-end: foo -tp-start: bar, 0 -tp-end: bar diff --git a/dist/atf/tests/atf/formats/d_tps_58.experr b/dist/atf/tests/atf/formats/d_tps_58.experr deleted file mode 100644 index f5576e7030f2..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_58.experr +++ /dev/null @@ -1 +0,0 @@ -6: Unexpected token `tp-start'; expected end of stream or info field diff --git a/dist/atf/tests/atf/formats/d_tps_58.expout b/dist/atf/tests/atf/formats/d_tps_58.expout deleted file mode 100644 index 50a675d6fc4c..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_58.expout +++ /dev/null @@ -1,3 +0,0 @@ -got_ntps(1) -got_tp_start(foo, 0) -got_tp_end() diff --git a/dist/atf/tests/atf/formats/d_tps_59 b/dist/atf/tests/atf/formats/d_tps_59 deleted file mode 100644 index 398d87bb2768..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_59 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info diff --git a/dist/atf/tests/atf/formats/d_tps_59.experr b/dist/atf/tests/atf/formats/d_tps_59.experr deleted file mode 100644 index 344db5b538f4..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_59.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected `:' diff --git a/dist/atf/tests/atf/formats/d_tps_60 b/dist/atf/tests/atf/formats/d_tps_60 deleted file mode 100644 index 7cd95d456d7f..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_60 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: diff --git a/dist/atf/tests/atf/formats/d_tps_60.experr b/dist/atf/tests/atf/formats/d_tps_60.experr deleted file mode 100644 index 0e0f9fa2e2f9..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_60.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected info property name diff --git a/dist/atf/tests/atf/formats/d_tps_61 b/dist/atf/tests/atf/formats/d_tps_61 deleted file mode 100644 index b1bf66094413..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_61 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a diff --git a/dist/atf/tests/atf/formats/d_tps_61.experr b/dist/atf/tests/atf/formats/d_tps_61.experr deleted file mode 100644 index df4fda4663e8..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_61.experr +++ /dev/null @@ -1 +0,0 @@ -3: Unexpected token `<>'; expected `,' diff --git a/dist/atf/tests/atf/formats/d_tps_62 b/dist/atf/tests/atf/formats/d_tps_62 deleted file mode 100644 index d8e00f86c584..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_62 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a, diff --git a/dist/atf/tests/atf/formats/d_tps_62.experr b/dist/atf/tests/atf/formats/d_tps_62.experr deleted file mode 100644 index 67faaa698ba9..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_62.experr +++ /dev/null @@ -1 +0,0 @@ -4: Unexpected token `<>'; expected tps-count or info field diff --git a/dist/atf/tests/atf/formats/d_tps_62.expout b/dist/atf/tests/atf/formats/d_tps_62.expout deleted file mode 100644 index 99ff817b6e6a..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_62.expout +++ /dev/null @@ -1 +0,0 @@ -got_info(a, ) diff --git a/dist/atf/tests/atf/formats/d_tps_63 b/dist/atf/tests/atf/formats/d_tps_63 deleted file mode 100644 index 6abbc4077490..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_63 +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a, b diff --git a/dist/atf/tests/atf/formats/d_tps_63.experr b/dist/atf/tests/atf/formats/d_tps_63.experr deleted file mode 100644 index 67faaa698ba9..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_63.experr +++ /dev/null @@ -1 +0,0 @@ -4: Unexpected token `<>'; expected tps-count or info field diff --git a/dist/atf/tests/atf/formats/d_tps_63.expout b/dist/atf/tests/atf/formats/d_tps_63.expout deleted file mode 100644 index 0d6bf42de833..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_63.expout +++ /dev/null @@ -1 +0,0 @@ -got_info(a, b) diff --git a/dist/atf/tests/atf/formats/d_tps_64 b/dist/atf/tests/atf/formats/d_tps_64 deleted file mode 100644 index 896cb7e7dd5f..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_64 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a, b -tps-count diff --git a/dist/atf/tests/atf/formats/d_tps_64.experr b/dist/atf/tests/atf/formats/d_tps_64.experr deleted file mode 100644 index 7421b04c2bbb..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_64.experr +++ /dev/null @@ -1 +0,0 @@ -4: Unexpected token `<>'; expected `:' diff --git a/dist/atf/tests/atf/formats/d_tps_64.expout b/dist/atf/tests/atf/formats/d_tps_64.expout deleted file mode 100644 index 0d6bf42de833..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_64.expout +++ /dev/null @@ -1 +0,0 @@ -got_info(a, b) diff --git a/dist/atf/tests/atf/formats/d_tps_65 b/dist/atf/tests/atf/formats/d_tps_65 deleted file mode 100644 index 2ab1770ee518..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_65 +++ /dev/null @@ -1,4 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a, b -tps-count: diff --git a/dist/atf/tests/atf/formats/d_tps_65.experr b/dist/atf/tests/atf/formats/d_tps_65.experr deleted file mode 100644 index 9b4b4183637b..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_65.experr +++ /dev/null @@ -1 +0,0 @@ -4: Unexpected token `<>'; expected number of test programs diff --git a/dist/atf/tests/atf/formats/d_tps_65.expout b/dist/atf/tests/atf/formats/d_tps_65.expout deleted file mode 100644 index 0d6bf42de833..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_65.expout +++ /dev/null @@ -1 +0,0 @@ -got_info(a, b) diff --git a/dist/atf/tests/atf/formats/d_tps_66 b/dist/atf/tests/atf/formats/d_tps_66 deleted file mode 100644 index 9309b2b1ecc0..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_66 +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-tps; version="2" - -info: a, b -tps-count: 0 -info diff --git a/dist/atf/tests/atf/formats/d_tps_66.experr b/dist/atf/tests/atf/formats/d_tps_66.experr deleted file mode 100644 index 5d4f657931b6..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_66.experr +++ /dev/null @@ -1 +0,0 @@ -5: Unexpected token `<>'; expected `:' diff --git a/dist/atf/tests/atf/formats/d_tps_66.expout b/dist/atf/tests/atf/formats/d_tps_66.expout deleted file mode 100644 index 375c53ef2718..000000000000 --- a/dist/atf/tests/atf/formats/d_tps_66.expout +++ /dev/null @@ -1,2 +0,0 @@ -got_info(a, b) -got_ntps(0) diff --git a/dist/atf/tests/atf/formats/h_parser.cpp b/dist/atf/tests/atf/formats/h_parser.cpp deleted file mode 100644 index 83ef4569a4c5..000000000000 --- a/dist/atf/tests/atf/formats/h_parser.cpp +++ /dev/null @@ -1,322 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -extern "C" { -#include "atf-c/object.h" -} - -#include "atf-c++/formats.hpp" -#include "atf-c++/io.hpp" -#include "atf-c++/parser.hpp" -#include "atf-c++/sanity.hpp" - -class atffile_reader : protected atf::formats::atf_atffile_reader { - void - got_conf(const std::string& name, const std::string& val) - { - std::cout << "got_conf(" << name << ", " << val << ")" << std::endl; - } - - void - got_prop(const std::string& name, const std::string& val) - { - std::cout << "got_prop(" << name << ", " << val << ")" << std::endl; - } - - void - got_tp(const std::string& name, bool isglob) - { - std::cout << "got_tp(" << name << ", " << (isglob ? "true" : "false") - << ")" << std::endl; - } - - void - got_eof(void) - { - std::cout << "got_eof()" << std::endl; - } - -public: - atffile_reader(std::istream& is) : - atf::formats::atf_atffile_reader(is) - { - } - - void - read(const std::string& outname, const std::string& errname) - { - atf_atffile_reader::read(); - } -}; - -class config_reader : protected atf::formats::atf_config_reader { - void - got_var(const std::string& name, const std::string& val) - { - std::cout << "got_var(" << name << ", " << val << ")" << std::endl; - } - - void - got_eof(void) - { - std::cout << "got_eof()" << std::endl; - } - -public: - config_reader(std::istream& is) : - atf::formats::atf_config_reader(is) - { - } - - void - read(const std::string& outname, const std::string& errname) - { - atf_config_reader::read(); - } -}; - -class tcs_reader : protected atf::formats::atf_tcs_reader { - void - got_ntcs(size_t ntcs) - { - std::cout << "got_ntcs(" << ntcs << ")" << std::endl; - } - - void - got_tc_start(const std::string& tcname) - { - std::cout << "got_tc_start(" << tcname << ")" << std::endl; - } - - void - got_tc_end(const atf::tests::tcr& tcr) - { - std::string r; - if (tcr.get_state() == atf::tests::tcr::passed_state) - r = "passed"; - else if (tcr.get_state() == atf::tests::tcr::failed_state) - r = "failed, " + tcr.get_reason(); - else if (tcr.get_state() == atf::tests::tcr::skipped_state) - r = "skipped, " + tcr.get_reason(); - else - UNREACHABLE; - - std::cout << "got_tc_end(" << r << ")" << std::endl; - } - - void - got_stdout_line(const std::string& line) - { - std::cout << "got_stdout_line(" << line << ")" << std::endl; - } - - void - got_stderr_line(const std::string& line) - { - std::cout << "got_stderr_line(" << line << ")" << std::endl; - } - - void - got_eof(void) - { - std::cout << "got_eof()" << std::endl; - } - -public: - tcs_reader(std::istream& is) : - atf::formats::atf_tcs_reader(is) - { - } - - void - read(const std::string& outname, const std::string& errname) - { - int outfd = ::open(outname.c_str(), O_RDONLY); - if (outfd == -1) - throw std::runtime_error("Failed to open " + outname); - atf::io::file_handle outfh(outfd); - - int errfd = ::open(errname.c_str(), O_RDONLY); - if (errfd == -1) - throw std::runtime_error("Failed to open " + errname); - atf::io::file_handle errfh(errfd); - - atf::io::unbuffered_istream outin(outfh); - atf::io::unbuffered_istream errin(errfh); - atf_tcs_reader::read(outin, errin); - } -}; - -class tps_reader : protected atf::formats::atf_tps_reader { - void - got_info(const std::string& what, const std::string& val) - { - std::cout << "got_info(" << what << ", " << val << ")" << std::endl; - } - - void - got_ntps(size_t ntps) - { - std::cout << "got_ntps(" << ntps << ")" << std::endl; - } - - void - got_tp_start(const std::string& tpname, size_t ntcs) - { - std::cout << "got_tp_start(" << tpname << ", " << ntcs << ")" - << std::endl; - } - - void - got_tp_end(const std::string& reason) - { - std::cout << "got_tp_end(" << reason << ")" << std::endl; - } - - void - got_tc_start(const std::string& tcname) - { - std::cout << "got_tc_start(" << tcname << ")" << std::endl; - } - - void - got_tc_end(const atf::tests::tcr& tcr) - { - std::string r; - if (tcr.get_state() == atf::tests::tcr::passed_state) - r = "passed"; - else if (tcr.get_state() == atf::tests::tcr::failed_state) - r = "failed, " + tcr.get_reason(); - else if (tcr.get_state() == atf::tests::tcr::skipped_state) - r = "skipped, " + tcr.get_reason(); - else - UNREACHABLE; - - std::cout << "got_tc_end(" << r << ")" << std::endl; - } - - void - got_tc_stdout_line(const std::string& line) - { - std::cout << "got_tc_stdout_line(" << line << ")" << std::endl; - } - - void - got_tc_stderr_line(const std::string& line) - { - std::cout << "got_tc_stderr_line(" << line << ")" << std::endl; - } - - void - got_eof(void) - { - std::cout << "got_eof()" << std::endl; - } - -public: - tps_reader(std::istream& is) : - atf::formats::atf_tps_reader(is) - { - } - - void - read(const std::string& outname, const std::string& errname) - { - atf_tps_reader::read(); - } -}; - -template< class R > -void -process(const std::string& file, const std::string& outname = "", - const std::string& errname = "") -{ - try { - std::ifstream is(file.c_str()); - if (!is) - throw std::runtime_error("Cannot open `" + file + "'"); - R reader(is); - reader.read(outname, errname); - } catch (const atf::parser::parse_errors& pes) { - std::cerr << pes.what(); - } catch (const atf::parser::parse_error& pe) { - std::cerr << "LONELY PARSE ERROR: " << pe.first << ": " - << pe.second << std::endl; - } -} - -int -main(int argc, char* argv[]) -{ - atf_init_objects(); - - try { - if (argc < 3) { - std::cerr << "Missing arguments" << std::endl; - return EXIT_FAILURE; - } - std::string format(argv[1]); - std::string file(argv[2]); - - if (format == std::string("application/X-atf-atffile")) { - process< atffile_reader >(file); - } else if (format == std::string("application/X-atf-config")) { - process< config_reader >(file); - } else if (format == std::string("application/X-atf-tcs")) { - if (argc < 5) { - std::cerr << "Missing arguments" << std::endl; - return EXIT_FAILURE; - } - process< tcs_reader >(file, argv[3], argv[4]); - } else if (format == std::string("application/X-atf-tps")) { - process< tps_reader >(file); - } else { - std::cerr << "Unknown format " << format << std::endl; - } - } catch (const atf::formats::format_error& e) { - std::cerr << "Header format error: " << e.what() << std::endl; - } catch (const std::runtime_error& e) { - std::cerr << "UNEXPECTED ERROR: " << e.what() << std::endl; - } catch (...) { - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} diff --git a/dist/atf/tests/atf/formats/t_parsers.sh b/dist/atf/tests/atf/formats/t_parsers.sh deleted file mode 100644 index d322176bc413..000000000000 --- a/dist/atf/tests/atf/formats/t_parsers.sh +++ /dev/null @@ -1,199 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -run_header_tests() -{ - sd=$(atf_get_srcdir) - for f in d_headers_1 \ - d_headers_2 \ - d_headers_3 \ - d_headers_4 \ - d_headers_5 \ - d_headers_6 \ - d_headers_7 \ - d_headers_8 \ - d_headers_9 \ - d_headers_10 \ - d_headers_11 \ - d_headers_12 - do - sed -e "s,@CONTENT_TYPE@,${1},g" \ - -e "s,@CONTENT_VERSION@,${2},g" \ - <${sd}/${f} >${f} - run_tests ${1} ${f} - done -} - -run_tests() -{ - type=${1}; shift - sd=$(atf_get_srcdir) - while [ ${#} -gt 0 ]; do - rm -f expout experr outin errin - - [ -f ${1} ] || cp ${sd}/${1} ${1} - - if [ -f ${sd}/${1}.expout ]; then - cp ${sd}/${1}.expout expout - else - touch expout - fi - - if [ -f ${sd}/${1}.experr ]; then - cp ${sd}/${1}.experr experr - else - touch experr - fi - - if [ -f ${sd}/${1}.outin ]; then - cp ${sd}/${1}.outin outin - else - touch outin - fi - - if [ -f ${sd}/${1}.errin ]; then - cp ${sd}/${1}.errin errin - else - touch errin - fi - - atf_check "${sd}/h_parser ${type} ${1} outin errin" 0 expout experr - - shift - done -} - -atf_test_case atffile -atffile_head() -{ - atf_set "descr" "Verifies the application/X-atf-atffile parser" -} -atffile_body() -{ - run_header_tests application/X-atf-atffile 1 - run_tests application/X-atf-atffile \ - d_atffile_1 \ - d_atffile_2 \ - d_atffile_3 \ - d_atffile_4 \ - d_atffile_5 \ - d_atffile_6 \ - d_atffile_50 \ - d_atffile_51 \ - d_atffile_52 \ - d_atffile_53 \ - d_atffile_54 -} - -atf_test_case config -config_head() -{ - atf_set "descr" "Verifies the application/X-atf-config parser" -} -config_body() -{ - run_header_tests application/X-atf-config 1 - run_tests application/X-atf-config \ - d_config_1 \ - d_config_2 \ - d_config_3 \ - d_config_4 \ - d_config_50 \ - d_config_51 \ - d_config_52 \ - d_config_53 \ - d_config_54 -} - -atf_test_case tcs -tcs_head() -{ - atf_set "descr" "Verifies the application/X-atf-tcs parser" -} -tcs_body() -{ - run_header_tests application/X-atf-tcs 1 - run_tests application/X-atf-tcs \ - d_tcs_1 \ - d_tcs_2 \ - d_tcs_3 \ - d_tcs_4 \ - d_tcs_5 \ - d_tcs_50 \ - d_tcs_51 \ - d_tcs_52 \ - d_tcs_53 \ - d_tcs_54 \ - d_tcs_55 \ - d_tcs_56 \ - d_tcs_57 -} - -atf_test_case tps -tps_head() -{ - atf_set "descr" "Verifies the application/X-atf-tps parser" -} -tps_body() -{ - run_header_tests application/X-atf-tps 1 - run_tests application/X-atf-tps \ - d_tps_1 \ - d_tps_2 \ - d_tps_3 \ - d_tps_4 \ - d_tps_5 \ - d_tps_50 \ - d_tps_51 \ - d_tps_52 \ - d_tps_53 \ - d_tps_54 \ - d_tps_55 \ - d_tps_56 \ - d_tps_57 \ - d_tps_58 \ - d_tps_59 \ - d_tps_60 \ - d_tps_61 \ - d_tps_62 \ - d_tps_63 \ - d_tps_64 \ - d_tps_65 \ - d_tps_66 -} - -atf_init_test_cases() -{ - atf_add_test_case atffile - atf_add_test_case config - atf_add_test_case tcs - atf_add_test_case tps -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/formats/t_writers.cpp b/dist/atf/tests/atf/formats/t_writers.cpp deleted file mode 100644 index 909b013de648..000000000000 --- a/dist/atf/tests/atf/formats/t_writers.cpp +++ /dev/null @@ -1,454 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/formats.hpp" -#include "atf-c++/macros.hpp" -#include "atf-c++/text.hpp" - -static -void -print_indented(const std::string& str) -{ - std::vector< std::string > ws = atf::text::split(str, "\n"); - for (std::vector< std::string >::const_iterator iter = ws.begin(); - iter != ws.end(); iter++) - std::cout << ">>" << *iter << "<<" << std::endl; -} - -// XXX Should this string handling and verbosity level be part of the -// ATF_CHECK_EQUAL macro? It may be hard to predict sometimes that a -// string can have newlines in it, and so the error message generated -// at the moment will be bogus if there are some. -static -void -check_equal(const std::string& str, const std::string& exp) -{ - if (str != exp) { - std::cout << "String equality check failed." << std::endl - << "Adding >> and << to delimit the string boundaries " - "below." << std::endl; - std::cout << "GOT:" << std::endl; - print_indented(str); - std::cout << "EXPECTED:" << std::endl; - print_indented(exp); - ATF_FAIL("Constructed string differs from the expected one"); - } -} - -ATF_TEST_CASE(tcs); -ATF_TEST_CASE_HEAD(tcs) -{ - set_md_var("descr", "Verifies the application/X-atf-tcs writer"); -} -ATF_TEST_CASE_BODY(tcs) -{ - std::ostringstream exprss, exposs, expess; - std::ostringstream rss, oss, ess; - -#define RESET \ - exprss.str(""); exposs.str(""); expess.str(""); \ - rss.str(""); oss.str(""); ess.str("") - -#define CHECK \ - check_equal(rss.str(), exprss.str()); \ - check_equal(oss.str(), exposs.str()); \ - check_equal(ess.str(), expess.str()) - - { - RESET; - - atf::formats::atf_tcs_writer w(rss, oss, ess, 0); - exprss << "Content-Type: application/X-atf-tcs; version=\"1\"" - << std::endl << std::endl - << "tcs-count: 0" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tcs_writer w(rss, oss, ess, 123); - exprss << "Content-Type: application/X-atf-tcs; version=\"1\"" - << std::endl << std::endl - << "tcs-count: 123" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tcs_writer w(rss, oss, ess, 1); - exprss << "Content-Type: application/X-atf-tcs; version=\"1\"" - << std::endl << std::endl - << "tcs-count: 1" << std::endl; - CHECK; - - w.start_tc("foo"); - exprss << "tc-start: foo" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::passed_state)); - exprss << "tc-end: foo, passed" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tcs_writer w(rss, oss, ess, 1); - exprss << "Content-Type: application/X-atf-tcs; version=\"1\"" - << std::endl << std::endl - << "tcs-count: 1" << std::endl; - CHECK; - - w.start_tc("foo"); - exprss << "tc-start: foo" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::failed_state, - "Failed reason, comma")); - exprss << "tc-end: foo, failed, Failed reason, comma" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tcs_writer w(rss, oss, ess, 1); - exprss << "Content-Type: application/X-atf-tcs; version=\"1\"" - << std::endl << std::endl - << "tcs-count: 1" << std::endl; - CHECK; - - w.start_tc("foo"); - exprss << "tc-start: foo" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::skipped_state, - "Skipped reason, comma")); - exprss << "tc-end: foo, skipped, Skipped reason, comma" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tcs_writer w(rss, oss, ess, 3); - exprss << "Content-Type: application/X-atf-tcs; version=\"1\"" - << std::endl << std::endl - << "tcs-count: 3" << std::endl; - CHECK; - - w.start_tc("foo"); - exprss << "tc-start: foo" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::passed_state)); - exprss << "tc-end: foo, passed" << std::endl; - exposs << "__atf_tc_separator__" << std::endl; - expess << "__atf_tc_separator__" << std::endl; - CHECK; - - w.start_tc("bar"); - exprss << "tc-start: bar" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::failed_state, - "The reason")); - exprss << "tc-end: bar, failed, The reason" << std::endl; - exposs << "__atf_tc_separator__" << std::endl; - expess << "__atf_tc_separator__" << std::endl; - CHECK; - - w.start_tc("baz"); - exprss << "tc-start: baz" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::skipped_state, - "The reason")); - exprss << "tc-end: baz, skipped, The reason" << std::endl; - CHECK; - } - -#undef CHECK -#undef RESET -} - -ATF_TEST_CASE(tps); -ATF_TEST_CASE_HEAD(tps) -{ - set_md_var("descr", "Verifies the application/X-atf-tps writer"); -} -ATF_TEST_CASE_BODY(tps) -{ - std::ostringstream expss; - std::ostringstream ss; - -#define RESET \ - expss.str(""); \ - ss.str("") - -#define CHECK \ - check_equal(ss.str(), expss.str()) - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.info("foo", "bar"); - expss << "info: foo, bar" << std::endl; - CHECK; - - w.info("baz", "second info"); - expss << "info: baz, second info" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(0); - expss << "tps-count: 0" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(123); - expss << "tps-count: 123" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(2); - expss << "tps-count: 2" << std::endl; - CHECK; - - w.start_tp("foo", 0); - expss << "tp-start: foo, 0" << std::endl; - CHECK; - - w.end_tp(""); - expss << "tp-end: foo" << std::endl; - CHECK; - - w.start_tp("bar", 0); - expss << "tp-start: bar, 0" << std::endl; - CHECK; - - w.end_tp("failed program"); - expss << "tp-end: bar, failed program" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(1); - expss << "tps-count: 1" << std::endl; - CHECK; - - w.start_tp("foo", 1); - expss << "tp-start: foo, 1" << std::endl; - CHECK; - - w.start_tc("brokentc"); - expss << "tc-start: brokentc" << std::endl; - CHECK; - - w.end_tp("aborted"); - expss << "tp-end: foo, aborted" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(1); - expss << "tps-count: 1" << std::endl; - CHECK; - - w.start_tp("thetp", 3); - expss << "tp-start: thetp, 3" << std::endl; - CHECK; - - w.start_tc("passtc"); - expss << "tc-start: passtc" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::passed_state)); - expss << "tc-end: passtc, passed" << std::endl; - CHECK; - - w.start_tc("failtc"); - expss << "tc-start: failtc" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::failed_state, - "The reason")); - expss << "tc-end: failtc, failed, The reason" << std::endl; - CHECK; - - w.start_tc("skiptc"); - expss << "tc-start: skiptc" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::skipped_state, - "The reason")); - expss << "tc-end: skiptc, skipped, The reason" << std::endl; - CHECK; - - w.end_tp(""); - expss << "tp-end: thetp" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(1); - expss << "tps-count: 1" << std::endl; - CHECK; - - w.start_tp("thetp", 1); - expss << "tp-start: thetp, 1" << std::endl; - CHECK; - - w.start_tc("thetc"); - expss << "tc-start: thetc" << std::endl; - CHECK; - - w.stdout_tc("a line"); - expss << "tc-so:a line" << std::endl; - CHECK; - - w.stdout_tc("another line"); - expss << "tc-so:another line" << std::endl; - CHECK; - - w.stderr_tc("an error message"); - expss << "tc-se:an error message" << std::endl; - CHECK; - - w.end_tc(atf::tests::tcr(atf::tests::tcr::passed_state)); - expss << "tc-end: thetc, passed" << std::endl; - CHECK; - - w.end_tp(""); - expss << "tp-end: thetp" << std::endl; - CHECK; - } - - { - RESET; - - atf::formats::atf_tps_writer w(ss); - expss << "Content-Type: application/X-atf-tps; version=\"2\"" - << std::endl << std::endl; - CHECK; - - w.ntps(1); - expss << "tps-count: 1" << std::endl; - CHECK; - - w.start_tp("thetp", 0); - expss << "tp-start: thetp, 0" << std::endl; - CHECK; - - w.end_tp(""); - expss << "tp-end: thetp" << std::endl; - CHECK; - - w.info("foo", "bar"); - expss << "info: foo, bar" << std::endl; - CHECK; - - w.info("baz", "second value"); - expss << "info: baz, second value" << std::endl; - CHECK; - } - -#undef CHECK -#undef RESET -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, tcs); - ATF_ADD_TEST_CASE(tcs, tps); -} diff --git a/dist/atf/tests/atf/test_programs/Atffile b/dist/atf/tests/atf/test_programs/Atffile deleted file mode 100644 index c45bcca634bb..000000000000 --- a/dist/atf/tests/atf/test_programs/Atffile +++ /dev/null @@ -1,12 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: t_config -tp: t_meta_data -tp: t_workdir -tp: t_env -tp: t_fork -tp: t_srcdir -tp: t_cleanup -tp: t_status diff --git a/dist/atf/tests/atf/test_programs/common.sh b/dist/atf/tests/atf/test_programs/common.sh deleted file mode 100644 index e61ae72f38af..000000000000 --- a/dist/atf/tests/atf/test_programs/common.sh +++ /dev/null @@ -1,38 +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. -# - -get_helpers() -{ - srcdir=$(atf_get_srcdir) - echo ${srcdir}/h_c - echo ${srcdir}/h_cpp - echo ${srcdir}/h_sh -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/h_c.c b/dist/atf/tests/atf/test_programs/h_c.c deleted file mode 100644 index 22b791ac4ba6..000000000000 --- a/dist/atf/tests/atf/test_programs/h_c.c +++ /dev/null @@ -1,695 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007, 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 - -#include -#include -#include -#include - -#include - -#include "atf-c/env.h" -#include "atf-c/fs.h" -#include "atf-c/text.h" - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -#define CE(stm) ATF_CHECK(!atf_is_error(stm)) - -static -void -write_cwd(const atf_tc_t *tc, const char *confvar) -{ - atf_fs_path_t cwd; - const char *p; - FILE *f; - - p = atf_tc_get_config_var(tc, confvar); - - f = fopen(p, "w"); - if (f == NULL) - atf_tc_fail("Could not open %s for writing", p); - - CE(atf_fs_getcwd(&cwd)); - fprintf(f, "%s\n", atf_fs_path_cstring(&cwd)); - atf_fs_path_fini(&cwd); - - fclose(f); -} - -static -void -safe_mkdir(const char* path) -{ - if (mkdir(path, 0755) == -1) - atf_tc_fail("mkdir(2) of %s failed", path); -} - -static -void -safe_remove(const char* path) -{ - if (unlink(path) == -1) - atf_tc_fail("unlink(2) of %s failed", path); -} - -static -void -touch(const char *path) -{ - int fd; - fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, 0644); - if (fd == -1) - atf_tc_fail("Could not create file %s", path); - close(fd); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_cleanup". - * --------------------------------------------------------------------- */ - -ATF_TC_WITH_CLEANUP(cleanup_pass); -ATF_TC_HEAD(cleanup_pass, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test " - "program"); -} -ATF_TC_BODY(cleanup_pass, tc) -{ - touch(atf_tc_get_config_var(tc, "tmpfile")); -} -ATF_TC_CLEANUP(cleanup_pass, tc) -{ - bool cleanup; - - CE(atf_text_to_bool(atf_tc_get_config_var(tc, "cleanup"), &cleanup)); - - if (cleanup) - safe_remove(atf_tc_get_config_var(tc, "tmpfile")); -} - -ATF_TC_WITH_CLEANUP(cleanup_fail); -ATF_TC_HEAD(cleanup_fail, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test " - "program"); -} -ATF_TC_BODY(cleanup_fail, tc) -{ - touch(atf_tc_get_config_var(tc, "tmpfile")); - atf_tc_fail("On purpose"); -} -ATF_TC_CLEANUP(cleanup_fail, tc) -{ - bool cleanup; - - CE(atf_text_to_bool(atf_tc_get_config_var(tc, "cleanup"), &cleanup)); - - if (cleanup) - safe_remove(atf_tc_get_config_var(tc, "tmpfile")); -} - -ATF_TC_WITH_CLEANUP(cleanup_skip); -ATF_TC_HEAD(cleanup_skip, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test " - "program"); -} -ATF_TC_BODY(cleanup_skip, tc) -{ - touch(atf_tc_get_config_var(tc, "tmpfile")); - atf_tc_skip("On purpose"); -} -ATF_TC_CLEANUP(cleanup_skip, tc) -{ - bool cleanup; - - CE(atf_text_to_bool(atf_tc_get_config_var(tc, "cleanup"), &cleanup)); - - if (cleanup) - safe_remove(atf_tc_get_config_var(tc, "tmpfile")); -} - -ATF_TC_WITH_CLEANUP(cleanup_curdir); -ATF_TC_HEAD(cleanup_curdir, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test " - "program"); -} -ATF_TC_BODY(cleanup_curdir, tc) -{ - FILE *f; - - f = fopen("oldvalue", "w"); - if (f == NULL) - atf_tc_fail("Failed to create oldvalue file"); - fprintf(f, "1234"); - fclose(f); -} -ATF_TC_CLEANUP(cleanup_curdir, tc) -{ - FILE *f; - - f = fopen("oldvalue", "r"); - if (f != NULL) { - int i; - if (fscanf(f, "%d", &i) != 1) - fprintf(stderr, "Failed to read old value\n"); - else - printf("Old value: %d", i); - fclose(f); - } -} - -ATF_TC_WITH_CLEANUP(cleanup_sigterm); -ATF_TC_HEAD(cleanup_sigterm, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test " - "program"); -} -ATF_TC_BODY(cleanup_sigterm, tc) -{ - char *nofile; - - touch(atf_tc_get_config_var(tc, "tmpfile")); - kill(getpid(), SIGTERM); - - CE(atf_text_format(&nofile, "%s.no", - atf_tc_get_config_var(tc, "tmpfile"))); - touch(nofile); - free(nofile); -} -ATF_TC_CLEANUP(cleanup_sigterm, tc) -{ - safe_remove(atf_tc_get_config_var(tc, "tmpfile")); -} - -ATF_TC_WITH_CLEANUP(cleanup_fork); -ATF_TC_HEAD(cleanup_fork, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test " - "program"); -} -ATF_TC_BODY(cleanup_fork, tc) -{ -} -ATF_TC_CLEANUP(cleanup_fork, tc) -{ - close(STDOUT_FILENO); - close(STDERR_FILENO); - close(3); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_config". - * --------------------------------------------------------------------- */ - -ATF_TC(config_unset); -ATF_TC_HEAD(config_unset, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_config test " - "program"); -} -ATF_TC_BODY(config_unset, tc) -{ - ATF_CHECK(!atf_tc_has_config_var(tc, "test")); -} - -ATF_TC(config_empty); -ATF_TC_HEAD(config_empty, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_config test " - "program"); -} -ATF_TC_BODY(config_empty, tc) -{ - ATF_CHECK(atf_tc_has_config_var(tc, "test")); - ATF_CHECK(strlen(atf_tc_get_config_var(tc, "test")) == 0); -} - -ATF_TC(config_value); -ATF_TC_HEAD(config_value, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_config test " - "program"); -} -ATF_TC_BODY(config_value, tc) -{ - ATF_CHECK(atf_tc_has_config_var(tc, "test")); - ATF_CHECK(strcmp(atf_tc_get_config_var(tc, "test"), "foo") == 0); -} - -ATF_TC(config_multi_value); -ATF_TC_HEAD(config_multi_value, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_config test " - "program"); -} -ATF_TC_BODY(config_multi_value, tc) -{ - ATF_CHECK(atf_tc_has_config_var(tc, "test")); - ATF_CHECK(strcmp(atf_tc_get_config_var(tc, "test"), "foo bar") == 0); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_env". - * --------------------------------------------------------------------- */ - -ATF_TC(env_home); -ATF_TC_HEAD(env_home, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_env test " - "program"); -} -ATF_TC_BODY(env_home, tc) -{ - atf_fs_path_t cwd, home; - atf_fs_stat_t stcwd, sthome; - - ATF_CHECK(atf_env_has("HOME")); - - CE(atf_fs_getcwd(&cwd)); - CE(atf_fs_path_init_fmt(&home, "%s", atf_env_get("HOME"))); - - CE(atf_fs_stat_init(&stcwd, &cwd)); - CE(atf_fs_stat_init(&sthome, &home)); - - ATF_CHECK_EQUAL(atf_fs_stat_get_device(&stcwd), - atf_fs_stat_get_device(&sthome)); - ATF_CHECK_EQUAL(atf_fs_stat_get_inode(&stcwd), - atf_fs_stat_get_inode(&sthome)); -} - -ATF_TC(env_list); -ATF_TC_HEAD(env_list, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_env test " - "program"); -} -ATF_TC_BODY(env_list, tc) -{ - int exitcode = system("env"); - ATF_CHECK(WIFEXITED(exitcode)); - ATF_CHECK(WEXITSTATUS(exitcode) == EXIT_SUCCESS); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_fork". - * --------------------------------------------------------------------- */ - -ATF_TC(fork_mangle_fds); -ATF_TC_HEAD(fork_mangle_fds, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_fork test " - "program"); -} -ATF_TC_BODY(fork_mangle_fds, tc) -{ - long resfd; - - CE(atf_text_to_long(atf_tc_get_config_var(tc, "resfd"), &resfd)); - - if (close(STDIN_FILENO) == -1) - atf_tc_fail("Failed to close stdin"); - if (close(STDOUT_FILENO) == -1) - atf_tc_fail("Failed to close stdout"); - if (close(STDERR_FILENO) == -1) - atf_tc_fail("Failed to close stderr"); - if (close(resfd) == -1) - atf_tc_fail("Failed to close results descriptor"); - -#if defined(F_CLOSEM) - if (fcntl(0, F_CLOSEM) == -1) - atf_tc_fail("Failed to close everything"); -#endif -} - -ATF_TC(fork_stop); -ATF_TC_HEAD(fork_stop, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_fork test " - "program"); -} -ATF_TC_BODY(fork_stop, tc) -{ - FILE *f; - const char *dfstr, *pfstr; - - dfstr = atf_tc_get_config_var(tc, "donefile"); - pfstr = atf_tc_get_config_var(tc, "pidfile"); - - f = fopen(pfstr, "w"); - if (f == NULL) - atf_tc_fail("Failed to create pidfile %s", pfstr); - fprintf(f, "%d", getpid()); - fclose(f); - printf("Wrote pid file\n"); - - printf("Waiting for done file\n"); - while (access(dfstr, F_OK) != 0) - usleep(10000); - printf("Exiting\n"); -} - -ATF_TC(fork_umask); -ATF_TC_HEAD(fork_umask, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_fork test " - "program"); -} -ATF_TC_BODY(fork_umask, tc) -{ - printf("umask: %04o\n", umask(0)); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_meta_data". - * --------------------------------------------------------------------- */ - -ATF_TC(ident_1); -ATF_TC_HEAD(ident_1, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); -} -ATF_TC_BODY(ident_1, tc) -{ - ATF_CHECK(strcmp(atf_tc_get_md_var(tc, "ident"), "ident_1") == 0); -} - -ATF_TC(ident_2); -ATF_TC_HEAD(ident_2, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); -} -ATF_TC_BODY(ident_2, tc) -{ - ATF_CHECK(strcmp(atf_tc_get_md_var(tc, "ident"), "ident_2") == 0); -} - -ATF_TC(require_arch); -ATF_TC_HEAD(require_arch, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.arch", "%s", - atf_tc_get_config_var_wd(tc, "arch", "not-set")); -} -ATF_TC_BODY(require_arch, tc) -{ -} - -ATF_TC(require_config); -ATF_TC_HEAD(require_config, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.config", "var1 var2"); -} -ATF_TC_BODY(require_config, tc) -{ - printf("var1: %s\n", atf_tc_get_config_var(tc, "var1")); - printf("var2: %s\n", atf_tc_get_config_var(tc, "var2")); -} - -ATF_TC(require_machine); -ATF_TC_HEAD(require_machine, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.machine", "%s", - atf_tc_get_config_var_wd(tc, "machine", "not-set")); -} -ATF_TC_BODY(require_machine, tc) -{ -} - -ATF_TC(require_progs_body); -ATF_TC_HEAD(require_progs_body, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); -} -ATF_TC_BODY(require_progs_body, tc) -{ - atf_tc_require_prog(atf_tc_get_config_var(tc, "progs")); -} - -ATF_TC(require_progs_head); -ATF_TC_HEAD(require_progs_head, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.progs", "%s", - atf_tc_get_config_var_wd(tc, "progs", "not-set")); -} -ATF_TC_BODY(require_progs_head, tc) -{ -} - -ATF_TC(require_user); -ATF_TC_HEAD(require_user, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.user", "%s", - atf_tc_get_config_var_wd(tc, "user", "not-set")); -} -ATF_TC_BODY(require_user, tc) -{ -} - -ATF_TC(require_user2); -ATF_TC_HEAD(require_user2, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.user", "%s", - atf_tc_get_config_var_wd(tc, "user2", "not-set")); -} -ATF_TC_BODY(require_user2, tc) -{ -} - -ATF_TC(require_user3); -ATF_TC_HEAD(require_user3, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "require.user", "%s", - atf_tc_get_config_var_wd(tc, "user3", "not-set")); -} -ATF_TC_BODY(require_user3, tc) -{ -} - -ATF_TC(timeout); -ATF_TC_HEAD(timeout, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "timeout", "%s", - atf_tc_get_config_var_wd(tc, "timeout", "0")); -} -ATF_TC_BODY(timeout, tc) -{ - long s; - - CE(atf_text_to_long(atf_tc_get_config_var(tc, "sleep"), &s)); - sleep(s); -} - -ATF_TC(timeout2); -ATF_TC_HEAD(timeout2, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_meta_data " - "test program"); - atf_tc_set_md_var(tc, "timeout", "%s", - atf_tc_get_config_var_wd(tc, "timeout2", "0")); -} -ATF_TC_BODY(timeout2, tc) -{ - long s; - - CE(atf_text_to_long(atf_tc_get_config_var(tc, "sleep2"), &s)); - sleep(s); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_srcdir". - * --------------------------------------------------------------------- */ - -ATF_TC(srcdir_exists); -ATF_TC_HEAD(srcdir_exists, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_srcdir test " - "program"); -} -ATF_TC_BODY(srcdir_exists, tc) -{ - atf_fs_path_t p; - bool b; - - CE(atf_fs_path_init_fmt(&p, "%s/datafile", - atf_tc_get_config_var(tc, "srcdir"))); - CE(atf_fs_exists(&p, &b)); - if (!b) - atf_tc_fail("Cannot find datafile"); - atf_fs_path_fini(&p); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_status". - * --------------------------------------------------------------------- */ - -ATF_TC(status_newlines_fail); -ATF_TC_HEAD(status_newlines_fail, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_status test " - "program"); -} -ATF_TC_BODY(status_newlines_fail, tc) -{ - atf_tc_fail("First line\nSecond line"); -} - -ATF_TC(status_newlines_skip); -ATF_TC_HEAD(status_newlines_skip, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_status test " - "program"); -} -ATF_TC_BODY(status_newlines_skip, tc) -{ - atf_tc_skip("First line\nSecond line"); -} - -/* --------------------------------------------------------------------- - * Helper tests for "t_workdir". - * --------------------------------------------------------------------- */ - -ATF_TC(workdir_path); -ATF_TC_HEAD(workdir_path, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_workdir test " - "program"); -} -ATF_TC_BODY(workdir_path, tc) -{ - write_cwd(tc, "pathfile"); -} - -ATF_TC(workdir_cleanup); -ATF_TC_HEAD(workdir_cleanup, tc) -{ - atf_tc_set_md_var(tc, "descr", "Helper test case for the t_workdir test " - "program"); -} -ATF_TC_BODY(workdir_cleanup, tc) -{ - write_cwd(tc, "pathfile"); - - safe_mkdir("1"); - safe_mkdir("1/1"); - safe_mkdir("1/2"); - safe_mkdir("1/3"); - safe_mkdir("1/3/1"); - safe_mkdir("1/3/2"); - safe_mkdir("2"); - touch("2/1"); - touch("2/2"); - safe_mkdir("2/3"); - touch("2/3/1"); -} - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - /* Add helper tests for t_cleanup. */ - ATF_TP_ADD_TC(tp, cleanup_pass); - ATF_TP_ADD_TC(tp, cleanup_fail); - ATF_TP_ADD_TC(tp, cleanup_skip); - ATF_TP_ADD_TC(tp, cleanup_curdir); - ATF_TP_ADD_TC(tp, cleanup_sigterm); - ATF_TP_ADD_TC(tp, cleanup_fork); - - /* Add helper tests for t_config. */ - ATF_TP_ADD_TC(tp, config_unset); - ATF_TP_ADD_TC(tp, config_empty); - ATF_TP_ADD_TC(tp, config_value); - ATF_TP_ADD_TC(tp, config_multi_value); - - /* Add helper tests for t_env. */ - ATF_TP_ADD_TC(tp, env_home); - ATF_TP_ADD_TC(tp, env_list); - - /* Add helper tests for t_fork. */ - ATF_TP_ADD_TC(tp, fork_mangle_fds); - ATF_TP_ADD_TC(tp, fork_stop); - ATF_TP_ADD_TC(tp, fork_umask); - - /* Add helper tests for t_meta_data. */ - ATF_TP_ADD_TC(tp, ident_1); - ATF_TP_ADD_TC(tp, ident_2); - ATF_TP_ADD_TC(tp, require_arch); - ATF_TP_ADD_TC(tp, require_config); - ATF_TP_ADD_TC(tp, require_machine); - ATF_TP_ADD_TC(tp, require_progs_body); - ATF_TP_ADD_TC(tp, require_progs_head); - ATF_TP_ADD_TC(tp, require_user); - ATF_TP_ADD_TC(tp, require_user2); - ATF_TP_ADD_TC(tp, require_user3); - ATF_TP_ADD_TC(tp, timeout); - ATF_TP_ADD_TC(tp, timeout2); - - /* Add helper tests for t_srcdir. */ - ATF_TP_ADD_TC(tp, srcdir_exists); - - /* Add helper tests for t_status. */ - ATF_TP_ADD_TC(tp, status_newlines_fail); - ATF_TP_ADD_TC(tp, status_newlines_skip); - - /* Add helper tests for t_workdir. */ - ATF_TP_ADD_TC(tp, workdir_path); - ATF_TP_ADD_TC(tp, workdir_cleanup); - - return atf_no_error(); -} diff --git a/dist/atf/tests/atf/test_programs/h_cpp.cpp b/dist/atf/tests/atf/test_programs/h_cpp.cpp deleted file mode 100644 index 380ccabc838e..000000000000 --- a/dist/atf/tests/atf/test_programs/h_cpp.cpp +++ /dev/null @@ -1,584 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 -#include - -#include "atf-c++/env.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/macros.hpp" -#include "atf-c++/text.hpp" - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -static -void -safe_mkdir(const char* path) -{ - if (::mkdir(path, 0755) == -1) - ATF_FAIL(std::string("mkdir(2) of ") + path + " failed"); -} - -static -void -touch(const std::string& path) -{ - std::ofstream os(path.c_str()); - if (!os) - ATF_FAIL("Could not create file " + path); - os.close(); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_cleanup". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE_WITH_CLEANUP(cleanup_pass); -ATF_TEST_CASE_HEAD(cleanup_pass) -{ - set_md_var("descr", "Helper test case for the t_cleanup test program"); -} -ATF_TEST_CASE_BODY(cleanup_pass) -{ - touch(get_config_var("tmpfile")); -} -ATF_TEST_CASE_CLEANUP(cleanup_pass) -{ - if (atf::text::to_bool(get_config_var("cleanup"))) - atf::fs::remove(atf::fs::path(get_config_var("tmpfile"))); -} - -ATF_TEST_CASE_WITH_CLEANUP(cleanup_fail); -ATF_TEST_CASE_HEAD(cleanup_fail) -{ - set_md_var("descr", "Helper test case for the t_cleanup test program"); -} -ATF_TEST_CASE_BODY(cleanup_fail) -{ - touch(get_config_var("tmpfile")); - ATF_FAIL("On purpose"); -} -ATF_TEST_CASE_CLEANUP(cleanup_fail) -{ - if (atf::text::to_bool(get_config_var("cleanup"))) - atf::fs::remove(atf::fs::path(get_config_var("tmpfile"))); -} - -ATF_TEST_CASE_WITH_CLEANUP(cleanup_skip); -ATF_TEST_CASE_HEAD(cleanup_skip) -{ - set_md_var("descr", "Helper test case for the t_cleanup test program"); -} -ATF_TEST_CASE_BODY(cleanup_skip) -{ - touch(get_config_var("tmpfile")); - ATF_SKIP("On purpose"); -} -ATF_TEST_CASE_CLEANUP(cleanup_skip) -{ - if (atf::text::to_bool(get_config_var("cleanup"))) - atf::fs::remove(atf::fs::path(get_config_var("tmpfile"))); -} - -ATF_TEST_CASE_WITH_CLEANUP(cleanup_curdir); -ATF_TEST_CASE_HEAD(cleanup_curdir) -{ - set_md_var("descr", "Helper test case for the t_cleanup test program"); -} -ATF_TEST_CASE_BODY(cleanup_curdir) -{ - std::ofstream os("oldvalue"); - if (!os) - ATF_FAIL("Failed to create oldvalue file"); - os << 1234; - os.close(); -} -ATF_TEST_CASE_CLEANUP(cleanup_curdir) -{ - std::ifstream is("oldvalue"); - if (is) { - int i; - is >> i; - std::cout << "Old value: " << i << std::endl; - is.close(); - } -} - -ATF_TEST_CASE_WITH_CLEANUP(cleanup_sigterm); -ATF_TEST_CASE_HEAD(cleanup_sigterm) -{ - set_md_var("descr", "Helper test case for the t_cleanup test program"); -} -ATF_TEST_CASE_BODY(cleanup_sigterm) -{ - touch(get_config_var("tmpfile")); - ::kill(::getpid(), SIGTERM); - touch(get_config_var("tmpfile") + ".no"); -} -ATF_TEST_CASE_CLEANUP(cleanup_sigterm) -{ - atf::fs::remove(atf::fs::path(get_config_var("tmpfile"))); -} - -ATF_TEST_CASE_WITH_CLEANUP(cleanup_fork); -ATF_TEST_CASE_HEAD(cleanup_fork) -{ - set_md_var("descr", "Helper test case for the t_cleanup test program"); -} -ATF_TEST_CASE_BODY(cleanup_fork) -{ -} -ATF_TEST_CASE_CLEANUP(cleanup_fork) -{ - ::close(STDOUT_FILENO); - ::close(STDERR_FILENO); - ::close(3); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_config". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(config_unset); -ATF_TEST_CASE_HEAD(config_unset) -{ - set_md_var("descr", "Helper test case for the t_config test program"); -} -ATF_TEST_CASE_BODY(config_unset) -{ - ATF_CHECK(!has_config_var("test")); -} - -ATF_TEST_CASE(config_empty); -ATF_TEST_CASE_HEAD(config_empty) -{ - set_md_var("descr", "Helper test case for the t_config test program"); -} -ATF_TEST_CASE_BODY(config_empty) -{ - ATF_CHECK_EQUAL(get_config_var("test"), ""); -} - -ATF_TEST_CASE(config_value); -ATF_TEST_CASE_HEAD(config_value) -{ - set_md_var("descr", "Helper test case for the t_config test program"); -} -ATF_TEST_CASE_BODY(config_value) -{ - ATF_CHECK_EQUAL(get_config_var("test"), "foo"); -} - -ATF_TEST_CASE(config_multi_value); -ATF_TEST_CASE_HEAD(config_multi_value) -{ - set_md_var("descr", "Helper test case for the t_config test program"); -} -ATF_TEST_CASE_BODY(config_multi_value) -{ - ATF_CHECK_EQUAL(get_config_var("test"), "foo bar"); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_env". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(env_home); -ATF_TEST_CASE_HEAD(env_home) -{ - set_md_var("descr", "Helper test case for the t_env test program"); -} -ATF_TEST_CASE_BODY(env_home) -{ - ATF_CHECK(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::get_current_dir()); - ATF_CHECK_EQUAL(fi1.get_device(), fi2.get_device()); - ATF_CHECK_EQUAL(fi1.get_inode(), fi2.get_inode()); -} - -ATF_TEST_CASE(env_list); -ATF_TEST_CASE_HEAD(env_list) -{ - set_md_var("descr", "Helper test case for the t_env test program"); -} -ATF_TEST_CASE_BODY(env_list) -{ - int exitcode = std::system("env"); - ATF_CHECK(WIFEXITED(exitcode)); - ATF_CHECK(WEXITSTATUS(exitcode) == EXIT_SUCCESS); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_fork". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(fork_mangle_fds); -ATF_TEST_CASE_HEAD(fork_mangle_fds) -{ - set_md_var("descr", "Helper test case for the t_fork test program"); -} -ATF_TEST_CASE_BODY(fork_mangle_fds) -{ - int resfd = std::atoi(get_config_var("resfd").c_str()); - - if (::close(STDIN_FILENO) == -1) - ATF_FAIL("Failed to close stdin"); - if (::close(STDOUT_FILENO) == -1) - ATF_FAIL("Failed to close stdout"); - if (::close(STDERR_FILENO) == -1) - ATF_FAIL("Failed to close stderr"); - if (::close(resfd) == -1) - ATF_FAIL("Failed to close results descriptor"); - -#if defined(F_CLOSEM) - if (::fcntl(0, F_CLOSEM) == -1) - ATF_FAIL("Failed to close everything"); -#endif -} - -ATF_TEST_CASE(fork_stop); -ATF_TEST_CASE_HEAD(fork_stop) -{ - set_md_var("descr", "Helper test case for the t_fork test program"); -} -ATF_TEST_CASE_BODY(fork_stop) -{ - std::ofstream os(get_config_var("pidfile").c_str()); - os << ::getpid() << std::endl; - os.close(); - std::cout << "Wrote pid file" << std::endl; - std::cout << "Waiting for done file" << std::endl; - while (::access(get_config_var("donefile").c_str(), F_OK) != 0) - ::usleep(10000); - std::cout << "Exiting" << std::endl; -} - -ATF_TEST_CASE(fork_umask); -ATF_TEST_CASE_HEAD(fork_umask) -{ - set_md_var("descr", "Helper test case for the t_fork test program"); -} -ATF_TEST_CASE_BODY(fork_umask) -{ - mode_t m = ::umask(0); - std::cout << "umask: " << std::setw(4) << std::setfill('0') - << std::oct << m << std::endl; - (void)::umask(m); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_meta_data". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(ident_1); -ATF_TEST_CASE_HEAD(ident_1) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); -} -ATF_TEST_CASE_BODY(ident_1) -{ - ATF_CHECK_EQUAL(get_md_var("ident"), "ident_1"); -} - -ATF_TEST_CASE(ident_2); -ATF_TEST_CASE_HEAD(ident_2) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); -} -ATF_TEST_CASE_BODY(ident_2) -{ - ATF_CHECK_EQUAL(get_md_var("ident"), "ident_2"); -} - -ATF_TEST_CASE(require_arch); -ATF_TEST_CASE_HEAD(require_arch) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.arch", get_config_var("arch", "not-set")); -} -ATF_TEST_CASE_BODY(require_arch) -{ -} - -ATF_TEST_CASE(require_config); -ATF_TEST_CASE_HEAD(require_config) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.config", "var1 var2"); -} -ATF_TEST_CASE_BODY(require_config) -{ - std::cout << "var1: " << get_config_var("var1") << std::endl; - std::cout << "var2: " << get_config_var("var2") << std::endl; -} - -ATF_TEST_CASE(require_machine); -ATF_TEST_CASE_HEAD(require_machine) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.machine", get_config_var("machine", "not-set")); -} -ATF_TEST_CASE_BODY(require_machine) -{ -} - -ATF_TEST_CASE(require_progs_body); -ATF_TEST_CASE_HEAD(require_progs_body) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); -} -ATF_TEST_CASE_BODY(require_progs_body) -{ - require_prog(get_config_var("progs")); -} - -ATF_TEST_CASE(require_progs_head); -ATF_TEST_CASE_HEAD(require_progs_head) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.progs", get_config_var("progs", "not-set")); -} -ATF_TEST_CASE_BODY(require_progs_head) -{ -} - -ATF_TEST_CASE(require_user); -ATF_TEST_CASE_HEAD(require_user) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.user", get_config_var("user", "not-set")); -} -ATF_TEST_CASE_BODY(require_user) -{ -} - -ATF_TEST_CASE(require_user2); -ATF_TEST_CASE_HEAD(require_user2) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.user", get_config_var("user2", "not-set")); -} -ATF_TEST_CASE_BODY(require_user2) -{ -} - -ATF_TEST_CASE(require_user3); -ATF_TEST_CASE_HEAD(require_user3) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("require.user", get_config_var("user3", "not-set")); -} -ATF_TEST_CASE_BODY(require_user3) -{ -} - -ATF_TEST_CASE(timeout); -ATF_TEST_CASE_HEAD(timeout) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("timeout", get_config_var("timeout", "0")); -} -ATF_TEST_CASE_BODY(timeout) -{ - sleep(atf::text::to_type< int >(get_config_var("sleep"))); -} - -ATF_TEST_CASE(timeout2); -ATF_TEST_CASE_HEAD(timeout2) -{ - set_md_var("descr", "Helper test case for the t_meta_data test program"); - set_md_var("timeout", get_config_var("timeout2", "0")); -} -ATF_TEST_CASE_BODY(timeout2) -{ - sleep(atf::text::to_type< int >(get_config_var("sleep2"))); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_srcdir". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(srcdir_exists); -ATF_TEST_CASE_HEAD(srcdir_exists) -{ - set_md_var("descr", "Helper test case for the t_srcdir test program"); -} -ATF_TEST_CASE_BODY(srcdir_exists) -{ - if (!atf::fs::exists(atf::fs::path(get_config_var("srcdir")) / - "datafile")) - ATF_FAIL("Cannot find datafile"); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_status". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(status_newlines_fail); -ATF_TEST_CASE_HEAD(status_newlines_fail) -{ - set_md_var("descr", "Helper test case for the t_status test program"); -} -ATF_TEST_CASE_BODY(status_newlines_fail) -{ - ATF_FAIL("First line\nSecond line"); -} - -ATF_TEST_CASE(status_newlines_skip); -ATF_TEST_CASE_HEAD(status_newlines_skip) -{ - set_md_var("descr", "Helper test case for the t_status test program"); -} -ATF_TEST_CASE_BODY(status_newlines_skip) -{ - ATF_SKIP("First line\nSecond line"); -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_workdir". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(workdir_path); -ATF_TEST_CASE_HEAD(workdir_path) -{ - set_md_var("descr", "Helper test case for the t_workdir test program"); -} -ATF_TEST_CASE_BODY(workdir_path) -{ - const std::string& p = get_config_var("pathfile"); - - std::ofstream os(p.c_str()); - if (!os) - ATF_FAIL("Could not open " + p + " for writing"); - - os << atf::fs::get_current_dir().str() << std::endl; - - os.close(); -} - -ATF_TEST_CASE(workdir_cleanup); -ATF_TEST_CASE_HEAD(workdir_cleanup) -{ - set_md_var("descr", "Helper test case for the t_workdir test program"); -} -ATF_TEST_CASE_BODY(workdir_cleanup) -{ - const std::string& p = get_config_var("pathfile"); - - std::ofstream os(p.c_str()); - if (!os) - ATF_FAIL("Could not open " + p + " for writing"); - - os << atf::fs::get_current_dir().str() << std::endl; - - os.close(); - - safe_mkdir("1"); - safe_mkdir("1/1"); - safe_mkdir("1/2"); - safe_mkdir("1/3"); - safe_mkdir("1/3/1"); - safe_mkdir("1/3/2"); - safe_mkdir("2"); - touch("2/1"); - touch("2/2"); - safe_mkdir("2/3"); - touch("2/3/1"); -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add helper tests for t_cleanup. - ATF_ADD_TEST_CASE(tcs, cleanup_pass); - ATF_ADD_TEST_CASE(tcs, cleanup_fail); - ATF_ADD_TEST_CASE(tcs, cleanup_skip); - ATF_ADD_TEST_CASE(tcs, cleanup_curdir); - ATF_ADD_TEST_CASE(tcs, cleanup_sigterm); - ATF_ADD_TEST_CASE(tcs, cleanup_fork); - - // Add helper tests for t_config. - ATF_ADD_TEST_CASE(tcs, config_unset); - ATF_ADD_TEST_CASE(tcs, config_empty); - ATF_ADD_TEST_CASE(tcs, config_value); - ATF_ADD_TEST_CASE(tcs, config_multi_value); - - // Add helper tests for t_env. - ATF_ADD_TEST_CASE(tcs, env_home); - ATF_ADD_TEST_CASE(tcs, env_list); - - // Add helper tests for t_fork. - ATF_ADD_TEST_CASE(tcs, fork_mangle_fds); - ATF_ADD_TEST_CASE(tcs, fork_stop); - ATF_ADD_TEST_CASE(tcs, fork_umask); - - // Add helper tests for t_meta_data. - ATF_ADD_TEST_CASE(tcs, ident_1); - ATF_ADD_TEST_CASE(tcs, ident_2); - ATF_ADD_TEST_CASE(tcs, require_arch); - ATF_ADD_TEST_CASE(tcs, require_config); - ATF_ADD_TEST_CASE(tcs, require_machine); - ATF_ADD_TEST_CASE(tcs, require_progs_body); - ATF_ADD_TEST_CASE(tcs, require_progs_head); - ATF_ADD_TEST_CASE(tcs, require_user); - ATF_ADD_TEST_CASE(tcs, require_user2); - ATF_ADD_TEST_CASE(tcs, require_user3); - ATF_ADD_TEST_CASE(tcs, timeout); - ATF_ADD_TEST_CASE(tcs, timeout2); - - // Add helper tests for t_srcdir. - ATF_ADD_TEST_CASE(tcs, srcdir_exists); - - // Add helper tests for t_status. - ATF_ADD_TEST_CASE(tcs, status_newlines_fail); - ATF_ADD_TEST_CASE(tcs, status_newlines_skip); - - // Add helper tests for t_workdir. - ATF_ADD_TEST_CASE(tcs, workdir_path); - ATF_ADD_TEST_CASE(tcs, workdir_cleanup); -} diff --git a/dist/atf/tests/atf/test_programs/h_sh.sh b/dist/atf/tests/atf/test_programs/h_sh.sh deleted file mode 100644 index c9d4f8594fd0..000000000000 --- a/dist/atf/tests/atf/test_programs/h_sh.sh +++ /dev/null @@ -1,481 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# ------------------------------------------------------------------------- -# Helper tests for "t_cleanup". -# ------------------------------------------------------------------------- - -atf_test_case cleanup_pass -cleanup_pass_head() -{ - atf_set "descr" "Helper test case for the t_cleanup test program" -} -cleanup_pass_body() -{ - touch $(atf_config_get tmpfile) -} -cleanup_pass_cleanup() -{ - if [ $(atf_config_get cleanup no) = yes ]; then - rm $(atf_config_get tmpfile) - fi -} - -atf_test_case cleanup_fail -cleanup_fail_head() -{ - atf_set "descr" "Helper test case for the t_cleanup test program" -} -cleanup_fail_body() -{ - touch $(atf_config_get tmpfile) - atf_fail "On purpose" -} -cleanup_fail_cleanup() -{ - if [ $(atf_config_get cleanup no) = yes ]; then - rm $(atf_config_get tmpfile) - fi -} - -atf_test_case cleanup_skip -cleanup_skip_head() -{ - atf_set "descr" "Helper test case for the t_cleanup test program" -} -cleanup_skip_body() -{ - touch $(atf_config_get tmpfile) - atf_skip "On purpose" -} -cleanup_skip_cleanup() -{ - if [ $(atf_config_get cleanup no) = yes ]; then - rm $(atf_config_get tmpfile) - fi -} - -atf_test_case cleanup_curdir -cleanup_curdir_head() -{ - atf_set "descr" "Helper test case for the t_cleanup test program" -} -cleanup_curdir_body() -{ - echo 1234 >oldvalue -} -cleanup_curdir_cleanup() -{ - test -f oldvalue && echo "Old value: $(cat oldvalue)" -} - -atf_test_case cleanup_sigterm -cleanup_sigterm_head() -{ - atf_set "descr" "Helper test case for the t_cleanup test program" -} -cleanup_sigterm_body() -{ - touch $(atf_config_get tmpfile) - kill $$ - touch $(atf_config_get tmpfile).no -} -cleanup_sigterm_cleanup() -{ - rm $(atf_config_get tmpfile) -} - -atf_test_case cleanup_fork -cleanup_fork_head() -{ - atf_set "descr" "Helper test case for the t_cleanup test program" -} -cleanup_fork_body() -{ - : -} -cleanup_fork_cleanup() -{ - exec 1>out - exec 2>err - exec 3>res - rm -f out err res -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_config". -# ------------------------------------------------------------------------- - -atf_test_case config_unset -config_unset_head() -{ - atf_set "descr" "Helper test case for the t_config test program" -} -config_unset_body() -{ - atf_config_has 'test' && atf_fail "Test variable already defined" -} - -atf_test_case config_empty -config_empty_head() -{ - atf_set "descr" "Helper test case for the t_config test program" -} -config_empty_body() -{ - atf_check_equal "$(atf_config_get 'test')" "" -} - -atf_test_case config_value -config_value_head() -{ - atf_set "descr" "Helper test case for the t_config test program" -} -config_value_body() -{ - atf_check_equal "$(atf_config_get 'test')" "foo" -} - -atf_test_case config_multi_value -config_multi_value_head() -{ - atf_set "descr" "Helper test case for the t_config test program" -} -config_multi_value_body() -{ - atf_check_equal "$(atf_config_get 'test')" "foo bar" -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_env". -# ------------------------------------------------------------------------- - -atf_test_case env_home -env_home_head() -{ - atf_set "descr" "Helper test case for the t_env test program" -} -env_home_body() -{ - [ -n "${HOME}" ] || atf_fail "HOME is undefined" - h=$(cd ${HOME} && pwd -P) - [ "${h}" = "$(pwd -P)" ] || atf_fail "HOME is invalid" -} - -atf_test_case env_list -env_list_head() -{ - atf_set "descr" "Helper test case for the t_env test program" -} -env_list_body() -{ - env -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_fork". -# ------------------------------------------------------------------------- - -atf_test_case fork_mangle_fds -fork_mangle_fds_head() -{ - atf_set "descr" "Helper test case for the t_fork test program" -} -fork_mangle_fds_body() -{ - resfd=$(atf_config_get resfd) - touch in - exec 0out - exec 2>err - eval "exec ${resfd}>res" -} - -atf_test_case fork_stop -fork_stop_head() -{ - atf_set "descr" "Helper test case for the t_fork test program" -} -fork_stop_body() -{ - echo ${$} >$(atf_config_get pidfile) - echo "Wrote pid file" - echo "Waiting for done file" - while ! test -f $(atf_config_get donefile); do sleep 1; done - echo "Exiting" -} - -atf_test_case fork_umask -fork_umask_head() -{ - atf_set "descr" "Helper test case for the t_fork test program" -} -fork_umask_body() -{ - echo "umask: $(umask)" -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_meta_data". -# ------------------------------------------------------------------------- - -atf_test_case ident_1 -ident_1_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" -} -ident_1_body() -{ - atf_check_equal '$(atf_get ident)' ident_1 -} - -atf_test_case ident_2 -ident_2_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" -} -ident_2_body() -{ - atf_check_equal '$(atf_get ident)' ident_2 -} - -atf_test_case require_arch -require_arch_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.arch" "$(atf_config_get arch)" -} -require_arch_body() -{ - : -} - -atf_test_case require_config -require_config_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.config" "var1 var2" -} -require_config_body() -{ - echo "var1: $(atf_config_get var1)" - echo "var2: $(atf_config_get var2)" -} - -atf_test_case require_machine -require_machine_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.machine" "$(atf_config_get machine)" -} -require_machine_body() -{ - : -} - -atf_test_case require_progs_body -require_progs_body_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" -} -require_progs_body_body() -{ - for p in $(atf_config_get progs); do - atf_require_prog ${p} - done -} - -atf_test_case require_progs_head -require_progs_head_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.progs" "$(atf_config_get progs)" -} -require_progs_head_body() -{ - : -} - -atf_test_case require_user -require_user_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.user" "$(atf_config_get user)" -} -require_user_body() -{ - : -} - -atf_test_case require_user2 -require_user2_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.user" "$(atf_config_get user2)" -} -require_user2_body() -{ - : -} - -atf_test_case require_user3 -require_user3_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "require.user" "$(atf_config_get user3)" -} -require_user3_body() -{ - : -} - -atf_test_case timeout -timeout_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "timeout" $(atf_config_get timeout 0) -} -timeout_body() -{ - sleep $(atf_config_get sleep) -} - -atf_test_case timeout2 -timeout2_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" - atf_set "timeout2" $(atf_config_get timeout2 0) -} -timeout2_body() -{ - sleep $(atf_config_get sleep2) -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_srcdir". -# ------------------------------------------------------------------------- - -atf_test_case srcdir_exists -srcdir_exists_head() -{ - atf_set "descr" "Helper test case for the t_srcdir test program" -} -srcdir_exists_body() -{ - [ -f "$(atf_get_srcdir)/datafile" ] || atf_fail "Cannot find datafile" -} - -# ------------------------------------------------------------------------- -# Helper tests for "t_workdir". -# ------------------------------------------------------------------------- - -atf_test_case workdir_path -workdir_path_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" -} -workdir_path_body() -{ - pwd -P >$(atf_config_get pathfile) -} - -atf_test_case workdir_cleanup -workdir_cleanup_head() -{ - atf_set "descr" "Helper test case for the t_meta_data test program" -} -workdir_cleanup_body() -{ - pwd -P >$(atf_config_get pathfile) - - mkdir 1 - mkdir 1/1 - mkdir 1/2 - mkdir 1/3 - mkdir 1/3/1 - mkdir 1/3/2 - mkdir 2 - touch 2/1 - touch 2/2 - mkdir 2/3 - touch 2/3/1 -} - -# ------------------------------------------------------------------------- -# Main. -# ------------------------------------------------------------------------- - -atf_init_test_cases() -{ - # Add helper tests for t_cleanup. - atf_add_test_case cleanup_pass - atf_add_test_case cleanup_fail - atf_add_test_case cleanup_skip - atf_add_test_case cleanup_curdir - atf_add_test_case cleanup_sigterm - atf_add_test_case cleanup_fork - - # Add helper tests for t_config. - atf_add_test_case config_unset - atf_add_test_case config_empty - atf_add_test_case config_value - atf_add_test_case config_multi_value - - # Add helper tests for t_env. - atf_add_test_case env_home - atf_add_test_case env_list - - # Add helper tests for t_fork. - atf_add_test_case fork_mangle_fds - atf_add_test_case fork_stop - atf_add_test_case fork_umask - - # Add helper tests for t_meta_data. - atf_add_test_case ident_1 - atf_add_test_case ident_2 - atf_add_test_case require_arch - atf_add_test_case require_config - atf_add_test_case require_machine - atf_add_test_case require_progs_body - atf_add_test_case require_progs_head - atf_add_test_case require_user - atf_add_test_case require_user2 - atf_add_test_case require_user3 - atf_add_test_case timeout - atf_add_test_case timeout2 - - # Add helper tests for t_srcdir. - atf_add_test_case srcdir_exists - - # Add helper tests for t_workdir. - atf_add_test_case workdir_path - atf_add_test_case workdir_cleanup -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_cleanup.sh b/dist/atf/tests/atf/test_programs/t_cleanup.sh deleted file mode 100644 index de946be45f3a..000000000000 --- a/dist/atf/tests/atf/test_programs/t_cleanup.sh +++ /dev/null @@ -1,125 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -run_tests() -{ - h=${1} what=${2} status=${3} code=${4} - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'cleanup=no' \ - -v 'tmpfile=$(pwd)/tmpfile' \ - cleanup_${what} 3>resout" ${code} ignore ignore - atf_check "grep 'cleanup_${what}, ${status}' resout" 0 ignore null - atf_check "test -f tmpfile" 0 null null - atf_check "rm tmpfile" 0 null null - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'cleanup=yes' \ - -v 'tmpfile=$(pwd)/tmpfile' \ - cleanup_${what} 3>resout" ${code} ignore ignore - atf_check "grep 'cleanup_${what}, ${status}' resout" 0 ignore null - atf_check "test -f tmpfile" 1 null null -} - -atf_test_case hook -hook_head() -{ - atf_set "descr" "Tests that the cleanup hook works" -} -hook_body() -{ - for h in $(get_helpers); do - run_tests ${h} pass passed 0 - run_tests ${h} fail failed 1 - run_tests ${h} skip skipped 0 - done -} - -atf_test_case curdir -curdir_head() -{ - atf_set "descr" "Tests that the cleanup hook is executed in the same" \ - "directory as the test case so that they can share" \ - "information" -} -curdir_body() -{ - for h in $(get_helpers); do - atf_check '${h} -s $(atf_get_srcdir) -r3 cleanup_curdir 3>resout' \ - 0 stdout ignore - atf_check 'grep "Old value: 1234" stdout' 0 ignore null - done -} - -atf_test_case on_signal -on_signal_head() -{ - atf_set "descr" "Tests that the cleanup routines are executed when" \ - "test cases receive a signal during execution" -} -on_signal_body() -{ - for h in $(get_helpers); do - case ${h} in - *h_sh*) - # XXX Broken for now. - continue - ;; - esac - - ${h} -s $(atf_get_srcdir) -r3 -v "tmpfile=$(pwd)/tmpfile" \ - cleanup_sigterm 3>resout - atf_check "grep 'cleanup_sigterm, failed' resout" 0 ignore null - atf_check "test -f tmpfile" 1 null null - atf_check "test -f tmpfile.no" 1 null null - done -} - -atf_test_case fork -fork_head() -{ - atf_set "descr" "Tests that the cleanup routines are executed in" \ - "a subprocess" -} -fork_body() -{ - for h in $(get_helpers); do - ${h} -s $(atf_get_srcdir) -r3 -v "tmpfile=$(pwd)/tmpfile" \ - cleanup_fork 3>resout - atf_check "grep 'cleanup_fork, passed' resout" 0 ignore null - done -} - -atf_init_test_cases() -{ - atf_add_test_case hook - atf_add_test_case curdir - atf_add_test_case on_signal - atf_add_test_case fork -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_config.sh b/dist/atf/tests/atf/test_programs/t_config.sh deleted file mode 100644 index d781f244663c..000000000000 --- a/dist/atf/tests/atf/test_programs/t_config.sh +++ /dev/null @@ -1,62 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case vflag -vflag_head() -{ - atf_set "descr" "Tests that the -v flag works correctly to set" \ - "configuration variables" -} -vflag_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 \ - config_unset 3>resout" 0 ignore ignore - atf_check "grep 'passed' resout" 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'test=' \ - config_empty 3>resout" 0 ignore ignore - atf_check "grep 'passed' resout" 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'test=foo' \ - config_value 3>resout" 0 ignore ignore - atf_check "grep 'passed' resout" 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'test=foo bar' \ - config_multi_value 3>resout" 0 ignore ignore - atf_check "grep 'passed' resout" 0 ignore null - done -} - -atf_init_test_cases() -{ - atf_add_test_case vflag -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_env.sh b/dist/atf/tests/atf/test_programs/t_env.sh deleted file mode 100644 index 7eb1634f6df8..000000000000 --- a/dist/atf/tests/atf/test_programs/t_env.sh +++ /dev/null @@ -1,80 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case def_undef -def_undef_head() -{ - atf_set "descr" "Tests that the test case sets and unsets a set of" \ - "known variables" -} -def_undef_body() -{ - undef_vars="LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY \ - LC_NUMERIC LC_TIME TZ" - def_vars="HOME" - - manglenv= - for v in ${undef_vars} ${def_vars}; do - mangleenv="${mangleenv} ${v}=bogus-value" - done - - for h in $(get_helpers); do - atf_check "${mangleenv} ${h} -s $(atf_get_srcdir) -r3 \ - env_list 3>resout" 0 stdout ignore - - for v in ${undef_vars}; do - atf_check "grep '^${v}=' stdout" 1 null null - done - - for v in ${def_vars}; do - atf_check "grep '^${v}=' stdout" 0 ignore null - done - done -} - -atf_test_case home -home_head() -{ - atf_set "descr" "Tests that HOME has a sane and valid value" -} -home_body() -{ - for h in ${h_c} ${h_cpp} ${h_sh}; do - atf_check "HOME=foo ${h} -s $(atf_get_srcdir) env_home" \ - 0 ignore ignore - done -} - -atf_init_test_cases() -{ - atf_add_test_case def_undef - atf_add_test_case home -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_fork.sh b/dist/atf/tests/atf/test_programs/t_fork.sh deleted file mode 100644 index 1f45f0fb6e27..000000000000 --- a/dist/atf/tests/atf/test_programs/t_fork.sh +++ /dev/null @@ -1,102 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# TODO: This test program is about checking the test case's "environment" -# (not the variables). Should be named something else than t_fork. - -atf_test_case mangle_fds -mangle_fds_head() -{ - atf_set "descr" "Tests that mangling standard descriptors does not" \ - "affect the test case's reporting of status" -} -mangle_fds_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 -v resfd=3 \ - fork_mangle_fds 3>resout" 0 ignore ignore - atf_check "grep 'passed' resout" 0 ignore null - done -} - -atf_test_case stop -stop_head() -{ - atf_set "descr" "Tests that sending a stop signal to a test case does" \ - "not report it as failed" -} -stop_body() -{ - for h in $(get_helpers); do - ${h} -s $(atf_get_srcdir) -v pidfile=$(pwd)/pid \ - -v donefile=$(pwd)/done -r3 fork_stop 3>resout & - ppid=${!} - echo "Waiting for pid file for test program ${ppid}" - while test ! -f pid; do sleep 1; done - pid=$(cat pid) - echo "Test case's pid is ${pid}" - kill -STOP ${pid} - touch done - echo "Wrote done file" - kill -CONT ${pid} - wait ${ppid} - atf_check "grep 'fork_stop, passed' resout" 0 ignore null - rm -f pid done - done -} - -atf_test_case umask -umask_head() -{ - atf_set "descr" "Tests that the umask is properly set in the test" \ - "cases" -} -umask_body() -{ - echo 0022 >expout - atf_check 'umask' 0 expout null - - for h in $(get_helpers); do - umask 0000 - atf_check "${h} -s $(atf_get_srcdir) -r3 fork_umask 3>resout" \ - 0 stdout ignore - atf_check "grep 'umask: 0022' stdout" 0 ignore null - atf_check "grep 'passed' resout" 0 ignore null - umask 0022 - done -} - -atf_init_test_cases() -{ - atf_add_test_case mangle_fds - atf_add_test_case stop - atf_add_test_case umask -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_meta_data.sh b/dist/atf/tests/atf/test_programs/t_meta_data.sh deleted file mode 100644 index 015549d55c61..000000000000 --- a/dist/atf/tests/atf/test_programs/t_meta_data.sh +++ /dev/null @@ -1,407 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# ------------------------------------------------------------------------- -# Tests for the "ident" meta-data property. -# ------------------------------------------------------------------------- - -atf_test_case ident -ident_head() -{ - atf_set "descr" "Tests that the ident property works" -} -ident_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 ident_1 3>resout" \ - 0 ignore ignore - atf_check "grep passed resout" 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 ident_2 3>resout" \ - 0 ignore ignore - atf_check "grep passed resout" 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Tests for the "require_arch" meta-data property. -# ------------------------------------------------------------------------- - -atf_test_case require_arch -require_arch_head() -{ - atf_set "descr" "Tests that the require.arch property works" -} -require_arch_body() -{ - for h in $(get_helpers); do - echo "Check for the real architecture" - arch=$(atf-config -t atf_arch) - atf_check "${h} -s $(atf_get_srcdir) -r3 -v arch='${arch}' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 -v arch='foo ${arch}' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 -v arch='${arch} foo' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - - echo "Some fictitious checks" - atf_check "ATF_ARCH=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v arch='foo' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "ATF_ARCH=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v arch='foo bar' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "ATF_ARCH=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v arch='bar foo' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - - echo "Now some failures" - atf_check "ATF_ARCH=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v arch='bar' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - atf_check "ATF_ARCH=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v arch='bar baz' \ - require_arch 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Tests for the "require_config" meta-data property. -# ------------------------------------------------------------------------- - -atf_test_case require_config -require_config_head() -{ - atf_set "descr" "Tests that the require.config property works" -} -require_config_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 require_config 3>resout" \ - 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - atf_check 'grep "var1 not defined" resout' 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v var1=foo \ - require_config 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - atf_check 'grep "var2 not defined" resout' 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) -r3 -v var1=foo -v var2=bar \ - require_config 3>resout" 0 stdout ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check 'grep "var1: foo" stdout' 0 ignore null - atf_check 'grep "var2: bar" stdout' 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Tests for the "require_machine" meta-data property. -# ------------------------------------------------------------------------- - -atf_test_case require_machine -require_machine_head() -{ - atf_set "descr" "Tests that the require.machine property works" -} -require_machine_body() -{ - for h in $(get_helpers); do - echo "Check for the real machine type" - machine=$(atf-config -t atf_machine) - atf_check "${h} -s $(atf_get_srcdir) -r3 -v machine='${machine}' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 -v machine='foo ${machine}' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 -v machine='${machine} foo' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - - echo "Some fictitious checks" - atf_check "ATF_MACHINE=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v machine='foo' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "ATF_MACHINE=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v machine='foo bar' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "ATF_MACHINE=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v machine='bar foo' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - - echo "Now some failures" - atf_check "ATF_MACHINE=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v machine='bar' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - atf_check "ATF_MACHINE=foo ${h} -s $(atf_get_srcdir) -r3 \ - -v machine='bar baz' \ - require_machine 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Tests for the "require_progs" meta-data property. -# ------------------------------------------------------------------------- - -common_tests() { - where=${1} - for h in $(get_helpers); do - # Check absolute paths. - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=/bin/cp' \ - require_progs_${where} 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 -v \ - 'progs=/bin/__non-existent__' \ - require_progs_${where} 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - - # Relative paths are not allowed. - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=bin/cp' \ - require_progs_${where} 3>resout" 1 ignore stderr - atf_check 'grep "failed" resout' 0 ignore null - - # Check plain file names, searching them in the PATH. - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=cp' \ - require_progs_${where} 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=__non-existent__' \ - require_progs_${where} 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - done -} - -# XXX This does not belong here. This is a unit test. -atf_test_case require_progs_func -require_progs_func_head() -{ - atf_set "descr" "Tests that atf_require_prog works" -} -require_progs_func_body() -{ - common_tests body -} - -atf_test_case require_progs_header -require_progs_header_head() -{ - atf_set "descr" "Tests that require.progs works" -} -require_progs_header_body() -{ - common_tests head - - for h in $(get_helpers); do - # Check a couple of absolute path names. The second must make - # the check fail. - atf_check "${h} -s $(atf_get_srcdir) -r3 \ - -v 'progs=/bin/cp /bin/__non-existent__' \ - require_progs_head 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - atf_check 'grep "non-existent" resout' 0 ignore null - - # Check a couple of absolute path names. Both have to be found. - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=/bin/cp /bin/ls' \ - require_progs_head 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - - # Check an absolute path name and a relative one. The second must - # make the check fail. - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=/bin/cp bin/cp' \ - require_progs_head 3>resout" 1 ignore stderr - atf_check 'grep "failed" resout' 0 ignore null - - # Check an absolute path name and a plain one. Both have to be - # found. - atf_check "${h} -s $(atf_get_srcdir) -r3 -v 'progs=/bin/cp ls' \ - require_progs_head 3>resout" 0 ignore ignore - atf_check 'grep "passed" resout' 0 ignore null - - # Check an absolute path name and a plain one. The second must - # make the check fail. - atf_check "${h} -s $(atf_get_srcdir) -r3 \ - -v 'progs=/bin/cp __non-existent__' require_progs_head \ - 3>resout" 0 ignore ignore - atf_check 'grep "skipped" resout' 0 ignore null - atf_check 'grep "non-existent" resout' 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Tests for the "require_user" meta-data property. -# ------------------------------------------------------------------------- - -count_lines() -{ - wc -l $1 | awk '{ print $1 }' -} - -atf_test_case require_user_root -require_user_root_head() -{ - atf_set "descr" "Tests that 'require.user=root' works" -} -require_user_root_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 -v user=root require_user \ - 3>resout" 0 ignore ignore - if [ $(id -u) -eq 0 ]; then - atf_check 'grep "passed" resout' 0 ignore null - else - atf_check 'grep "skipped" resout' 0 ignore null - fi - done -} - -atf_test_case require_user_unprivileged -require_user_unprivileged_head() -{ - atf_set "descr" "Tests that 'require.user=unprivileged' works" -} -require_user_unprivileged_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 -v user=unprivileged \ - require_user 3>resout" 0 ignore ignore - if [ $(id -u) -eq 0 ]; then - atf_check 'grep "skipped" resout' 0 ignore null - else - atf_check 'grep "passed" resout' 0 ignore null - fi - done -} - -atf_test_case require_user_multiple -require_user_multiple_head() -{ - atf_set "descr" "Tests that multiple skip results raised by the" \ - "handling of require.user do not abort the program" \ - "prematurely" -} -require_user_multiple_body() -{ - for h in $(get_helpers); do - if [ $(id -u) -eq 0 ]; then - users="-v user=unprivileged -v user2=unprivileged -v user3=root" - else - users="-v user=root -v user2=root -v user3=unprivileged" - fi - atf_check "${h} -s $(atf_get_srcdir) -r3 ${users} require_user \ - require_user2 require_user3 3>resout" 0 ignore ignore - grep "skipped" resout >skips - [ $(count_lines skips) -lt 2 ] && \ - atf_fail "Test program aborted prematurely" - [ $(count_lines skips) -gt 2 ] && \ - atf_fail "Test program returned more skips than expected" - done -} - -atf_test_case require_user_bad -require_user_bad_head() -{ - atf_set "descr" "Tests that passing an invalid value to require.user" \ - "raises an error" -} -require_user_bad_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) -r3 -v user=foo require_user \ - 3>resout" 1 ignore ignore - atf_check 'grep "failed.*Invalid" resout' 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Tests for the "timeout" meta-data property. -# ------------------------------------------------------------------------- - -atf_test_case timeout -timeout_head() -{ - atf_set "descr" "Tests that 'timeout' works" -} -timeout_body() -{ - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) \ - -v timeout=0 -v sleep=1 \ - -r3 timeout 3>resout" 0 ignore ignore - atf_check 'grep "timeout, passed" resout' 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) \ - -v timeout=10 -v sleep=1 \ - -r3 timeout 3>resout" 0 ignore ignore - atf_check 'grep "timeout, passed" resout' 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) \ - -v timeout=1 -v sleep=10 \ - -r3 timeout 3>resout" 1 ignore ignore - atf_check 'grep "timeout, failed,.*timed out" resout' 0 ignore null - - atf_check "${h} -s $(atf_get_srcdir) \ - -v timeout=1 -v sleep=10 -v timeout2=10 -v sleep2=1 \ - -r3 timeout timeout2 3>resout" 1 ignore ignore - atf_check 'grep "timeout, failed,.*timed out" resout' 0 ignore null - atf_check 'grep "timeout2, passed" resout' 0 ignore null - done -} - -# ------------------------------------------------------------------------- -# Main. -# ------------------------------------------------------------------------- - -atf_init_test_cases() -{ - atf_add_test_case ident - atf_add_test_case require_arch - atf_add_test_case require_config - atf_add_test_case require_machine - atf_add_test_case require_progs_func - atf_add_test_case require_progs_header - atf_add_test_case require_user_root - atf_add_test_case require_user_unprivileged - atf_add_test_case require_user_multiple - atf_add_test_case require_user_bad - atf_add_test_case timeout -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_srcdir.sh b/dist/atf/tests/atf/test_programs/t_srcdir.sh deleted file mode 100644 index cd0a6d4ef39b..000000000000 --- a/dist/atf/tests/atf/test_programs/t_srcdir.sh +++ /dev/null @@ -1,113 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -create_files() -{ - mkdir tmp - touch tmp/datafile -} - -atf_test_case default -default_head() -{ - atf_set "descr" "Checks that the program can find its files if" \ - "executed from the same directory" -} -default_body() -{ - create_files - - for hp in $(get_helpers); do - h=${hp##*/} - cp ${hp} tmp - atf_check "cd tmp && ./${h} srcdir_exists" 0 ignore ignore - atf_check "${hp} srcdir_exists" 1 null stderr - atf_check 'grep "Cannot.*find.*source.*directory" stderr' \ - 0 ignore null - done -} - -atf_test_case sflag -sflag_head() -{ - atf_set "descr" "Checks that the program can find its files when" \ - "using the -s flag" -} -sflag_body() -{ - create_files - - for hp in $(get_helpers); do - h=${hp##*/} - cp ${hp} tmp - atf_check "cd tmp && ./${h} -s $(pwd)/tmp \ - srcdir_exists" 0 ignore ignore - atf_check "${hp} srcdir_exists" 1 null stderr - atf_check 'grep "Cannot.*find.*source.*directory" stderr' \ - 0 ignore null - atf_check "${hp} -s $(pwd)/tmp srcdir_exists" 0 ignore ignore - done -} - -atf_test_case relative -relative_head() -{ - atf_set "descr" "Checks that passing a relative path through -s" \ - "works" -} -relative_body() -{ - create_files - - for hp in $(get_helpers); do - h=${hp##*/} - cp ${hp} tmp - - for p in tmp tmp/. ./tmp; do - echo "Helper is: ${h}" - echo "Using source directory: ${p}" - - atf_check "./tmp/${h} -s ${p} \ - srcdir_exists" 0 ignore ignore - atf_check "${hp} srcdir_exists" 1 null stderr - atf_check 'grep "Cannot.*find.*source.*directory" stderr' \ - 0 ignore null - atf_check "${hp} -s ${p} srcdir_exists" 0 ignore ignore - done - done -} - -atf_init_test_cases() -{ - atf_add_test_case default - atf_add_test_case sflag - atf_add_test_case relative -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_status.sh b/dist/atf/tests/atf/test_programs/t_status.sh deleted file mode 100644 index 21b377c32856..000000000000 --- a/dist/atf/tests/atf/test_programs/t_status.sh +++ /dev/null @@ -1,77 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case newlines -newlines_head() -{ - atf_set "descr" "Tests that newlines provided as part of status'" \ - "reasons are handled properly" -} -newlines_body() -{ - for h in $(get_helpers); do - case ${h} in - *h_sh*) - # XXX Not implemented. - continue - ;; - esac - - # NO_CHECK_STYLE_BEGIN - cat >expout <>Second line -EOF - # NO_CHECK_STYLE_END - atf_check "${h} -s $(atf_get_srcdir) status_newlines_fail" \ - 1 expout null - - # NO_CHECK_STYLE_BEGIN - cat >expout <>Second line -EOF - # NO_CHECK_STYLE_END - atf_check "${h} -s $(atf_get_srcdir) status_newlines_skip" \ - 0 expout null - done -} - -atf_init_test_cases() -{ - atf_add_test_case newlines -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/test_programs/t_workdir.sh b/dist/atf/tests/atf/test_programs/t_workdir.sh deleted file mode 100644 index 85d34f1a1d8a..000000000000 --- a/dist/atf/tests/atf/test_programs/t_workdir.sh +++ /dev/null @@ -1,148 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case default -default_head() -{ - atf_set "descr" "Tests that the default work directory is used" \ - "correctly" -} -default_body() -{ - tmpdir=$(cd $(atf-config -t atf_workdir) && pwd -P) - - for h in $(get_helpers); do - atf_check "${h} -s $(atf_get_srcdir) \ - -v pathfile=$(pwd)/path workdir_path" 0 ignore ignore - atf_check "grep '^${tmpdir}/atf.' - -#include "atf-c++/env.hpp" -#include "atf-c++/macros.hpp" - -// ------------------------------------------------------------------------ -// Helper tests for "t_atf_run". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(atf_run_config); -ATF_TEST_CASE_HEAD(atf_run_config) -{ - set_md_var("descr", "Helper test case for the t_atf_run test program"); -} -ATF_TEST_CASE_BODY(atf_run_config) -{ - std::cout << "1st: " << get_config_var("1st") << std::endl; - std::cout << "2nd: " << get_config_var("2nd") << std::endl; - std::cout << "3rd: " << get_config_var("3rd") << std::endl; - std::cout << "4th: " << get_config_var("4th") << std::endl; -} - -ATF_TEST_CASE(atf_run_fds); -ATF_TEST_CASE_HEAD(atf_run_fds) -{ - set_md_var("descr", "Helper test case for the t_atf_run test program"); -} -ATF_TEST_CASE_BODY(atf_run_fds) -{ - std::cout << "msg1 to stdout" << std::endl; - std::cout << "msg2 to stdout" << std::endl; - std::cerr << "msg1 to stderr" << std::endl; - std::cerr << "msg2 to stderr" << std::endl; -} - -ATF_TEST_CASE(atf_run_testvar); -ATF_TEST_CASE_HEAD(atf_run_testvar) -{ - set_md_var("descr", "Helper test case for the t_atf_run test program"); -} -ATF_TEST_CASE_BODY(atf_run_testvar) -{ - if (!has_config_var("testvar")) - ATF_FAIL("testvar variable not defined"); - std::cout << "testvar: " << get_config_var("testvar") << std::endl; -} - -// ------------------------------------------------------------------------ -// Helper tests for "t_atf_report". -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(atf_report_diff); -ATF_TEST_CASE_HEAD(atf_report_diff) -{ - set_md_var("descr", "Helper test case for the t_atf_report test program"); -} -ATF_TEST_CASE_BODY(atf_report_diff) -{ - std::cout << "--- a 2007-11-04 14:00:41.000000000 +0100" << std::endl; - std::cout << "+++ b 2007-11-04 14:00:48.000000000 +0100" << std::endl; - std::cout << "@@ -1,7 +1,7 @@" << std::endl; - std::cout << " This test is meant to simulate a diff." << std::endl; - std::cout << " Blank space at beginning of context lines must be " - "preserved." << std::endl; - std::cout << " " << std::endl; - std::cout << "-First original line." << std::endl; - std::cout << "-Second original line." << std::endl; - std::cout << "+First modified line." << std::endl; - std::cout << "+Second modified line." << std::endl; - std::cout << " " << std::endl; - std::cout << " EOF" << std::endl; -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - std::string which = atf::env::get("TESTCASE"); - - // Add helper tests for t_atf_run. - if (which == "atf_run_config") - ATF_ADD_TEST_CASE(tcs, atf_run_config); - if (which == "atf_run_fds") - ATF_ADD_TEST_CASE(tcs, atf_run_fds); - if (which == "atf_run_testvar") - ATF_ADD_TEST_CASE(tcs, atf_run_testvar); - - // Add helper tests for t_atf_report. - if (which == "atf_report_diff") - ATF_ADD_TEST_CASE(tcs, atf_report_diff); -} diff --git a/dist/atf/tests/atf/tools/h_mode.cpp b/dist/atf/tests/atf/tools/h_mode.cpp deleted file mode 100644 index 1cf7f9fc1ea8..000000000000 --- a/dist/atf/tests/atf/tools/h_mode.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -int -main(int argc, char* argv[]) -{ - struct stat sb; - - if (argc != 2) - return EXIT_FAILURE; - - if (::stat(argv[1], &sb) == -1) - return EXIT_FAILURE; - - std::cout << std::oct << sb.st_mode << std::endl; - - return EXIT_SUCCESS; -} diff --git a/dist/atf/tests/atf/tools/h_pass.cpp b/dist/atf/tests/atf/tools/h_pass.cpp deleted file mode 100644 index 49f1e3217ac0..000000000000 --- a/dist/atf/tests/atf/tools/h_pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "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/dist/atf/tests/atf/tools/t_atf_cleanup.sh b/dist/atf/tests/atf/tools/t_atf_cleanup.sh deleted file mode 100644 index d8e289eab411..000000000000 --- a/dist/atf/tests/atf/tools/t_atf_cleanup.sh +++ /dev/null @@ -1,167 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -cleanup() -{ - $(atf-config -t atf_libexecdir)/atf-cleanup "${@}" -} - -atf_test_case file -file_head() -{ - atf_set "descr" "Tests that a single file can be removed" -} -file_body() -{ - atf_check 'touch foo' 0 null null - atf_check 'cleanup foo' 0 null null - atf_check 'test -e foo' 1 null null -} - -atf_test_case dir_empty -dir_empty_head() -{ - atf_set "descr" "Tests that a single empty directory can be removed" -} -dir_empty_body() -{ - atf_check 'mkdir foo' 0 null null - atf_check 'cleanup foo' 0 null null - atf_check 'test -e foo' 1 null null -} - -atf_test_case dir_full -dir_full_head() -{ - atf_set "descr" "Tests that a directory with contents can be removed" -} -dir_full_body() -{ - atf_check 'mkdir foo' 0 null null - atf_check 'mkdir foo/bar' 0 null null - atf_check 'touch foo/bar/baz' 0 null null - atf_check 'touch foo/baz' 0 null null - atf_check 'cleanup foo' 0 null null - atf_check 'test -e foo' 1 null null -} - -mount_tmpfs_portable() -{ - platform=$(uname) - case ${platform} in - Linux|NetBSD) - mount -t tmpfs tmpfs ${1} - ;; - FreeBSD) - mdmfs -s 16m md ${1} - ;; - SunOS) - mount -F tmpfs tmpfs $(pwd)/${1} - ;; - *) - atf_fail "Internal error in test program" - ;; - esac -} - -atf_test_case mount -mount_head() -{ - atf_set "descr" "Tests that the removal algorithm does not cross" \ - "mount points" - atf_set "require.user" "root" -} -mount_body() -{ - platform=$(uname) - case ${platform} in - Linux|FreeBSD|NetBSD|SunOS) - mkdir foo - mkdir foo/bar - mkdir foo/bar/mnt - atf_check 'mount_tmpfs_portable foo/bar/mnt' 0 null null - mkdir foo/baz - atf_check 'mount_tmpfs_portable foo/baz' 0 null null - mkdir foo/baz/foo - mkdir foo/baz/foo/bar - atf_check 'mount_tmpfs_portable foo/baz/foo/bar' 0 null null - ;; - *) - # XXX Possibly specify in meta-data too. - atf_skip "Test unimplemented in this platform (${platform})" - ;; - esac - - atf_check "cleanup foo" 0 null null - mount | grep $(pwd)/foo && \ - atf_fail "Some file systems remain mounted" - atf_check "test -d foo" 1 null null -} - -atf_test_case symlink -symlink_head() -{ - atf_set "descr" "Tests that the removal algorithm does not follow" \ - "symlinks, which may live in another device and thus" \ - "be treated as mount points" - atf_set "require.user" "root" -} -symlink_body() -{ - platform=$(uname) - case ${platform} in - Linux|FreeBSD|NetBSD|SunOS) - atf_check 'mkdir foo' 0 null null - atf_check 'mkdir foo/bar' 0 null null - atf_check 'mount_tmpfs_portable foo/bar' 0 null null - atf_check 'touch a' 0 null null - atf_check 'ln -s $(pwd)/a foo/bar' 0 null null - ;; - *) - # XXX Possibly specify in meta-data too. - atf_skip "Test unimplemented in this platform (${platform})" - ;; - esac - - atf_check "cleanup foo" 0 null null - mount | grep $(pwd)/foo && \ - atf_fail "Some file systems remain mounted" - atf_check "test -d foo" 1 null null -} - -atf_init_test_cases() -{ - atf_add_test_case file - atf_add_test_case dir_empty - atf_add_test_case dir_full - atf_add_test_case mount - atf_add_test_case symlink -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/atf/tools/t_atf_compile.sh b/dist/atf/tests/atf/tools/t_atf_compile.sh deleted file mode 100644 index fc20fc3f83f8..000000000000 --- a/dist/atf/tests/atf/tools/t_atf_compile.sh +++ /dev/null @@ -1,124 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -# TODO: This test program is probably incomplete. It was first added -# to demonstrate the utility of the atf_check function. Inspect its -# current status and complete it. - -atf_test_case includes -includes_head() -{ - atf_set "descr" "Tests that the resulting file includes the correct" \ - "shell subroutines" - atf_set "require.progs" "atf-compile" -} -includes_body() -{ - cat >tp_test.sh <helper.sh <expout - atf_check "${atf_exec} ./helper.sh" 0 expout null - atf_check "${atf_exec} -- ./helper.sh" 0 expout null - - echo 'arg1' >expout - atf_check "${atf_exec} ./helper.sh arg1" 0 expout null - atf_check "${atf_exec} -- ./helper.sh arg1" 0 expout null - - echo 'arg1 arg2' >expout - atf_check "${atf_exec} ./helper.sh arg1 arg2" 0 expout null - atf_check "${atf_exec} -- ./helper.sh arg1 arg2" 0 expout null -} - -pgid_of() -{ - ps -o pgid -p ${1} | tail -n 1 -} - -atf_test_case process_group -process_group_head() -{ - atf_set "descr" "Checks that giving -g creates a new process group" -} -process_group_body() -{ - cat >helper.sh <helper.sh <stdout & - while test ! -f waiting; do sleep 1; done - ${atf_killpg} ${!} - while test ! -f sigterm; do sleep 1; done - touch done - wait ${!} - - atf_check 'test -f sigterm' 0 null null -} - -atf_test_case sflag -sflag_head() -{ - atf_set "descr" "Verifies that the -s flag correctly changes the" \ - "signal sent to processes" -} -sflag_body() -{ - cat >helper.sh <stdout & - while test ! -f waiting; do sleep 1; done - ${atf_killpg} -s 1 ${!} - while test ! -f sighup -a ! -f sigterm; do sleep 1; done - touch done - wait ${!} - - atf_check 'test -f sighup' 0 null null - atf_check 'test -f sigterm' 1 null null -} - -atf_test_case group -group_head() -{ - atf_set "descr" "Verifies that the signal is sent to the whole group" -} -group_body() -{ - cat >helper.sh <tp5 <Atffile <dir1/Atffile <etc/atf-run.hooks <tps.out 2>/dev/null - rm -rf etc -} - -atf_test_case default -default_head() -{ - atf_set "descr" "Checks that the default output uses the ticker" \ - "format" -} -default_body() -{ - create_helpers - run_helpers - - # Check that the default output uses the ticker format. - atf_check 'atf-report expout <>'; expected a header name. -EOF -# NO_CHECK_STYLE_END - - atf_check 'atf-report -o csv:- expout <>'; expected a header name.' - -Failed (bogus) test programs: - tp5 - -Failed test cases: - dir1/tp2:main, tp4:main - -Summary for 5 test programs: - 2 passed test cases. - 2 failed test cases. - 0 skipped test cases. -EOF - - atf_check 'atf-report -o ticker:- expout < - - - -A value - - - - - - - -This always fails - - - - - - - - - -This always fails - - - -There were errors parsing the output of the test program: Line 1: Unexpected token \`<<EOF>>'; expected a header name. - -Another value - -EOF -# NO_CHECK_STYLE_END - - atf_check 'atf-report -o xml:- Atffile <expout < - - - -A value - - ---- a 2007-11-04 14:00:41.000000000 +0100 -+++ b 2007-11-04 14:00:48.000000000 +0100 -@@ -1,7 +1,7 @@ - This test is meant to simulate a diff. - Blank space at beginning of context lines must be preserved. - --First original line. --Second original line. -+First modified line. -+Second modified line. - - EOF - - - -Another value - -EOF -# NO_CHECK_STYLE_END - - TESTCASE=atf_report_diff; export TESTCASE - run_helpers - atf_check 'atf-report -o xml:- Atffile <>Atffile - done -} - -create_helper() -{ - cp $(atf_get_srcdir)/h_misc helper - create_atffile helper - TESTCASE=${1}; export TESTCASE -} - -atf_test_case config -config_head() -{ - atf_set "descr" "Tests that the config files are read in the correct" \ - "order" -} -config_body() -{ - create_helper atf_run_config - - mkdir etc - mkdir .atf - - echo "First: read system-wide common.conf." - cat >etc/common.conf <.conf." - cat >etc/atf.conf <.atf/common.conf <.conf." - cat >.atf/atf.conf <etc/common.conf <>Atffile - atf_check "ATF_CONFDIR=$(pwd)/etc atf-run helper" 0 stdout ignore - atf_check "grep 'testvar: a value' stdout" 0 ignore ignore - - echo "Checking that defining 'testvar' trough the configuration" \ - "file overrides the one in the Atffile." - mkdir etc - cat >etc/common.conf <> Atffile - atf_check "ATF_CONFDIR=$(pwd)/etc atf-run" 1 ignore ignore - - echo "Checking that defining 'testvar' in the correct Atffile works." - echo 'conf: testvar = "a value"' >>dir/Atffile - atf_check "ATF_CONFDIR=$(pwd)/etc atf-run" 0 stdout ignore - atf_check "grep 'testvar: a value' stdout" 0 ignore ignore -} - -atf_test_case fds -fds_head() -{ - atf_set "descr" "Tests that all streams are properly captured" -} -fds_body() -{ - create_helper atf_run_fds - - atf_check "atf-run" 0 stdout null - atf_check "grep '^tc-so:msg1 to stdout$' stdout" 0 ignore null - atf_check "grep '^tc-so:msg2 to stdout$' stdout" 0 ignore null - atf_check "grep '^tc-se:msg1 to stderr$' stdout" 0 ignore null - atf_check "grep '^tc-se:msg2 to stderr$' stdout" 0 ignore null -} - -atf_test_case broken_tp_hdr -broken_tp_hdr_head() -{ - atf_set "descr" "Ensures that atf-run reports test programs that" \ - "provide a bogus header as broken programs" -} -broken_tp_hdr_body() -{ - # We produce two errors from the header to ensure that the parse - # errors are printed on a single line on the output file. Printing - # them on separate lines would be incorrect. - cat >helper <&9 -echo 'bar' 1>&9 -exit 0 -EOF - chmod +x helper - - create_atffile helper - - atf_check "atf-run" 1 stdout null - atf_check "grep '^tp-end: helper, .*Line 1.*Line 2' stdout" 0 ignore null -} - -atf_test_case zero_tcs -zero_tcs_head() -{ - atf_set "descr" "Ensures that atf-run reports test programs without" \ - "test cases as errors" -} -zero_tcs_body() -{ - cat >helper <&9 -echo 1>&9 -echo "tcs-count: 0" 1>&9 -exit 0 -EOF - chmod +x helper - - create_atffile helper - - atf_check "atf-run" 1 stdout null - atf_check "grep '^tp-end: helper, ' stdout" 0 stdout null - atf_check "grep '0 test cases' stdout" 0 ignore null -} - -atf_test_case exit_codes -exit_codes_head() -{ - atf_set "descr" "Ensures that atf-run reports bogus exit codes for" \ - "programs correctly" -} -exit_codes_body() -{ - cat >helper <&9 -echo 1>&9 -echo "tcs-count: 1" 1>&9 -echo "tc-start: foo" 1>&9 -echo "tc-end: foo, failed, Yes, it failed" 1>&9 -true -EOF - chmod +x helper - - create_atffile helper - - atf_check "atf-run" 1 stdout null - atf_check "grep '^tp-end: helper, ' stdout" 0 stdout null - atf_check "grep 'success.*test cases failed' stdout" 0 ignore null -} - -atf_test_case signaled -signaled_head() -{ - atf_set "descr" "Ensures that atf-run reports test program's crashes" \ - "correctly" -} -signaled_body() -{ - cat >helper <&9 -echo 1>&9 -echo "tcs-count: 1" 1>&9 -echo "tc-start: foo" 1>&9 -echo "tc-end: foo, failed, Will fail" 1>&9 -kill -9 \$\$ -EOF - chmod +x helper - - create_atffile helper - - atf_check "atf-run" 1 stdout null - atf_check "grep '^tp-end: helper, ' stdout" 0 stdout null - atf_check "grep 'received signal 9' stdout" 0 ignore null -} - -atf_test_case no_reason -no_reason_head() -{ - atf_set "descr" "Ensures that atf-run reports bogus test programs" \ - "that do not provide a reason for failed or skipped" \ - "test cases" -} -no_reason_body() -{ - for r in failed skipped; do - cat >helper <&9 -echo 1>&9 -echo "tcs-count: 1" 1>&9 -echo "tc-start: foo" 1>&9 -echo "tc-end: foo, ${r}" 1>&9 -false -EOF - chmod +x helper - - create_atffile helper - - atf_check "atf-run" 1 stdout null - atf_check "grep '^tp-end: helper, ' stdout" 0 stdout null - atf_check "grep 'Unexpected.*NEWLINE' stdout" 0 ignore null - done -} - -atf_test_case hooks -hooks_head() -{ - atf_set "descr" "Checks that the default hooks work and that they" \ - "can be overriden by the user" -} -hooks_body() -{ - cp $(atf_get_srcdir)/h_pass helper - create_atffile helper - - mkdir atf - mkdir .atf - - echo "Checking default hooks" - atf_check "ATF_CONFDIR=$(pwd)/atf atf-run" 0 stdout null - atf_check "grep '^info: time.start, ' stdout" 0 ignore null - atf_check "grep '^info: time.end, ' stdout" 0 ignore null - - echo "Checking the system-wide info_start hook" - cat >atf/atf-run.hooks <.atf/atf-run.hooks <atf/atf-run.hooks <.atf/atf-run.hooks < - -#include "atf-c++/application.hpp" - -class h_app_empty : public atf::application::app { - static const char* m_description; - -public: - h_app_empty(void); - - int main(void); -}; - -const char* h_app_empty::m_description = - "A helper application for the bootstrap test suite that does nothing " - "on its own and redefines no methods."; - -h_app_empty::h_app_empty(void) : - app(m_description, "h_app_empty(1)", "atf(7)") -{ -} - -int -h_app_empty::main(void) -{ - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return h_app_empty().run(argc, argv); -} diff --git a/dist/atf/tests/bootstrap/h_app_opts_args.cpp b/dist/atf/tests/bootstrap/h_app_opts_args.cpp deleted file mode 100644 index 922cc3a58459..000000000000 --- a/dist/atf/tests/bootstrap/h_app_opts_args.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/application.hpp" -#include "atf-c++/sanity.hpp" - -class h_app_opts_args : public atf::application::app { - static const char* m_description; - - std::string specific_args(void) const; - options_set specific_options(void) const; - void process_option(int, const char*); - -public: - h_app_opts_args(void); - - int main(void); -}; - -const char* h_app_opts_args::m_description = - "A helper application for the bootstrap test suite that redefines the " - "methods to specify custom options and arguments."; - -h_app_opts_args::h_app_opts_args(void) : - app(m_description, "h_app_opts_args(1)", "atf(7)") -{ -} - -std::string -h_app_opts_args::specific_args(void) - const -{ - return " "; -} - -h_app_opts_args::options_set -h_app_opts_args::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('d', "", "Debug mode")); - opts.insert(option('v', "level", "Verbosity level")); - return opts; -} - -void -h_app_opts_args::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'd': - std::cout << "-d given" << std::endl; - break; - - case 'v': - std::cout << "-v given with argument " << arg << std::endl; - break; - - default: - UNREACHABLE; - } -} - -int -h_app_opts_args::main(void) -{ - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return h_app_opts_args().run(argc, argv); -} diff --git a/dist/atf/tests/bootstrap/h_tp_atf_check_sh.sh b/dist/atf/tests/bootstrap/h_tp_atf_check_sh.sh deleted file mode 100644 index 07868edbca1b..000000000000 --- a/dist/atf/tests/bootstrap/h_tp_atf_check_sh.sh +++ /dev/null @@ -1,304 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case exitcode_0_0 -exitcode_0_0_head() -{ - atf_set "descr" "Runs a program that returns true and expects true" -} -exitcode_0_0_body() -{ - atf_check 'true' 0 null null -} - -atf_test_case exitcode_0_1 -exitcode_0_1_head() -{ - atf_set "descr" "Runs a program that returns true and expects false" -} -exitcode_0_1_body() -{ - atf_check 'true' 1 null null -} - -atf_test_case exitcode_1_0 -exitcode_1_0_head() -{ - atf_set "descr" "Runs a program that returns false and expects true" -} -exitcode_1_0_body() -{ - atf_check 'false' 0 null null -} - -atf_test_case exitcode_1_1 -exitcode_1_1_head() -{ - atf_set "descr" "Runs a program that returns false and expects false" -} -exitcode_1_1_body() -{ - atf_check 'false' 1 null null -} - -atf_test_case stdout_expout_pass -stdout_expout_pass_head() -{ - atf_set "descr" "Runs a program with stdout set to expout and passes" -} -stdout_expout_pass_body() -{ - echo foo >expout - atf_check 'echo foo' 0 expout null -} - -atf_test_case stdout_expout_fail -stdout_expout_fail_head() -{ - atf_set "descr" "Runs a program with stdout set to expout and fails" -} -stdout_expout_fail_body() -{ - echo foo >expout - atf_check 'echo bar' 0 expout null -} - -atf_test_case stdout_ignore_empty -stdout_ignore_empty_head() -{ - atf_set "descr" "Runs a program with stdout set to ignore and" \ - "writes nothing" -} -stdout_ignore_empty_body() -{ - atf_check 'true' 0 ignore null -} - -atf_test_case stdout_ignore_sth -stdout_ignore_sth_head() -{ - atf_set "descr" "Runs a program with stdout set to ignore and" \ - "writes something" -} -stdout_ignore_sth_body() -{ - atf_check 'echo foo' 0 ignore null -} - -atf_test_case stdout_null_empty -stdout_null_empty_head() -{ - atf_set "descr" "Runs a program with stdout set to null and" \ - "writes nothing" -} -stdout_null_empty_body() -{ - atf_check 'true' 0 null null -} - -atf_test_case stdout_null_sth -stdout_null_sth_head() -{ - atf_set "descr" "Runs a program with stdout set to null and" \ - "writes something" -} -stdout_null_sth_body() -{ - atf_check 'echo foo' 0 null null -} - -atf_test_case stdout_stdout_written -stdout_stdout_written_head() -{ - atf_set "descr" "Runs a program with stdout set to stdout and" \ - "writes something" -} -stdout_stdout_written_body() -{ - atf_check 'echo foo' 0 stdout null - echo foo >aux - cmp -s stdout aux || atf_fail "Test failed" -} - -atf_test_case stdout_stdout_noclobber -stdout_stdout_noclobber_head() -{ - atf_set "descr" "Runs a program multiple times with different stdout" \ - "modes and ensures that they do not overwrite an old" \ - "stdout file" -} -stdout_stdout_noclobber_body() -{ - echo bar >stdout - - echo foo >expout - atf_check 'echo foo' 0 expout null - atf_check 'echo foo' 0 ignore null - atf_check 'true' 0 null null - - echo bar >aux - cmp -s stdout aux || atf_fail "Test failed" - - echo "foo bar" >stdout - atf_check "cut -d ' ' -f 1 expout - atf_check "cat stdout" 0 expout null -} - -atf_test_case stderr_experr_pass -stderr_experr_pass_head() -{ - atf_set "descr" "Runs a program with stderr set to experr and passes" -} -stderr_experr_pass_body() -{ - echo foo >experr - atf_check 'echo foo 1>&2' 0 null experr -} - -atf_test_case stderr_experr_fail -stderr_experr_fail_head() -{ - atf_set "descr" "Runs a program with stderr set to experr and fails" -} -stderr_experr_fail_body() -{ - echo foo >experr - atf_check 'echo bar 1>&2' 0 null experr -} - -atf_test_case stderr_ignore_empty -stderr_ignore_empty_head() -{ - atf_set "descr" "Runs a program with stderr set to ignore and" \ - "writes nothing" -} -stderr_ignore_empty_body() -{ - atf_check 'true 1>&2' 0 null ignore -} - -atf_test_case stderr_ignore_sth -stderr_ignore_sth_head() -{ - atf_set "descr" "Runs a program with stderr set to ignore and" \ - "writes something" -} -stderr_ignore_sth_body() -{ - atf_check 'echo foo 1>&2' 0 null ignore -} - -atf_test_case stderr_null_empty -stderr_null_empty_head() -{ - atf_set "descr" "Runs a program with stderr set to null and" \ - "writes nothing" -} -stderr_null_empty_body() -{ - atf_check 'true 1>&2' 0 null null -} - -atf_test_case stderr_null_sth -stderr_null_sth_head() -{ - atf_set "descr" "Runs a program with stderr set to null and" \ - "writes something" -} -stderr_null_sth_body() -{ - atf_check 'echo foo 1>&2' 0 null null -} - -atf_test_case stderr_stderr_written -stderr_stderr_written_head() -{ - atf_set "descr" "Runs a program with stderr set to stderr and" \ - "writes something" -} -stderr_stderr_written_body() -{ - atf_check 'echo foo 1>&2' 0 null stderr - echo foo >aux - cmp -s stderr aux || atf_fail "Test failed" -} - -atf_test_case stderr_stderr_noclobber -stderr_stderr_noclobber_head() -{ - atf_set "descr" "Runs a program multiple times with different stderr" \ - "modes and ensures that they do not overwrite an old" \ - "stderr file" -} -stderr_stderr_noclobber_body() -{ - echo bar >stderr - - echo foo >experr - atf_check 'echo foo 1>&2' 0 null experr - atf_check 'echo foo 1>&2' 0 null ignore - atf_check 'true 1>&2' 0 null null - - echo bar >aux - cmp -s stderr aux || atf_fail "Test failed" - - echo "foo bar" >stderr - atf_check "cut -d ' ' -f 1 &2" 0 null stderr - echo foo >experr - atf_check "cat stderr 1>&2" 0 null experr -} - -atf_init_test_cases() -{ - atf_add_test_case exitcode_0_0 - atf_add_test_case exitcode_0_1 - atf_add_test_case exitcode_1_0 - atf_add_test_case exitcode_1_1 - - atf_add_test_case stdout_expout_pass - atf_add_test_case stdout_expout_fail - atf_add_test_case stdout_ignore_empty - atf_add_test_case stdout_ignore_sth - atf_add_test_case stdout_null_empty - atf_add_test_case stdout_null_sth - atf_add_test_case stdout_stdout_written - atf_add_test_case stdout_stdout_noclobber - - atf_add_test_case stderr_experr_pass - atf_add_test_case stderr_experr_fail - atf_add_test_case stderr_ignore_empty - atf_add_test_case stderr_ignore_sth - atf_add_test_case stderr_null_empty - atf_add_test_case stderr_null_sth - atf_add_test_case stderr_stderr_written - atf_add_test_case stderr_stderr_noclobber -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/h_tp_basic_c.c b/dist/atf/tests/bootstrap/h_tp_basic_c.c deleted file mode 100644 index 4c4b74469147..000000000000 --- a/dist/atf/tests/bootstrap/h_tp_basic_c.c +++ /dev/null @@ -1,81 +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 - -ATF_TC(pass); -ATF_TC_HEAD(pass, tc) -{ - atf_tc_set_md_var(tc, "descr", "An empty test case that always passes"); -} -ATF_TC_BODY(pass, tc) -{ - atf_tc_pass(); -} - -ATF_TC(fail); -ATF_TC_HEAD(fail, tc) -{ - atf_tc_set_md_var(tc, "descr", "An empty test case that always fails"); -} -ATF_TC_BODY(fail, tc) -{ - atf_tc_fail("On purpose"); -} - -ATF_TC(skip); -ATF_TC_HEAD(skip, tc) -{ - atf_tc_set_md_var(tc, "descr", "An empty test case that is always " - "skipped"); -} -ATF_TC_BODY(skip, tc) -{ - atf_tc_skip("By design"); -} - -ATF_TC(default); -ATF_TC_HEAD(default, tc) -{ - atf_tc_set_md_var(tc, "descr", "A test case that passes without " - "explicitly stating it"); -} -ATF_TC_BODY(default, tc) -{ -} - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, pass); - ATF_TP_ADD_TC(tp, fail); - ATF_TP_ADD_TC(tp, skip); - ATF_TP_ADD_TC(tp, default); - - return atf_no_error(); -} diff --git a/dist/atf/tests/bootstrap/h_tp_basic_cpp.cpp b/dist/atf/tests/bootstrap/h_tp_basic_cpp.cpp deleted file mode 100644 index b0bfd89bd7ff..000000000000 --- a/dist/atf/tests/bootstrap/h_tp_basic_cpp.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -ATF_TEST_CASE(pass); - -ATF_TEST_CASE_HEAD(pass) -{ - set_md_var("descr", "An empty test case that always passes"); -} - -ATF_TEST_CASE_BODY(pass) -{ - ATF_PASS(); -} - -ATF_TEST_CASE(fail); - -ATF_TEST_CASE_HEAD(fail) -{ - set_md_var("descr", "An empty test case that always fails"); -} - -ATF_TEST_CASE_BODY(fail) -{ - ATF_FAIL("On purpose"); -} - -ATF_TEST_CASE(skip); - -ATF_TEST_CASE_HEAD(skip) -{ - set_md_var("descr", "An empty test case that is always skipped"); -} - -ATF_TEST_CASE_BODY(skip) -{ - ATF_SKIP("By design"); -} - -ATF_TEST_CASE(default); - -ATF_TEST_CASE_HEAD(default) -{ - set_md_var("descr", "A test case that passes without explicitly " - "stating it"); -} - -ATF_TEST_CASE_BODY(default) -{ -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, pass); - ATF_ADD_TEST_CASE(tcs, fail); - ATF_ADD_TEST_CASE(tcs, skip); - ATF_ADD_TEST_CASE(tcs, default); -} diff --git a/dist/atf/tests/bootstrap/h_tp_basic_sh.sh b/dist/atf/tests/bootstrap/h_tp_basic_sh.sh deleted file mode 100644 index 67559875c6fc..000000000000 --- a/dist/atf/tests/bootstrap/h_tp_basic_sh.sh +++ /dev/null @@ -1,79 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_test_case pass -pass_head() -{ - atf_set "descr" "An empty test case that always passes" -} -pass_body() -{ - atf_pass -} - -atf_test_case fail -fail_head() -{ - atf_set "descr" "An empty test case that always fails" -} -fail_body() -{ - atf_fail "On purpose" -} - -atf_test_case skip -skip_head() -{ - atf_set "descr" "An empty test case that is always skipped" -} -skip_body() -{ - atf_skip "By design" -} - -atf_test_case default -default_head() -{ - atf_set "descr" "A test case that passes without explicitly" \ - "stating it" -} -default_body() -{ - : -} - -atf_init_test_cases() -{ - atf_add_test_case pass - atf_add_test_case fail - atf_add_test_case skip - atf_add_test_case default -} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/package.m4 b/dist/atf/tests/bootstrap/package.m4 deleted file mode 100644 index 4a85aa56d9bf..000000000000 --- a/dist/atf/tests/bootstrap/package.m4 +++ /dev/null @@ -1,6 +0,0 @@ -# Signature of the current package. -m4_define([AT_PACKAGE_NAME], [Automated Testing Framework]) -m4_define([AT_PACKAGE_TARNAME], [atf]) -m4_define([AT_PACKAGE_VERSION], [0.5]) -m4_define([AT_PACKAGE_STRING], [Automated Testing Framework 0.5]) -m4_define([AT_PACKAGE_BUGREPORT], [atf-devel@NetBSD.org]) diff --git a/dist/atf/tests/bootstrap/t_application_help.at b/dist/atf/tests/bootstrap/t_application_help.at deleted file mode 100644 index cc2dcbafd015..000000000000 --- a/dist/atf/tests/bootstrap/t_application_help.at +++ /dev/null @@ -1,40 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([application: online help option]) - -AT_CHECK([APP_HELPER(app_empty)], 0, [stdout], []) -AT_CHECK([grep 'Available options' stdout], 1, [ignore], []) - -AT_CHECK([APP_HELPER(app_empty) -h], 0, [stdout], []) -AT_CHECK([grep 'Available options' stdout], 0, [ignore], []) - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_application_opts_args.at b/dist/atf/tests/bootstrap/t_application_opts_args.at deleted file mode 100644 index 7cf1e634ea7d..000000000000 --- a/dist/atf/tests/bootstrap/t_application_opts_args.at +++ /dev/null @@ -1,86 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([application: arguments and options handling]) - -dnl Check that an application that does not redefine any method does -dnl not show strange flags in the usage message. -AT_CHECK([APP_HELPER(app_empty) -h], 0, [stdout], []) -AT_CHECK([grep ' -d ' stdout], 1, [ignore], []) -AT_CHECK([grep ' -h ' stdout], 0, [ignore], []) -AT_CHECK([grep ' -v ' stdout], 1, [ignore], []) -AT_CHECK([grep ' -z ' stdout], 1, [ignore], []) - -dnl Check that an application that adds its own options shows them in -dnl the usage message. -AT_CHECK([APP_HELPER(app_opts_args) -h], 0, [stdout], []) -AT_CHECK([grep ' -d ' stdout], 0, [ignore], []) -AT_CHECK([grep ' -h ' stdout], 0, [ignore], []) -AT_CHECK([grep ' -v ' stdout], 0, [ignore], []) -AT_CHECK([grep ' -z ' stdout], 1, [ignore], []) - -dnl Check that an application that does not redefine any method does -dnl not recognize strange flags. -AT_CHECK([APP_HELPER(app_empty) -d], 1, [], [stderr]) -AT_CHECK([grep 'Unknown option.*-d' stderr], 0, [ignore], []) -AT_CHECK([APP_HELPER(app_empty) -v], 1, [], [stderr]) -AT_CHECK([grep 'Unknown option.*-v' stderr], 0, [ignore], []) -AT_CHECK([APP_HELPER(app_empty) -z], 1, [], [stderr]) -AT_CHECK([grep 'Unknown option.*-z' stderr], 0, [ignore], []) - -dnl Check that an application that adds its own options is able to -dnl properly handle them. -AT_CHECK([APP_HELPER(app_opts_args) -d], 0, [stdout], []) -AT_CHECK([grep -- '-d given' stdout], 0, [ignore], []) -AT_CHECK([APP_HELPER(app_opts_args) -v], 1, [], [stderr]) -AT_CHECK([grep 'Option.*-v.*requires an argument' stderr], 0, [ignore], []) -AT_CHECK([APP_HELPER(app_opts_args) -v foo], 0, [stdout], []) -AT_CHECK([grep -- '-v given with argument foo' stdout], 0, [ignore], []) -AT_CHECK([APP_HELPER(app_opts_args) -z], 1, [], [stderr]) -AT_CHECK([grep 'Unknown option.*-z' stderr], 0, [ignore], []) - -dnl Check that option processing stops after an argument. -AT_CHECK([APP_HELPER(app_opts_args) -- -d], 0, [stdout], []) -AT_CHECK([grep -- '-d given' stdout], 1, [], []) -AT_CHECK([APP_HELPER(app_opts_args) arg -d], 0, [stdout], []) -AT_CHECK([grep -- '-d given' stdout], 1, [], []) - -dnl Check that an application that does not redefine any method does -dnl not show unexpected arguments in the usage message. -AT_CHECK([APP_HELPER(app_empty) -h], 0, [stdout], []) -AT_CHECK([grep '\@<:@options\@:>@$' stdout], 0, [ignore], []) - -dnl Check that an application that defines the arguments it takes -dnl shows them in the usage message. -AT_CHECK([APP_HELPER(app_opts_args) -h], 0, [stdout], []) -AT_CHECK([grep '\@<:@options\@:>@ ' stdout], 0, [ignore], []) - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_atf_config.at b/dist/atf/tests/bootstrap/t_atf_config.at deleted file mode 100644 index 4377d0b68811..000000000000 --- a/dist/atf/tests/bootstrap/t_atf_config.at +++ /dev/null @@ -1,95 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([atf-config: querying of build-time variables]) -AT_TESTED(atf-config) - -all_vars="atf_arch atf_confdir atf_libexecdir atf_machine atf_pkgdatadir \ - atf_shell atf_workdir" -all_vars_no=7 - -dnl List all variables. -AT_CHECK([atf-config], [0], [stdout], []) -AT_CHECK([COUNT_LINES(stdout, ${all_vars_no})], [0], [], []) -for v in ${all_vars}; do - AT_CHECK([grep "${v}" stdout], [0], [ignore], []) -done - -dnl Query a single variable and test terse mode. -for v in ${all_vars}; do - AT_CHECK([atf-config ${v}], [0], [stdout], []) - AT_CHECK([COUNT_LINES(stdout, 1)], [0], [], []) - AT_CHECK([grep "${v}" stdout], [0], [ignore], []) - AT_CHECK([awk '{ print @S|@3 }' stdout], [0], [stdout], []) - AT_CHECK([mv stdout expout], [0], [], []) - AT_CHECK([atf-config -t ${v}], [0], [expout], []) -done - -dnl Query several variables. -AT_CHECK([atf-config atf_libexecdir atf_pkgdatadir], [0], [stdout], []) -AT_CHECK([grep 'atf_libexecdir' stdout], [0], [ignore], []) -AT_CHECK([grep 'atf_pkgdatadir' stdout], [0], [ignore], []) -AT_CHECK([COUNT_LINES(stdout, 2)], [0], [ignore], []) - -dnl Query a non-existent variable. -AT_CHECK([atf-config non_existent], [1], [], [stderr]) -AT_CHECK([grep 'Unknown variable.*non_existent' stderr], [0], [ignore], []) - -dnl Query an existent and non-existent variable. -for v in ${all_vars}; do - AT_CHECK([atf-config ${v} non_existent], [1], [], [stderr]) - AT_CHECK([grep 'Unknown variable.*non_existent' stderr], - [0], [ignore], []) - AT_CHECK([atf-config non_existent ${v}], [1], [], [stderr]) - AT_CHECK([grep 'Unknown variable.*non_existent' stderr], - [0], [ignore], []) -done - -dnl Override every variable through the environment. -for v in ${all_vars}; do - V=$(echo ${v} | tr '@<:@a-z@:>@' '@<:@A-Z@:>@') - AT_CHECK([env ${V}=testval atf-config], [0], [stdout], []) - AT_CHECK([mv stdout all], [0], [], []) - - AT_CHECK([grep "${v}" all], [0], [stdout], []) - AT_CHECK([mv stdout affected], [0], [], []) - AT_CHECK([grep -v "${v}" all], [0], [stdout], []) - AT_CHECK([mv stdout unaffected], [0], [], []) - - AT_CHECK([COUNT_LINES(affected, 1)], [0], [ignore], []) - AT_CHECK([COUNT_LINES(unaffected, $((${all_vars_no} - 1)))], - [0], [ignore], []) - - AT_CHECK([grep "${v} : testval" affected], [0], [ignore], []) - AT_CHECK([grep 'testval' unaffected], [1], [], []) -done - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_atf_format.at b/dist/atf/tests/bootstrap/t_atf_format.at deleted file mode 100644 index e573fcabb638..000000000000 --- a/dist/atf/tests/bootstrap/t_atf_format.at +++ /dev/null @@ -1,170 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([atf-format: formatting of long lines]) - -AT_TESTED([atf-config]) -call_atf_format() -{ - export COLUMNS # Required by FreeBSD's sh. - $(atf-config -t atf_libexecdir)/atf-format "${@}" -} - -dnl Start by formatting a single-paragraph message. Do several tests -dnl with different screen widths. - -AT_DATA([text], -[This is a single-line text message to be formatted. -]) - -AT_DATA([expout], -[This is a single-line text message to be formatted. -]) -AT_CHECK([COLUMNS=80 call_atf_format $1 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: $2' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: $2, passed' >&9 -true -EOF -AT_CHECK([chmod +x $1], [0], [], []) -]) - -m4_define([CREATE_FAIL_TEST], -[cat >$1 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: $2' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: $2, failed, No reason' >&9 -false -EOF -AT_CHECK([chmod +x $1], [0], [], []) -]) - -AT_CHECK([mkdir top], [0], [], []) -AT_CHECK([mkdir top/dir1], [0], [], []) -AT_CHECK([mkdir top/dir2], [0], [], []) -AT_DATA([top/Atffile], -[Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: dir1 -tp: dir2 -tp: test1 -tp: test2 -]) -AT_DATA([top/dir1/Atffile], -[Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: test3 -]) -AT_DATA([top/dir2/Atffile], -[Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: test4 -tp: test5 -]) -CREATE_PASS_TEST([top/test1], [tc_1]) -CREATE_FAIL_TEST([top/test2], [tc_2]) -CREATE_PASS_TEST([top/dir1/test3], [tc_3]) -CREATE_FAIL_TEST([top/dir2/test4], [tc_4]) -CREATE_PASS_TEST([top/dir2/test5], [tc_5]) - -AT_CHECK([cd top/dir1 && atf-run], [0], [stdout], []) -CHECK_TPS_TCR(tc_3, passed, stdout) -AT_CHECK([grep -i 'tc_@<:@1245@:>@' stdout], [1], [], []) -AT_CHECK([grep 'tc-so:ignore-me' stdout], [0], [ignore], []) -AT_CHECK([grep 'tc-se:ignore-me' stdout], [0], [ignore], []) - -AT_CHECK([cd top/dir2 && atf-run], [1], [stdout], [stderr]) -CHECK_TPS_TCR(tc_4, failed, stdout) -CHECK_TPS_TCR(tc_5, passed, stdout) -AT_CHECK([grep -i 'tc_@<:@123@:>@' stdout], [1], [], []) -AT_CHECK([grep 'tc-so:ignore-me' stdout], [0], [ignore], []) -AT_CHECK([grep 'tc-se:ignore-me' stdout], [0], [ignore], []) - -AT_CHECK([cd top && atf-run], [1], [stdout], [stderr]) -CHECK_TPS_TCR(tc_1, passed, stdout) -CHECK_TPS_TCR(tc_2, failed, stdout) -CHECK_TPS_TCR(tc_3, passed, stdout) -CHECK_TPS_TCR(tc_4, failed, stdout) -CHECK_TPS_TCR(tc_5, passed, stdout) -AT_CHECK([grep 'tc-so:ignore-me' stdout], [0], [ignore], []) -AT_CHECK([grep 'tc-se:ignore-me' stdout], [0], [ignore], []) - -dnl Repeat previous but using a glob that matches everything. -AT_DATA([top/Atffile], -[Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: * -]) -AT_CHECK([cd top && atf-run], [1], [stdout], [stderr]) -CHECK_TPS_TCR(tc_1, passed, stdout) -CHECK_TPS_TCR(tc_2, failed, stdout) -CHECK_TPS_TCR(tc_3, passed, stdout) -CHECK_TPS_TCR(tc_4, failed, stdout) -CHECK_TPS_TCR(tc_5, passed, stdout) -AT_CHECK([grep 'tc-so:ignore-me' stdout], [0], [ignore], []) -AT_CHECK([grep 'tc-se:ignore-me' stdout], [0], [ignore], []) - -dnl Repeat previous but using a glob that matches directories only. -AT_DATA([top/Atffile], -[Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: d* -]) -AT_CHECK([cd top && atf-run], [1], [stdout], [stderr]) -CHECK_TPS_TCR(tc_3, passed, stdout) -CHECK_TPS_TCR(tc_4, failed, stdout) -CHECK_TPS_TCR(tc_5, passed, stdout) -AT_CHECK([grep 'tc-so:ignore-me' stdout], [0], [ignore], []) -AT_CHECK([grep 'tc-se:ignore-me' stdout], [0], [ignore], []) - -dnl Make sure globs do not match non-executatble nor hidden files. -dnl XXX This is not really part of the bootstrap test suite. Move to -dnl tests/atf/tools/t_atf_run.sh when it exists. -AT_CHECK([rm -rf top], [0], [], []) -AT_CHECK([mkdir top], [0], [], []) -CREATE_PASS_TEST([top/test1], [tc_1]) -CREATE_PASS_TEST([top/test2], [tc_2]) -CREATE_PASS_TEST([top/test3], [tc_3]) -AT_CHECK([chmod -x top/test3], [0], [], []) -CREATE_PASS_TEST([top/.test4], [tc_4]) -AT_CHECK([chmod -x top/.test4], [0], [], []) -AT_DATA([top/Atffile], -[Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: * -]) -AT_CHECK([cd top && atf-run], [0], [stdout], [stderr]) -CHECK_TPS_TCR(tc_1, passed, stdout) -CHECK_TPS_TCR(tc_2, passed, stdout) -AT_CHECK([grep -i 'tc_3' stdout], [1], [ignore], []) -AT_CHECK([grep -i 'tc_4' stdout], [1], [ignore], []) - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_subr_atf_check.at b/dist/atf/tests/bootstrap/t_subr_atf_check.at deleted file mode 100644 index 67424032e6d4..000000000000 --- a/dist/atf/tests/bootstrap/t_subr_atf_check.at +++ /dev/null @@ -1,77 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([subr: atf_check function]) - -AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_0_0], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_0_1], - [1], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_1_0], - [1], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) exitcode_1_1], - [0], [ignore], [ignore]) - -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_expout_pass], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_expout_fail], - [1], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_ignore_empty], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_ignore_sth], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_null_empty], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_null_sth], - [1], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_stdout_written], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stdout_stdout_noclobber], - [0], [ignore], [ignore]) - -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_experr_pass], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_experr_fail], - [1], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_ignore_empty], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_ignore_sth], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_null_empty], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_null_sth], - [1], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_stderr_written], - [0], [ignore], [ignore]) -AT_CHECK([TEST_HELPER(tp_atf_check_sh) stderr_stderr_noclobber], - [0], [ignore], [ignore]) - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_test_program_compare.at b/dist/atf/tests/bootstrap/t_test_program_compare.at deleted file mode 100644 index a1a1c77805da..000000000000 --- a/dist/atf/tests/bootstrap/t_test_program_compare.at +++ /dev/null @@ -1,188 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([test_program: compare the user-visible interfaces]) - -dnl Ask for help. -AT_CHECK([TEST_HELPER_NO_S(tp_basic_c) -h], [0], [stdout], []) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -AT_CHECK([TEST_HELPER_NO_S(tp_basic_cpp) -h], [0], [expout], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -AT_CHECK([TEST_HELPER_NO_S(tp_basic_sh) -h], [0], [expout], []) - -dnl Ask for help, force line wrapping. -AT_CHECK([COLUMNS=20 TEST_HELPER_NO_S(tp_basic_c) -h], [0], [stdout], []) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -AT_CHECK([COLUMNS=20 TEST_HELPER_NO_S(tp_basic_cpp) -h], [0], [expout], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -AT_CHECK([COLUMNS=20 TEST_HELPER_NO_S(tp_basic_sh) -h], [0], [expout], []) - -dnl Ask for help alongside another option (-s), which is an error. -AT_CHECK([TEST_HELPER(tp_basic_c) -h], [1], [], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' experr -AT_CHECK([TEST_HELPER(tp_basic_cpp) -h], [1], [], [experr]) -sed 's,tp_basic_c,tp_basic_sh,g' experr -AT_CHECK([TEST_HELPER(tp_basic_sh) -h], [1], [], [experr]) - -dnl Give an invalid option. -AT_CHECK([TEST_HELPER(tp_basic_c) -Z], [1], [], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' experr -AT_CHECK([TEST_HELPER(tp_basic_cpp) -Z], [1], [], [experr]) -sed 's,tp_basic_c,tp_basic_sh,g' experr -AT_CHECK([TEST_HELPER(tp_basic_sh) -Z], [1], [], [experr]) - -dnl Give an invalid option alongside -h. -AT_CHECK([TEST_HELPER(tp_basic_c) -Z -h], [1], [], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' experr -AT_CHECK([TEST_HELPER(tp_basic_cpp) -Z -h], [1], [], [experr]) -sed 's,tp_basic_c,tp_basic_sh,g' experr -AT_CHECK([TEST_HELPER(tp_basic_sh) -Z -h], [1], [], [experr]) - -dnl List all tests. -AT_CHECK([TEST_HELPER(tp_basic_c) -l], [0], [stdout], []) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -AT_CHECK([TEST_HELPER(tp_basic_cpp) -l], [0], [expout], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -AT_CHECK([TEST_HELPER(tp_basic_sh) -l], [0], [expout], []) - -dnl Run all tests. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout], - [1], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -dnl Run the pass test case. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout pass], - [0], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout pass], - [0], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout pass], - [0], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -dnl Run the fail test case. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout fail], - [1], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout fail], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout fail], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -dnl Run the skip test case. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout skip], - [0], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout skip], - [0], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout skip], - [0], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -dnl Run the default test case. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout default], - [0], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout default], - [0], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout default], - [0], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -dnl Try pattern matching. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout "*f*"], - [1], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout "*f*"], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout "*f*"], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -dnl Run an unknown test case. -AT_CHECK([TEST_HELPER(tp_basic_c) -r3 3>resout unknown], - [1], [stdout], [stderr]) -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_cpp) -r3 3>resout unknown], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -AT_CHECK([TEST_HELPER(tp_basic_sh) -r3 3>resout unknown], - [1], [expout], [experr]) -AT_CHECK([cmp -s resout resexp], [0], [], []) - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_test_program_filter.at b/dist/atf/tests/bootstrap/t_test_program_filter.at deleted file mode 100644 index b55f3819f938..000000000000 --- a/dist/atf/tests/bootstrap/t_test_program_filter.at +++ /dev/null @@ -1,95 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([test_program: filter test cases by name]) - -for h in tp_basic_c tp_basic_cpp tp_basic_sh; do - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 4 -tc-start: pass -tc-end: pass, passed -tc-start: fail -tc-end: fail, failed, On purpose -tc-start: skip -tc-end: skip, skipped, By design -tc-start: default -tc-end: default, passed -]) -AT_CHECK([TEST_HELPER(${h}) -r3 3>resout], 1, [ignore], [ignore]) -AT_CHECK([cmp -s resout expres], [0], [], []) -AT_CHECK([TEST_HELPER(${h}) -r3 3>resout "*"], 1, [ignore], [ignore]) -AT_CHECK([cmp -s resout expres], [0], [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: pass -tc-end: pass, passed -]) -AT_CHECK([TEST_HELPER(${h}) -r3 pass 3>resout], 0, [ignore], [ignore]) -AT_CHECK([cmp -s resout expres], [0], [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 2 -tc-start: pass -tc-end: pass, passed -tc-start: pass -tc-end: pass, passed -]) -AT_CHECK([TEST_HELPER(${h}) -r3 pass "p*" 3>resout], 0, [ignore], [ignore]) -AT_CHECK([cmp -s resout expres], [0], [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: skip -tc-end: skip, skipped, By design -]) -AT_CHECK([TEST_HELPER(${h}) -r3 skip 3>resout], 0, [ignore], [ignore]) -AT_CHECK([cmp -s resout expres], [0], [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 2 -tc-start: fail -tc-end: fail, failed, On purpose -tc-start: default -tc-end: default, passed -]) -AT_CHECK([TEST_HELPER(${h}) -r3 "*f*" 3>resout], 1, [ignore], [ignore]) -AT_CHECK([cmp -s resout expres], [0], [], []) - -done - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_test_program_list.at b/dist/atf/tests/bootstrap/t_test_program_list.at deleted file mode 100644 index b6dcee59dcb7..000000000000 --- a/dist/atf/tests/bootstrap/t_test_program_list.at +++ /dev/null @@ -1,49 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([test_program: list test cases]) - -for h in tp_basic_c tp_basic_cpp tp_basic_sh; do - -AT_CHECK([TEST_HELPER(${h}) -l], [0], [stdout], []) -AT_CHECK([COUNT_LINES(stdout, 4)], [0], [ignore], []) -AT_CHECK([grep 'pass .*always passes' stdout], [0], [ignore], []) -AT_CHECK([grep 'fail .*always fails' stdout], [0], [ignore], []) -AT_CHECK([grep 'skip .*always skipped' stdout], [0], [ignore], []) -AT_CHECK([grep 'default .*explicitly' stdout], [0], [ignore], []) - -AT_CHECK([TEST_HELPER(${h}) -l pass], [0], [stdout], []) -AT_CHECK([COUNT_LINES(stdout, 1)], [0], [ignore], []) -AT_CHECK([grep 'pass .*always passes' stdout], [0], [ignore], []) - -done - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/t_test_program_run.at b/dist/atf/tests/bootstrap/t_test_program_run.at deleted file mode 100644 index 8df14850a033..000000000000 --- a/dist/atf/tests/bootstrap/t_test_program_run.at +++ /dev/null @@ -1,116 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_SETUP([test_program: output format and exit codes]) - -for h in tp_basic_c tp_basic_cpp tp_basic_sh; do - -AT_CHECK([TEST_HELPER(${h})], 1, [stdout], [stderr]) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stdout], 3)], [0], [], []) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stderr], 3)], [0], [], []) -CHECK_TCS_TCR(pass, passed, stdout) -CHECK_TCS_TCR(fail, failed, stdout) -CHECK_TCS_TCR(skip, skipped, stdout) -CHECK_TCS_TCR(default, passed, stdout) - -dnl Check the -r flag to redirect the results output. -dnl (Same checks as above, as -r1 is the default.) -AT_CHECK([TEST_HELPER(${h}) -r1], 1, [stdout], [stderr]) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stdout], 3)], [0], [], []) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stderr], 3)], [0], [], []) -CHECK_TCS_TCR(pass, passed, stdout) -CHECK_TCS_TCR(fail, failed, stdout) -CHECK_TCS_TCR(skip, skipped, stdout) -CHECK_TCS_TCR(default, passed, stdout) - -dnl Check the -r flag to redirect the results output. -AT_CHECK([TEST_HELPER(${h}) -r2], 1, [ignore], [stderr]) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stdout], 3)], [0], [], []) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stderr], 3)], [0], [], []) -CHECK_TCS_TCR(pass, passed, stderr) -CHECK_TCS_TCR(fail, failed, stderr) -CHECK_TCS_TCR(skip, skipped, stderr) -CHECK_TCS_TCR(default, passed, stderr) - -dnl Check the -r flag to redirect the results output. -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 4 -tc-start: pass -tc-end: pass, passed -tc-start: fail -tc-end: fail, failed, On purpose -tc-start: skip -tc-end: skip, skipped, By design -tc-start: default -tc-end: default, passed -]) -AT_CHECK([TEST_HELPER(${h}) -r3 3>resout], 1, [stdout], [stderr]) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stdout], 3)], [0], [], []) -AT_CHECK([COUNT_IN_LINES([grep __atf_tc_separator__ stderr], 3)], [0], [], []) -AT_CHECK([cmp -s resout expres], 0, [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: pass -tc-end: pass, passed -]) -AT_CHECK([TEST_HELPER(${h}) -r3 pass 3>resout], 0, [stdout], [stderr]) -AT_CHECK([grep __atf_tc_separator__ stdout], [1], [], []) -AT_CHECK([grep __atf_tc_separator__ stderr], [1], [], []) -AT_CHECK([cmp -s resout expres], 0, [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: fail -tc-end: fail, failed, On purpose -]) -AT_CHECK([TEST_HELPER(${h}) -r3 fail 3>resout], 1, [stdout], [stderr]) -AT_CHECK([grep __atf_tc_separator__ stdout], [1], [], []) -AT_CHECK([grep __atf_tc_separator__ stderr], [1], [], []) -AT_CHECK([cmp -s resout expres], 0, [], []) - -AT_DATA([expres], [Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: skip -tc-end: skip, skipped, By design -]) -AT_CHECK([TEST_HELPER(${h}) -r3 skip 3>resout], 0, [stdout], [stderr]) -AT_CHECK([grep __atf_tc_separator__ stdout], [1], [], []) -AT_CHECK([grep __atf_tc_separator__ stderr], [1], [], []) -AT_CHECK([cmp -s resout expres], 0, [], []) - -done - -AT_CLEANUP() - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/bootstrap/testsuite b/dist/atf/tests/bootstrap/testsuite deleted file mode 100755 index 9ba3f4c53c54..000000000000 --- a/dist/atf/tests/bootstrap/testsuite +++ /dev/null @@ -1,16060 +0,0 @@ -#! /bin/sh -# -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. -# This test suite is free software; the Free Software Foundation gives -# unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -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 - # 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 - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -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 - # 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 - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -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 - # 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 - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -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'" - - - -SHELL=${CONFIG_SHELL-/bin/sh} - -# How were we run? -at_cli_args="$@" - -# Load the config file. -for at_file in atconfig atlocal -do - test -r $at_file || continue - . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2 - { (exit 1); exit 1; }; } -done - -# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: -: ${at_top_build_prefix=$at_top_builddir} - -# atconfig delivers names relative to the directory the test suite is -# in, but the groups themselves are run in testsuite-dir/group-dir. -if test -n "$at_top_srcdir"; then - builddir=../.. - for at_dir in srcdir top_srcdir top_build_prefix - do - at_val=`eval echo '${'at_$at_dir'}'` - eval "$at_dir=\$at_val/../.." - done -fi - -# Not all shells have the 'times' builtin; the subshell is needed to make -# sure we discard the 'times: not found' message from the shell. -at_times_p=false -(times) >/dev/null 2>&1 && at_times_p=: - -# CLI Arguments to pass to the debugging scripts. -at_debug_args= -# -e sets to true -at_errexit_p=false -# Shall we be verbose? -at_verbose=: -at_quiet=echo - -# Shall we keep the debug scripts? Must be `:' when the suite is -# run by a debug script, so that the script doesn't remove itself. -at_debug_p=false -# Display help message? -at_help_p=false -# Display the version message? -at_version_p=false -# List test groups? -at_list_p=false -# Test groups to run -at_groups= - -# The directory we are in. -at_dir=`pwd` -# The directory the whole suite works in. -# Should be absolutely to let the user `cd' at will. -at_suite_dir=$at_dir/$as_me.dir -# The file containing the suite. -at_suite_log=$at_dir/$as_me.log -# The file containing the location of the last AT_CHECK. -at_check_line_file=$at_suite_dir/at-check-line -# The file containing the exit status of the last command. -at_status_file=$at_suite_dir/at-status -# The files containing the output of the tested commands. -at_stdout=$at_suite_dir/at-stdout -at_stder1=$at_suite_dir/at-stder1 -at_stderr=$at_suite_dir/at-stderr -# The file containing dates. -at_times_file=$at_suite_dir/at-times - -# List of the tested programs. -at_tested='atf-config -atf-run' -# List of the all the test groups. -at_groups_all=' 1 2 3 4 5 6 7 8 9 10' -# As many question marks as there are digits in the last test group number. -# Used to normalize the test group numbers so that `ls' lists them in -# numerical order. -at_format='??' -# Description of all the test groups. -at_help_all="1;t_application_opts_args.at:30;application: arguments and options handling;; -2;t_application_help.at:30;application: online help option;; -3;t_test_program_filter.at:30;test_program: filter test cases by name;; -4;t_test_program_run.at:30;test_program: output format and exit codes;; -5;t_test_program_list.at:30;test_program: list test cases;; -6;t_atf_format.at:30;atf-format: formatting of long lines;; -7;t_atf_config.at:30;atf-config: querying of build-time variables;; -8;t_atf_run.at:30;atf-run: execution of tests;; -9;t_test_program_compare.at:30;test_program: compare the user-visible interfaces;; -10;t_subr_atf_check.at:30;subr: atf_check function;; -" - -at_prev= -for at_option -do - # If the previous option needs an argument, assign it. - if test -n "$at_prev"; then - at_option=$at_prev=$at_option - at_prev= - fi - - case $at_option in - *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;; - *) at_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $at_option in - --help | -h ) - at_help_p=: - ;; - - --list | -l ) - at_list_p=: - ;; - - --version | -V ) - at_version_p=: - ;; - - --clean | -c ) - test -d "$at_suite_dir" && - find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -f -r "$at_suite_dir" "$at_suite_log" - exit 0 - ;; - - --debug | -d ) - at_debug_p=: - ;; - - --errexit | -e ) - at_debug_p=: - at_errexit_p=: - ;; - - --verbose | -v ) - at_verbose=echo; at_quiet=: - ;; - - --trace | -x ) - at_traceon='set -x'; at_traceoff='set +x' - ;; - - [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) - at_groups="$at_groups$at_option " - ;; - - # Ranges - [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) - at_range_start=`echo $at_option |tr -d X-` - at_range=`echo " $at_groups_all " | \ - sed -e 's/^.* \('$at_range_start' \)/\1/'` - at_groups="$at_groups$at_range " - ;; - - -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) - at_range_end=`echo $at_option |tr -d X-` - at_range=`echo " $at_groups_all " | \ - sed -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " - ;; - - [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ - [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ - [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ - [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ - [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ - [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) - at_range_start=`expr $at_option : '\(.*\)-'` - at_range_end=`expr $at_option : '.*-\(.*\)'` - if test $at_range_start -gt $at_range_end; then - at_tmp=$at_range_end - at_range_end=$at_range_start - at_range_start=$at_tmp - fi - at_range=`echo " $at_groups_all " | \ - sed -e 's/^.*\( '$at_range_start' \)/\1/' \ - -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " - ;; - - # Keywords. - --keywords | -k ) - at_prev=--keywords - ;; - --keywords=* ) - at_groups_selected=$at_help_all - at_save_IFS=$IFS - IFS=, - set X $at_optarg - shift - IFS=$at_save_IFS - for at_keyword - do - at_invert= - case $at_keyword in - '!'*) - at_invert="-v" - at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` - ;; - esac - # It is on purpose that we match the test group titles too. - at_groups_selected=`echo "$at_groups_selected" | - grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` - done - at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'` - # Smash the newlines. - at_groups="$at_groups`echo $at_groups_selected` " - ;; - - *=*) - at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $at_envvar" >&2 - { (exit 1); exit 1; }; } - at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$at_envvar='$at_value'" - export $at_envvar - # Propagate to debug scripts. - at_debug_args="$at_debug_args $at_envvar='$at_value'" - ;; - - *) echo "$as_me: invalid option: $at_option" >&2 - echo "Try \`$0 --help' for more information." >&2 - exit 1 - ;; - esac -done - -# Selected test groups. -if test -z "$at_groups"; then - at_groups=$at_groups_all -else - # Sort the tests, removing duplicates: - at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu` - # and add banners. (Passing at_groups_all is tricky--see the comment - # starting with "Passing at_groups is tricky.") - at_groups=`echo "$at_groups$as_nl $at_groups_all" | - awk 'BEGIN { FS = "@" } # Effectively switch off field splitting. - /^$/ { next } # Ignore the empty line. - !/ / { groups++; selected[$ 0] = 1; next } - # The last line, containing at_groups_all. - { - n = split($ 0, a, " ") - # If there are several tests, select their banners: - if (groups > 1) { - for (i = 1; i <= n; i++) { - if (a[i] ~ /^banner-/) - banner = a[i] - else if (banner != "" && selected[a[i]] == 1) - selected[banner] = 1 - } - } - for (i = 1; i <= n; i++) - if (selected[a[i]] == 1) - list = list " " a[i] - print list - }'` -fi - -# Help message. -if $at_help_p; then - cat <<_ATEOF -Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] - -Run all the tests, or the selected TESTS, given by numeric ranges, and -save a detailed log file. Upon failure, create debugging scripts. - -You should not change environment variables unless explicitly passed -as command line arguments. Set \`AUTOTEST_PATH' to select the executables -to exercise. Each relative directory is expanded as build and source -directories relatively to the top level of this distribution. E.g., - - $ $0 AUTOTEST_PATH=bin - -possibly amounts into - - PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH -_ATEOF -cat <<_ATEOF - -Operation modes: - -h, --help print the help message, then exit - -V, --version print version number, then exit - -c, --clean remove all the files this test suite might create and exit - -l, --list describes all the tests, or the selected TESTS -_ATEOF -cat <<_ATEOF - -Execution tuning: - -k, --keywords=KEYWORDS - select the tests matching all the comma-separated KEYWORDS - multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD - -e, --errexit abort as soon as a test fails; implies --debug - -v, --verbose force more detailed output - default for debugging scripts - -d, --debug inhibit clean up and top-level logging - default for debugging scripts - -x, --trace enable tests shell tracing -_ATEOF -cat <<_ATEOF - -Report bugs to . -_ATEOF - exit 0 -fi - -# List of tests. -if $at_list_p; then - cat <<_ATEOF -Automated Testing Framework 0.5 test suite: bootstrap tests test groups: - - NUM: FILE-NAME:LINE TEST-GROUP-NAME - KEYWORDS - -_ATEOF - # Passing at_groups is tricky. We cannot use it to form a literal string - # or regexp because of the limitation of AIX awk. And Solaris' awk - # doesn't grok more than 99 fields in a record, so we have to use `split'. - echo "$at_groups$as_nl$at_help_all" | - awk 'BEGIN { FS = ";" } - NR == 1 { - for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1 - next - } - { - if (selected[$ 1]) { - printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 - if ($ 4) printf " %s\n", $ 4 - } - }' - exit 0 -fi -if $at_version_p; then - echo "$as_me (Automated Testing Framework 0.5)" - cat <<\_ACEOF - -Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -Foundation, Inc. -This test suite is free software; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi - -# Don't take risks: use only absolute directories in PATH. -# -# For stand-alone test suites, AUTOTEST_PATH is relative to `.'. -# -# For embedded test suites, AUTOTEST_PATH is relative to the top level -# of the package. Then expand it into build/src parts, since users -# may create executables in both places. -AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"` -at_path= -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $AUTOTEST_PATH $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR -case $as_dir in - [\\/]* | ?:[\\/]* ) - at_path=$at_path$as_dir - ;; - * ) - if test -z "$at_top_build_prefix"; then - # Stand-alone test suite. - at_path=$at_path$as_dir - else - # Embedded test suite. - at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR - at_path=$at_path$at_top_srcdir/$as_dir - fi - ;; -esac -done -IFS=$as_save_IFS - - -# Now build and simplify PATH. -# -# There might be directories that don't exist, but don't redirect -# builtins' (eg., cd) stderr directly: Ultrix's sh hates that. -PATH= -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $at_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` -test -d "$as_dir" || continue -case $PATH in - $as_dir | \ - $as_dir$PATH_SEPARATOR* | \ - *$PATH_SEPARATOR$as_dir | \ - *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;; - - '') PATH=$as_dir ;; - *) PATH=$PATH$PATH_SEPARATOR$as_dir ;; -esac -done -IFS=$as_save_IFS - -export PATH - -# Setting up the FDs. -# 5 is the log file. Not to be overwritten if `-d'. - -if $at_debug_p; then - at_suite_log=/dev/null -else - : >"$at_suite_log" -fi -exec 5>>"$at_suite_log" - -# Banners and logs. -cat <<\_ASBOX -## ------------------------------------------------------------ ## -## Automated Testing Framework 0.5 test suite: bootstrap tests. ## -## ------------------------------------------------------------ ## -_ASBOX -{ - cat <<\_ASBOX -## ------------------------------------------------------------ ## -## Automated Testing Framework 0.5 test suite: bootstrap tests. ## -## ------------------------------------------------------------ ## -_ASBOX - echo - - echo "$as_me: command line was:" - echo " $ $0 $at_cli_args" - echo - - # Try to find a few ChangeLogs in case it might help determining the - # exact version. Use the relative dir: if the top dir is a symlink, - # find will not follow it (and options to follow the links are not - # portable), which would result in no output here. - if test -n "$at_top_srcdir"; then - cat <<\_ASBOX -## ----------- ## -## ChangeLogs. ## -## ----------- ## -_ASBOX - echo - for at_file in `find "$at_top_srcdir" -name ChangeLog -print` - do - echo "$as_me: $at_file:" - sed 's/^/| /;10q' $at_file - echo - done - - { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} - echo - fi - - # Contents of the config files. - for at_file in atconfig atlocal - do - test -r $at_file || continue - echo "$as_me: $at_file:" - sed 's/^/| /' $at_file - echo - done - - cat <<\_ASBOX -## ---------------- ## -## Tested programs. ## -## ---------------- ## -_ASBOX - echo -} >&5 - -# Report what programs are being tested. -for at_program in : $at_tested -do - test "$at_program" = : && continue - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -f "$as_dir/$at_program" && break -done -IFS=$as_save_IFS - - if test -f "$as_dir/$at_program"; then - { - echo "$at_srcdir/testsuite.at:30: $as_dir/$at_program --version" - "$as_dir/$at_program" --version - echo - } >&5 2>&1 - else - { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5 -echo "$as_me: error: cannot find $at_program" >&2;} - { (exit 1); exit 1; }; } - fi -done - -{ - cat <<\_ASBOX -## ------------------ ## -## Running the tests. ## -## ------------------ ## -_ASBOX -} >&5 - -at_start_date=`date` -at_start_time=`date +%s 2>/dev/null` -echo "$as_me: starting at: $at_start_date" >&5 -at_xpass_list= -at_xfail_list= -at_pass_list= -at_fail_list= -at_skip_list= -at_group_count=0 - -# Create the master directory if it doesn't already exist. -test -d "$at_suite_dir" || - mkdir "$at_suite_dir" || - { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5 -echo "$as_me: error: cannot create '$at_suite_dir'" >&2;} - { (exit 1); exit 1; }; } - -# Can we diff with `/dev/null'? DU 5.0 refuses. -if diff /dev/null /dev/null >/dev/null 2>&1; then - at_devnull=/dev/null -else - at_devnull=$at_suite_dir/devnull - >"$at_devnull" -fi - -# Use `diff -u' when possible. -if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" -then - at_diff='diff -u' -else - at_diff=diff -fi - - -for at_group in $at_groups -do - # Be sure to come back to the top test directory. - cd "$at_suite_dir" - - case $at_group in - banner-*) - at_group_log=$at_suite_log - ;; - - *) - at_group_normalized=$at_group - - while :; do - case $at_group_normalized in #( - $at_format*) break;; - esac - at_group_normalized=0$at_group_normalized - done - - - # Create a fresh directory for the next test group, and enter. - at_group_dir=$at_suite_dir/$at_group_normalized - at_group_log=$at_group_dir/$as_me.log - if test -d "$at_group_dir"; then - find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -fr "$at_group_dir" - fi - # Be tolerant if the above `rm' was not able to remove the directory. - { as_dir=$at_group_dir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - cd $at_group_dir - ;; - esac - - echo 0 > "$at_status_file" - - # Clearly separate the test groups when verbose. - test $at_group_count != 0 && $at_verbose - - # In verbose mode, append to the log file *and* show on - # the standard output; in quiet mode only write to the log - if test $at_verbose = echo; then - at_tee_pipe='tee -a "$at_group_log"' - else - at_tee_pipe='cat >> "$at_group_log"' - fi - - case $at_group in - 1 ) # 1. t_application_opts_args.at:30: application: arguments and options handling - at_setup_line='t_application_opts_args.at:30' - at_desc="application: arguments and options handling" - $at_quiet $ECHO_N " 1: application: arguments and options handling $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "1. t_application_opts_args.at:30: testing ..." - $at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:34: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h" -echo t_application_opts_args.at:34 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:35: grep ' -d ' stdout" -echo t_application_opts_args.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -d ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -d ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:35: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:36: grep ' -h ' stdout" -echo t_application_opts_args.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -h ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -h ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:37: grep ' -v ' stdout" -echo t_application_opts_args.at:37 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -v ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -v ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:37: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:38: grep ' -z ' stdout" -echo t_application_opts_args.at:38 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -z ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -z ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:38: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:42: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -h" -echo t_application_opts_args.at:42 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:42: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:43: grep ' -d ' stdout" -echo t_application_opts_args.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -d ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -d ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:44: grep ' -h ' stdout" -echo t_application_opts_args.at:44 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -h ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -h ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:44: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:45: grep ' -v ' stdout" -echo t_application_opts_args.at:45 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -v ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -v ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:45: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:46: grep ' -z ' stdout" -echo t_application_opts_args.at:46 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep ' -z ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep ' -z ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:46: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:50: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -d" -echo t_application_opts_args.at:50 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -d ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -d ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:50: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:51: grep 'Unknown option.*-d' stderr" -echo t_application_opts_args.at:51 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown option.*-d' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown option.*-d' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:51: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:52: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -v" -echo t_application_opts_args.at:52 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -v ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -v ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:52: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:53: grep 'Unknown option.*-v' stderr" -echo t_application_opts_args.at:53 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown option.*-v' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown option.*-v' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:53: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:54: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -z" -echo t_application_opts_args.at:54 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -z ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -z ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:54: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:55: grep 'Unknown option.*-z' stderr" -echo t_application_opts_args.at:55 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown option.*-z' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown option.*-z' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:55: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:59: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -d" -echo t_application_opts_args.at:59 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -d ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -d ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:59: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:60: grep -- '-d given' stdout" -echo t_application_opts_args.at:60 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -- '-d given' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -- '-d given' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:60: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:61: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -v" -echo t_application_opts_args.at:61 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -v ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -v ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:61: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:62: grep 'Option.*-v.*requires an argument' stderr" -echo t_application_opts_args.at:62 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Option.*-v.*requires an argument' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Option.*-v.*requires an argument' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:62: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:63: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -v foo" -echo t_application_opts_args.at:63 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -v foo ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -v foo ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:63: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:64: grep -- '-v given with argument foo' stdout" -echo t_application_opts_args.at:64 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -- '-v given with argument foo' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -- '-v given with argument foo' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:64: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:65: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -z" -echo t_application_opts_args.at:65 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -z ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -z ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:65: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:66: grep 'Unknown option.*-z' stderr" -echo t_application_opts_args.at:66 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown option.*-z' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown option.*-z' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:66: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:69: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -- -d" -echo t_application_opts_args.at:69 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -- -d ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -- -d ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:69: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:70: grep -- '-d given' stdout" -echo t_application_opts_args.at:70 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -- '-d given' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -- '-d given' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:70: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:71: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args arg -d" -echo t_application_opts_args.at:71 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args arg -d ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args arg -d ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:71: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:72: grep -- '-d given' stdout" -echo t_application_opts_args.at:72 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -- '-d given' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -- '-d given' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_opts_args.at:72: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:76: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h" -echo t_application_opts_args.at:76 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:76: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:77: grep '\\[options\\]\$' stdout" -echo t_application_opts_args.at:77 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - case "grep '\\[options\\]$' stdout" in - *' -'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;; - *) at_trace_this=yes ;; - esac -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '\[options\]$' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '\[options\]$' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:77: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:81: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -h" -echo t_application_opts_args.at:81 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_opts_args -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:81: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_opts_args.at:82: grep '\\[options\\] ' stdout" -echo t_application_opts_args.at:82 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '\[options\] ' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '\[options\] ' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_opts_args.at:82: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 2 ) # 2. t_application_help.at:30: application: online help option - at_setup_line='t_application_help.at:30' - at_desc="application: online help option" - $at_quiet $ECHO_N " 2: application: online help option $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "2. t_application_help.at:30: testing ..." - $at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_help.at:32: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty" -echo t_application_help.at:32 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_help.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_help.at:33: grep 'Available options' stdout" -echo t_application_help.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Available options' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Available options' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_application_help.at:33: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_application_help.at:35: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h" -echo t_application_help.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_app_empty -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_help.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_application_help.at:36: grep 'Available options' stdout" -echo t_application_help.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Available options' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Available options' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_application_help.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 3 ) # 3. t_test_program_filter.at:30: test_program: filter test cases by name - at_setup_line='t_test_program_filter.at:30' - at_desc="test_program: filter test cases by name" - $at_quiet $ECHO_N " 3: test_program: filter test cases by name $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "3. t_test_program_filter.at:30: testing ..." - $at_traceon - - -for h in tp_basic_c tp_basic_cpp tp_basic_sh; do - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 4 -tc-start: pass -tc-end: pass, passed -tc-start: fail -tc-end: fail, failed, On purpose -tc-start: skip -tc-end: skip, skipped, By design -tc-start: default -tc-end: default, passed -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:46: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout" -echo t_test_program_filter.at:46 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_filter.at:46: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:47: cmp -s resout expres" -echo t_test_program_filter.at:47 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:47: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:48: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout \"*\"" -echo t_test_program_filter.at:48 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*" ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*" ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_filter.at:48: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:49: cmp -s resout expres" -echo t_test_program_filter.at:49 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:49: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: pass -tc-end: pass, passed -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:57: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass 3>resout" -echo t_test_program_filter.at:57 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:57: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:58: cmp -s resout expres" -echo t_test_program_filter.at:58 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:58: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 2 -tc-start: pass -tc-end: pass, passed -tc-start: pass -tc-end: pass, passed -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:68: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass \"p*\" 3>resout" -echo t_test_program_filter.at:68 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass "p*" 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass "p*" 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:68: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:69: cmp -s resout expres" -echo t_test_program_filter.at:69 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:69: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: skip -tc-end: skip, skipped, By design -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:77: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 skip 3>resout" -echo t_test_program_filter.at:77 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 skip 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 skip 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:77: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:78: cmp -s resout expres" -echo t_test_program_filter.at:78 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:78: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 2 -tc-start: fail -tc-end: fail, failed, On purpose -tc-start: default -tc-end: default, passed -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:88: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 \"*f*\" 3>resout" -echo t_test_program_filter.at:88 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 "*f*" 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 "*f*" 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_filter.at:88: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_filter.at:89: cmp -s resout expres" -echo t_test_program_filter.at:89 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_filter.at:89: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -done - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 4 ) # 4. t_test_program_run.at:30: test_program: output format and exit codes - at_setup_line='t_test_program_run.at:30' - at_desc="test_program: output format and exit codes" - $at_quiet $ECHO_N " 4: test_program: output format and exit codes $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "4. t_test_program_run.at:30: testing ..." - $at_traceon - - -for h in tp_basic_c tp_basic_cpp tp_basic_sh; do - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:34: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap" -echo t_test_program_run.at:34 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:34: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:35: test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:36: test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:37: grep '^tc-end: pass, passed' stdout" -echo t_test_program_run.at:37 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: pass, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: pass, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:37: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:38: grep '^tc-end: fail, failed' stdout" -echo t_test_program_run.at:38 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: fail, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: fail, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:38: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:39: grep '^tc-end: skip, skipped' stdout" -echo t_test_program_run.at:39 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: skip, skipped' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: skip, skipped' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:39: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:40: grep '^tc-end: default, passed' stdout" -echo t_test_program_run.at:40 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: default, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: default, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:40: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:44: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r1" -echo t_test_program_run.at:44 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:44: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:45: test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:45 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:45: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:46: test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:46 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:46: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:47: grep '^tc-end: pass, passed' stdout" -echo t_test_program_run.at:47 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: pass, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: pass, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:47: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:48: grep '^tc-end: fail, failed' stdout" -echo t_test_program_run.at:48 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: fail, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: fail, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:48: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:49: grep '^tc-end: skip, skipped' stdout" -echo t_test_program_run.at:49 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: skip, skipped' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: skip, skipped' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:49: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:50: grep '^tc-end: default, passed' stdout" -echo t_test_program_run.at:50 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: default, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: default, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:50: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:53: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r2" -echo t_test_program_run.at:53 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:53: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:54: test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:54 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:54: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:55: test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:55 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:55: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:56: grep '^tc-end: pass, passed' stderr" -echo t_test_program_run.at:56 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: pass, passed' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: pass, passed' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:56: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:57: grep '^tc-end: fail, failed' stderr" -echo t_test_program_run.at:57 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: fail, failed' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: fail, failed' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:57: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:58: grep '^tc-end: skip, skipped' stderr" -echo t_test_program_run.at:58 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: skip, skipped' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: skip, skipped' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:58: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:59: grep '^tc-end: default, passed' stderr" -echo t_test_program_run.at:59 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: default, passed' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: default, passed' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:59: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 4 -tc-start: pass -tc-end: pass, passed -tc-start: fail -tc-end: fail, failed, On purpose -tc-start: skip -tc-end: skip, skipped, By design -tc-start: default -tc-end: default, passed -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:74: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout" -echo t_test_program_run.at:74 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:74: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:75: test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:75 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stdout | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:75: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:76: test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3" -echo t_test_program_run.at:76 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(grep __atf_tc_separator__ stderr | wc -l | awk '{ print $1 }') = 3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:76: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:77: cmp -s resout expres" -echo t_test_program_run.at:77 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:77: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: pass -tc-end: pass, passed -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:85: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass 3>resout" -echo t_test_program_run.at:85 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 pass 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:85: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:86: grep __atf_tc_separator__ stdout" -echo t_test_program_run.at:86 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep __atf_tc_separator__ stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep __atf_tc_separator__ stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:86: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:87: grep __atf_tc_separator__ stderr" -echo t_test_program_run.at:87 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep __atf_tc_separator__ stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep __atf_tc_separator__ stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:87: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:88: cmp -s resout expres" -echo t_test_program_run.at:88 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:88: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: fail -tc-end: fail, failed, On purpose -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:96: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 fail 3>resout" -echo t_test_program_run.at:96 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 fail 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 fail 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:96: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:97: grep __atf_tc_separator__ stdout" -echo t_test_program_run.at:97 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep __atf_tc_separator__ stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep __atf_tc_separator__ stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:97: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:98: grep __atf_tc_separator__ stderr" -echo t_test_program_run.at:98 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep __atf_tc_separator__ stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep __atf_tc_separator__ stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:98: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:99: cmp -s resout expres" -echo t_test_program_run.at:99 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:99: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expres <<'_ATEOF' -Content-Type: application/X-atf-tcs; version="1" - -tcs-count: 1 -tc-start: skip -tc-end: skip, skipped, By design -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:107: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 skip 3>resout" -echo t_test_program_run.at:107 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 skip 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 skip 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:107: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:108: grep __atf_tc_separator__ stdout" -echo t_test_program_run.at:108 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep __atf_tc_separator__ stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep __atf_tc_separator__ stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:108: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:109: grep __atf_tc_separator__ stderr" -echo t_test_program_run.at:109 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep __atf_tc_separator__ stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep __atf_tc_separator__ stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_run.at:109: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_run.at:110: cmp -s resout expres" -echo t_test_program_run.at:110 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout expres ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout expres ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_run.at:110: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -done - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 5 ) # 5. t_test_program_list.at:30: test_program: list test cases - at_setup_line='t_test_program_list.at:30' - at_desc="test_program: list test cases" - $at_quiet $ECHO_N " 5: test_program: list test cases $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "5. t_test_program_list.at:30: testing ..." - $at_traceon - - -for h in tp_basic_c tp_basic_cpp tp_basic_sh; do - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:34: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l" -echo t_test_program_list.at:34 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:35: test $(wc -l stdout | awk '{ print $1 }') = 4" -echo t_test_program_list.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l stdout | awk '{ print $1 }') = 4 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l stdout | awk '{ print $1 }') = 4 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:36: grep 'pass .*always passes' stdout" -echo t_test_program_list.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'pass .*always passes' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'pass .*always passes' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:37: grep 'fail .*always fails' stdout" -echo t_test_program_list.at:37 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'fail .*always fails' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'fail .*always fails' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:37: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:38: grep 'skip .*always skipped' stdout" -echo t_test_program_list.at:38 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'skip .*always skipped' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'skip .*always skipped' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:38: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:39: grep 'default .*explicitly' stdout" -echo t_test_program_list.at:39 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'default .*explicitly' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'default .*explicitly' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:39: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:41: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_\${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l pass" -echo t_test_program_list.at:41 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l pass ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_${h} \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l pass ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:41: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:42: test $(wc -l stdout | awk '{ print $1 }') = 1" -echo t_test_program_list.at:42 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l stdout | awk '{ print $1 }') = 1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l stdout | awk '{ print $1 }') = 1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:42: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_list.at:43: grep 'pass .*always passes' stdout" -echo t_test_program_list.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'pass .*always passes' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'pass .*always passes' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_list.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -done - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 6 ) # 6. t_atf_format.at:30: atf-format: formatting of long lines - at_setup_line='t_atf_format.at:30' - at_desc="atf-format: formatting of long lines" - $at_quiet $ECHO_N " 6: atf-format: formatting of long lines $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "6. t_atf_format.at:30: testing ..." - $at_traceon - - - -call_atf_format() -{ - export COLUMNS # Required by FreeBSD's sh. - $(atf-config -t atf_libexecdir)/atf-format "${@}" -} - - -cat >text <<'_ATEOF' -This is a single-line text message to be formatted. -_ATEOF - - -cat >expout <<'_ATEOF' -This is a single-line text message to be formatted. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:49: COLUMNS=80 call_atf_format "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=80 call_atf_format "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=80 call_atf_format "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:49: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' - tag This is a single-line text message to be formatted. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:54: COLUMNS=80 call_atf_format -t ' tag ' "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=80 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=80 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:54: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:55: COLUMNS=80 call_atf_format -t ' tag' -l 7 "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=80 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=80 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:55: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' -This is a single-line -text message to be -formatted. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:62: COLUMNS=21 call_atf_format "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=21 call_atf_format "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=21 call_atf_format "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:62: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' - tag This is a single-line - text message to be - formatted. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:69: COLUMNS=28 call_atf_format -t ' tag ' "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=28 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=28 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:69: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:70: COLUMNS=28 call_atf_format -t ' tag' -l 7 "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=28 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=28 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:70: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' - tag This - is - a - single-line - text - message - to - be - formatted. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:83: COLUMNS=1 call_atf_format -t ' tag ' "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=1 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=1 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:83: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:84: COLUMNS=1 call_atf_format -t ' tag' -l 7 "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=1 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=1 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:84: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - -cat >text <<'_ATEOF' -This is a multi-line text message to be formatted. -And this is the second line, or better said paragraph. -_ATEOF - - -cat >expout <<'_ATEOF' -This is a multi-line text message to be formatted. - -And this is the second line, or better said paragraph. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:99: COLUMNS=80 call_atf_format "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=80 call_atf_format "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=80 call_atf_format "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:99: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' - tag This is a multi-line text message to be formatted. - - And this is the second line, or better said paragraph. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:106: COLUMNS=80 call_atf_format -t ' tag ' "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=80 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=80 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:106: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:107: COLUMNS=80 call_atf_format -t ' tag' -l 7 "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=80 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=80 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:107: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' -This is a multi-line -text message to be -formatted. - -And this is the -second line, or -better said -paragraph. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:119: COLUMNS=21 call_atf_format "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=21 call_atf_format "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=21 call_atf_format "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:119: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' - tag This is a multi-line - text message to be - formatted. - - And this is the - second line, or - better said - paragraph. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:131: COLUMNS=28 call_atf_format -t ' tag ' "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=28 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=28 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:131: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:132: COLUMNS=28 call_atf_format -t ' tag' -l 7 "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=28 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=28 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:132: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >expout <<'_ATEOF' - tag This - is - a - multi-line - text - message - to - be - formatted. - - And - this - is - the - second - line, - or - better - said - paragraph. -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:156: COLUMNS=1 call_atf_format -t ' tag ' "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=1 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=1 call_atf_format -t ' tag ' "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:156: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:157: COLUMNS=1 call_atf_format -t ' tag' -l 7 "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=1 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=1 call_atf_format -t ' tag' -l 7 "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:157: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >text <<'_ATEOF' -This is a single-line text message to be formatted; it is very long so that it wraps a traditional 80-column terminal. -_ATEOF - -cp text expout - -$at_traceoff -echo "$at_srcdir/t_atf_format.at:166: COLUMNS= call_atf_format "$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS= call_atf_format "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS= call_atf_format "$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_format.at:166: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 7 ) # 7. t_atf_config.at:30: atf-config: querying of build-time variables - at_setup_line='t_atf_config.at:30' - at_desc="atf-config: querying of build-time variables" - $at_quiet $ECHO_N " 7: atf-config: querying of build-time variables $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "7. t_atf_config.at:30: testing ..." - $at_traceon - - - -all_vars="atf_arch atf_confdir atf_libexecdir atf_machine atf_pkgdatadir \ - atf_shell atf_workdir" -all_vars_no=7 - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:38: atf-config" -echo t_atf_config.at:38 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:38: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:39: test $(wc -l stdout | awk '{ print $1 }') = \${all_vars_no}" -echo t_atf_config.at:39 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l stdout | awk '{ print $1 }') = ${all_vars_no} ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l stdout | awk '{ print $1 }') = ${all_vars_no} ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:39: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -for v in ${all_vars}; do - $at_traceoff -echo "$at_srcdir/t_atf_config.at:41: grep \"\${v}\" stdout" -echo t_atf_config.at:41 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep "${v}" stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep "${v}" stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:41: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -done - -for v in ${all_vars}; do - $at_traceoff -echo "$at_srcdir/t_atf_config.at:46: atf-config \${v}" -echo t_atf_config.at:46 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config ${v} ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config ${v} ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:46: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:47: test $(wc -l stdout | awk '{ print $1 }') = 1" -echo t_atf_config.at:47 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l stdout | awk '{ print $1 }') = 1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l stdout | awk '{ print $1 }') = 1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:47: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:48: grep \"\${v}\" stdout" -echo t_atf_config.at:48 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep "${v}" stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep "${v}" stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:48: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:49: awk '{ print $3 }' stdout" -echo t_atf_config.at:49 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; awk '{ print $3 }' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; awk '{ print $3 }' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:49: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:50: mv stdout expout" -echo t_atf_config.at:50 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mv stdout expout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mv stdout expout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:50: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:51: atf-config -t \${v}" -echo t_atf_config.at:51 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config -t ${v} ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config -t ${v} ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:51: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -done - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:55: atf-config atf_libexecdir atf_pkgdatadir" -echo t_atf_config.at:55 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config atf_libexecdir atf_pkgdatadir ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config atf_libexecdir atf_pkgdatadir ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:55: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:56: grep 'atf_libexecdir' stdout" -echo t_atf_config.at:56 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'atf_libexecdir' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'atf_libexecdir' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:56: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:57: grep 'atf_pkgdatadir' stdout" -echo t_atf_config.at:57 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'atf_pkgdatadir' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'atf_pkgdatadir' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:57: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:58: test $(wc -l stdout | awk '{ print $1 }') = 2" -echo t_atf_config.at:58 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l stdout | awk '{ print $1 }') = 2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l stdout | awk '{ print $1 }') = 2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:58: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:61: atf-config non_existent" -echo t_atf_config.at:61 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config non_existent ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config non_existent ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_config.at:61: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_config.at:62: grep 'Unknown variable.*non_existent' stderr" -echo t_atf_config.at:62 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown variable.*non_existent' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown variable.*non_existent' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:62: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -for v in ${all_vars}; do - $at_traceoff -echo "$at_srcdir/t_atf_config.at:66: atf-config \${v} non_existent" -echo t_atf_config.at:66 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config ${v} non_existent ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config ${v} non_existent ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_config.at:66: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:68: grep 'Unknown variable.*non_existent' stderr" -echo t_atf_config.at:68 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown variable.*non_existent' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown variable.*non_existent' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:68: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:69: atf-config non_existent \${v}" -echo t_atf_config.at:69 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; atf-config non_existent ${v} ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; atf-config non_existent ${v} ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_config.at:69: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:71: grep 'Unknown variable.*non_existent' stderr" -echo t_atf_config.at:71 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'Unknown variable.*non_existent' stderr ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'Unknown variable.*non_existent' stderr ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:71: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -done - -for v in ${all_vars}; do - V=$(echo ${v} | tr '[a-z]' '[A-Z]') - $at_traceoff -echo "$at_srcdir/t_atf_config.at:77: env \${V}=testval atf-config" -echo t_atf_config.at:77 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; env ${V}=testval atf-config ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; env ${V}=testval atf-config ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:77: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:78: mv stdout all" -echo t_atf_config.at:78 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mv stdout all ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mv stdout all ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:78: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:80: grep \"\${v}\" all" -echo t_atf_config.at:80 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep "${v}" all ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep "${v}" all ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:80: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:81: mv stdout affected" -echo t_atf_config.at:81 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mv stdout affected ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mv stdout affected ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:81: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:82: grep -v \"\${v}\" all" -echo t_atf_config.at:82 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v "${v}" all ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v "${v}" all ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:82: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:83: mv stdout unaffected" -echo t_atf_config.at:83 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mv stdout unaffected ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mv stdout unaffected ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:83: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:85: test $(wc -l affected | awk '{ print $1 }') = 1" -echo t_atf_config.at:85 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l affected | awk '{ print $1 }') = 1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l affected | awk '{ print $1 }') = 1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:85: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:87: test $(wc -l unaffected | awk '{ print $1 }') = \$((\${all_vars_no} - 1))" -echo t_atf_config.at:87 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a $(...) command substitution)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; test $(wc -l unaffected | awk '{ print $1 }') = $((${all_vars_no} - 1)) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; test $(wc -l unaffected | awk '{ print $1 }') = $((${all_vars_no} - 1)) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:87: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:89: grep \"\${v} : testval\" affected" -echo t_atf_config.at:89 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep "${v} : testval" affected ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep "${v} : testval" affected ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_config.at:89: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/t_atf_config.at:90: grep 'testval' unaffected" -echo t_atf_config.at:90 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'testval' unaffected ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'testval' unaffected ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_config.at:90: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -done - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 8 ) # 8. t_atf_run.at:30: atf-run: execution of tests - at_setup_line='t_atf_run.at:30' - at_desc="atf-run: execution of tests" - $at_quiet $ECHO_N " 8: atf-run: execution of tests $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "8. t_atf_run.at:30: testing ..." - $at_traceon - - - - - - - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:67: mkdir top" -echo t_atf_run.at:67 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mkdir top ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mkdir top ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:67: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:68: mkdir top/dir1" -echo t_atf_run.at:68 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mkdir top/dir1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mkdir top/dir1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:68: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:69: mkdir top/dir2" -echo t_atf_run.at:69 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mkdir top/dir2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mkdir top/dir2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:69: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -cat >top/Atffile <<'_ATEOF' -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: dir1 -tp: dir2 -tp: test1 -tp: test2 -_ATEOF - -cat >top/dir1/Atffile <<'_ATEOF' -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: test3 -_ATEOF - -cat >top/dir2/Atffile <<'_ATEOF' -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp: test4 -tp: test5 -_ATEOF - -cat >top/test1 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_1' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_1, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:95: chmod +x top/test1" -echo t_atf_run.at:95 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/test1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/test1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:95: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/test2 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_2' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_2, failed, No reason' >&9 -false -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:96: chmod +x top/test2" -echo t_atf_run.at:96 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/test2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/test2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:96: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/dir1/test3 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_3' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_3, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:97: chmod +x top/dir1/test3" -echo t_atf_run.at:97 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/dir1/test3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/dir1/test3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:97: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/dir2/test4 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_4' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_4, failed, No reason' >&9 -false -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:98: chmod +x top/dir2/test4" -echo t_atf_run.at:98 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/dir2/test4 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/dir2/test4 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:98: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/dir2/test5 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_5' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_5, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:99: chmod +x top/dir2/test5" -echo t_atf_run.at:99 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/dir2/test5 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/dir2/test5 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:99: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:101: cd top/dir1 && atf-run" -echo t_atf_run.at:101 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cd top/dir1 && atf-run ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cd top/dir1 && atf-run ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:101: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:102: grep '^tc-end: tc_3, passed' stdout" -echo t_atf_run.at:102 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:102: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:103: grep -i 'tc_[1245]' stdout" -echo t_atf_run.at:103 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -i 'tc_[1245]' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -i 'tc_[1245]' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:103: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:104: grep 'tc-so:ignore-me' stdout" -echo t_atf_run.at:104 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:104: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:105: grep 'tc-se:ignore-me' stdout" -echo t_atf_run.at:105 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:105: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:107: cd top/dir2 && atf-run" -echo t_atf_run.at:107 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cd top/dir2 && atf-run ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cd top/dir2 && atf-run ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:107: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:108: grep '^tc-end: tc_4, failed' stdout" -echo t_atf_run.at:108 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:108: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:109: grep '^tc-end: tc_5, passed' stdout" -echo t_atf_run.at:109 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:109: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:110: grep -i 'tc_[123]' stdout" -echo t_atf_run.at:110 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -i 'tc_[123]' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -i 'tc_[123]' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:110: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:111: grep 'tc-so:ignore-me' stdout" -echo t_atf_run.at:111 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:111: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:112: grep 'tc-se:ignore-me' stdout" -echo t_atf_run.at:112 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:112: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:114: cd top && atf-run" -echo t_atf_run.at:114 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cd top && atf-run ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cd top && atf-run ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:114: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:115: grep '^tc-end: tc_1, passed' stdout" -echo t_atf_run.at:115 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_1, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_1, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:115: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:116: grep '^tc-end: tc_2, failed' stdout" -echo t_atf_run.at:116 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_2, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_2, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:116: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:117: grep '^tc-end: tc_3, passed' stdout" -echo t_atf_run.at:117 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:117: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:118: grep '^tc-end: tc_4, failed' stdout" -echo t_atf_run.at:118 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:118: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:119: grep '^tc-end: tc_5, passed' stdout" -echo t_atf_run.at:119 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:119: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:120: grep 'tc-so:ignore-me' stdout" -echo t_atf_run.at:120 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:120: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:121: grep 'tc-se:ignore-me' stdout" -echo t_atf_run.at:121 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:121: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/Atffile <<'_ATEOF' -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: * -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:131: cd top && atf-run" -echo t_atf_run.at:131 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cd top && atf-run ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cd top && atf-run ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:131: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:132: grep '^tc-end: tc_1, passed' stdout" -echo t_atf_run.at:132 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_1, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_1, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:132: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:133: grep '^tc-end: tc_2, failed' stdout" -echo t_atf_run.at:133 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_2, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_2, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:133: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:134: grep '^tc-end: tc_3, passed' stdout" -echo t_atf_run.at:134 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:134: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:135: grep '^tc-end: tc_4, failed' stdout" -echo t_atf_run.at:135 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:135: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:136: grep '^tc-end: tc_5, passed' stdout" -echo t_atf_run.at:136 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:136: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:137: grep 'tc-so:ignore-me' stdout" -echo t_atf_run.at:137 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:137: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:138: grep 'tc-se:ignore-me' stdout" -echo t_atf_run.at:138 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:138: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/Atffile <<'_ATEOF' -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: d* -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:148: cd top && atf-run" -echo t_atf_run.at:148 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cd top && atf-run ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cd top && atf-run ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:148: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:149: grep '^tc-end: tc_3, passed' stdout" -echo t_atf_run.at:149 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_3, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:149: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:150: grep '^tc-end: tc_4, failed' stdout" -echo t_atf_run.at:150 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_4, failed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:150: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:151: grep '^tc-end: tc_5, passed' stdout" -echo t_atf_run.at:151 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_5, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:151: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:152: grep 'tc-so:ignore-me' stdout" -echo t_atf_run.at:152 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-so:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:152: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:153: grep 'tc-se:ignore-me' stdout" -echo t_atf_run.at:153 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep 'tc-se:ignore-me' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:153: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:158: rm -rf top" -echo t_atf_run.at:158 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; rm -rf top ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; rm -rf top ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:158: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:159: mkdir top" -echo t_atf_run.at:159 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; mkdir top ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; mkdir top ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:159: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -cat >top/test1 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_1' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_1, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:160: chmod +x top/test1" -echo t_atf_run.at:160 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/test1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/test1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:160: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/test2 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_2' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_2, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:161: chmod +x top/test2" -echo t_atf_run.at:161 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/test2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/test2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:161: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -cat >top/test3 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_3' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_3, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:162: chmod +x top/test3" -echo t_atf_run.at:162 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/test3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/test3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:162: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:163: chmod -x top/test3" -echo t_atf_run.at:163 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod -x top/test3 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod -x top/test3 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:163: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -cat >top/.test4 <&9 -echo "" >&9 -echo 'tcs-count: 1' >&9 -echo 'tc-start: tc_4' >&9 -echo ignore-me -echo ignore-me >&2 -echo 'tc-end: tc_4, passed' >&9 -true -EOF -$at_traceoff -echo "$at_srcdir/t_atf_run.at:164: chmod +x top/.test4" -echo t_atf_run.at:164 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod +x top/.test4 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod +x top/.test4 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:164: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:165: chmod -x top/.test4" -echo t_atf_run.at:165 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; chmod -x top/.test4 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; chmod -x top/.test4 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:165: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -cat >top/Atffile <<'_ATEOF' -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: * -_ATEOF - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:173: cd top && atf-run" -echo t_atf_run.at:173 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cd top && atf-run ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cd top && atf-run ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:173: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:174: grep '^tc-end: tc_1, passed' stdout" -echo t_atf_run.at:174 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_1, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_1, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:174: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:175: grep '^tc-end: tc_2, passed' stdout" -echo t_atf_run.at:175 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep '^tc-end: tc_2, passed' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep '^tc-end: tc_2, passed' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_atf_run.at:175: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:176: grep -i 'tc_3' stdout" -echo t_atf_run.at:176 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -i 'tc_3' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -i 'tc_3' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:176: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_atf_run.at:177: grep -i 'tc_4' stdout" -echo t_atf_run.at:177 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -i 'tc_4' stdout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -i 'tc_4' stdout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_atf_run.at:177: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 9 ) # 9. t_test_program_compare.at:30: test_program: compare the user-visible interfaces - at_setup_line='t_test_program_compare.at:30' - at_desc="test_program: compare the user-visible interfaces" - $at_quiet $ECHO_N " 9: test_program: compare the user-visible interfaces$ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "9. t_test_program_compare.at:30: testing ..." - $at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:33: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c -h" -echo t_test_program_compare.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:35: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp -h" -echo t_test_program_compare.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:37: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh -h" -echo t_test_program_compare.at:37 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:37: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:40: COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c -h" -echo t_test_program_compare.at:40 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:40: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:42: COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp -h" -echo t_test_program_compare.at:42 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:42: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:44: COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh -h" -echo t_test_program_compare.at:44 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; COLUMNS=20 $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:44: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:47: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h" -echo t_test_program_compare.at:47 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:47: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' experr -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:49: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h" -echo t_test_program_compare.at:49 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:49: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' experr -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:51: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h" -echo t_test_program_compare.at:51 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:51: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:54: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z" -echo t_test_program_compare.at:54 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:54: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' experr -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:56: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z" -echo t_test_program_compare.at:56 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:56: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' experr -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:58: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z" -echo t_test_program_compare.at:58 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:58: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:61: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h" -echo t_test_program_compare.at:61 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:61: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' experr -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:63: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h" -echo t_test_program_compare.at:63 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:63: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' experr -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:65: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h" -echo t_test_program_compare.at:65 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -Z -h ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:65: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:68: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l" -echo t_test_program_compare.at:68 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:68: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:70: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l" -echo t_test_program_compare.at:70 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:70: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:72: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l" -echo t_test_program_compare.at:72 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -l ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:72: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:76: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout" -echo t_test_program_compare.at:76 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:76: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:81: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout" -echo t_test_program_compare.at:81 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:81: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:82: cmp -s resout resexp" -echo t_test_program_compare.at:82 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:82: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:87: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout" -echo t_test_program_compare.at:87 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:87: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:88: cmp -s resout resexp" -echo t_test_program_compare.at:88 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:88: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:92: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass" -echo t_test_program_compare.at:92 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:92: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:97: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass" -echo t_test_program_compare.at:97 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:97: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:98: cmp -s resout resexp" -echo t_test_program_compare.at:98 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:98: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:103: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass" -echo t_test_program_compare.at:103 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout pass ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:103: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:104: cmp -s resout resexp" -echo t_test_program_compare.at:104 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:104: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:108: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail" -echo t_test_program_compare.at:108 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:108: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:113: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail" -echo t_test_program_compare.at:113 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:113: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:114: cmp -s resout resexp" -echo t_test_program_compare.at:114 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:114: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:119: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail" -echo t_test_program_compare.at:119 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout fail ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:119: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:120: cmp -s resout resexp" -echo t_test_program_compare.at:120 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:120: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:124: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip" -echo t_test_program_compare.at:124 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:124: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:129: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip" -echo t_test_program_compare.at:129 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:129: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:130: cmp -s resout resexp" -echo t_test_program_compare.at:130 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:130: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:135: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip" -echo t_test_program_compare.at:135 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout skip ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:135: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:136: cmp -s resout resexp" -echo t_test_program_compare.at:136 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:136: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:140: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default" -echo t_test_program_compare.at:140 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:140: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:145: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default" -echo t_test_program_compare.at:145 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:145: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:146: cmp -s resout resexp" -echo t_test_program_compare.at:146 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:146: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:151: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default" -echo t_test_program_compare.at:151 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout default ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:151: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:152: cmp -s resout resexp" -echo t_test_program_compare.at:152 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:152: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:156: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout \"*f*\"" -echo t_test_program_compare.at:156 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*f*" ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*f*" ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:156: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:161: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout \"*f*\"" -echo t_test_program_compare.at:161 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*f*" ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*f*" ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:161: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:162: cmp -s resout resexp" -echo t_test_program_compare.at:162 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:162: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:167: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout \"*f*\"" -echo t_test_program_compare.at:167 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*f*" ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout "*f*" ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:167: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:168: cmp -s resout resexp" -echo t_test_program_compare.at:168 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:168: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:172: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown" -echo t_test_program_compare.at:172 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_c \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:172: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_cpp,g' expout -sed 's,tp_basic_c,tp_basic_cpp,g' experr -sed 's,tp_basic_c,tp_basic_cpp,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:177: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown" -echo t_test_program_compare.at:177 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_cpp \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:177: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:178: cmp -s resout resexp" -echo t_test_program_compare.at:178 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:178: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -sed 's,tp_basic_c,tp_basic_sh,g' expout -sed 's,tp_basic_c,tp_basic_sh,g' experr -sed 's,tp_basic_c,tp_basic_sh,g' resexp -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:183: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown" -echo t_test_program_compare.at:183 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_basic_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap -r3 3>resout unknown ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_test_program_compare.at:183: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_test_program_compare.at:184: cmp -s resout resexp" -echo t_test_program_compare.at:184 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; cmp -s resout resexp ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_test_program_compare.at:184: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 10 ) # 10. t_subr_atf_check.at:30: subr: atf_check function - at_setup_line='t_subr_atf_check.at:30' - at_desc="subr: atf_check function" - $at_quiet $ECHO_N " 10: subr: atf_check function $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "10. t_subr_atf_check.at:30: testing ..." - $at_traceon - - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:33: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_0_0" -echo t_subr_atf_check.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_0_0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_0_0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:35: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_0_1" -echo t_subr_atf_check.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_0_1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_0_1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:35: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:37: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_1_0" -echo t_subr_atf_check.at:37 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_1_0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_1_0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:37: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:39: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_1_1" -echo t_subr_atf_check.at:39 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_1_1 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap exitcode_1_1 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:39: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:42: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_expout_pass" -echo t_subr_atf_check.at:42 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_expout_pass ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_expout_pass ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:42: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:44: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_expout_fail" -echo t_subr_atf_check.at:44 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_expout_fail ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_expout_fail ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:44: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:46: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_ignore_empty" -echo t_subr_atf_check.at:46 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_ignore_empty ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_ignore_empty ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:46: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:48: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_ignore_sth" -echo t_subr_atf_check.at:48 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_ignore_sth ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_ignore_sth ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:48: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:50: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_null_empty" -echo t_subr_atf_check.at:50 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_null_empty ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_null_empty ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:50: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:52: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_null_sth" -echo t_subr_atf_check.at:52 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_null_sth ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_null_sth ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:52: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:54: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_stdout_written" -echo t_subr_atf_check.at:54 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_stdout_written ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_stdout_written ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:54: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:56: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_stdout_noclobber" -echo t_subr_atf_check.at:56 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_stdout_noclobber ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stdout_stdout_noclobber ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:56: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:59: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_experr_pass" -echo t_subr_atf_check.at:59 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_experr_pass ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_experr_pass ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:59: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:61: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_experr_fail" -echo t_subr_atf_check.at:61 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_experr_fail ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_experr_fail ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:61: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:63: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_ignore_empty" -echo t_subr_atf_check.at:63 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_ignore_empty ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_ignore_empty ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:63: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:65: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_ignore_sth" -echo t_subr_atf_check.at:65 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_ignore_sth ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_ignore_sth ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:65: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:67: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_null_empty" -echo t_subr_atf_check.at:67 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_null_empty ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_null_empty ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:67: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:69: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_null_sth" -echo t_subr_atf_check.at:69 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_null_sth ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_null_sth ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:69: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:71: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_stderr_written" -echo t_subr_atf_check.at:71 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_stderr_written ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_stderr_written ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:71: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - -$at_traceoff -echo "$at_srcdir/t_subr_atf_check.at:73: $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_stderr_noclobber" -echo t_subr_atf_check.at:73 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_stderr_noclobber ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap/h_tp_atf_check_sh \ - -s $({ - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -})/tests/bootstrap stderr_stderr_noclobber ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/t_subr_atf_check.at:73: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - - * ) - echo "$as_me: no such test group: $at_group" >&2 - continue - ;; - esac - - # Be sure to come back to the suite directory, in particular - # since below we might `rm' the group directory we are in currently. - cd "$at_suite_dir" - - case $at_group in - banner-*) ;; - *) - if test ! -f "$at_check_line_file"; then - sed "s/^ */$as_me: warning: /" <<_ATEOF - A failure happened in a test group before any test could be - run. This means that test suite is improperly designed. Please - report this failure to . -_ATEOF - echo "$at_setup_line" >"$at_check_line_file" - fi - at_group_count=`expr 1 + $at_group_count` - $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C" - echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log" - case $at_xfail:$at_status in - yes:0) - at_msg="UNEXPECTED PASS" - at_xpass_list="$at_xpass_list $at_group" - at_errexit=$at_errexit_p - ;; - no:0) - at_msg="ok" - at_pass_list="$at_pass_list $at_group" - at_errexit=false - ;; - *:77) - at_msg='skipped ('`cat "$at_check_line_file"`')' - at_skip_list="$at_skip_list $at_group" - at_errexit=false - ;; - yes:*) - at_msg='expected failure ('`cat "$at_check_line_file"`')' - at_xfail_list="$at_xfail_list $at_group" - at_errexit=false - ;; - no:*) - at_msg='FAILED ('`cat "$at_check_line_file"`')' - at_fail_list="$at_fail_list $at_group" - at_errexit=$at_errexit_p - ;; - esac - # Make sure there is a separator even with long titles. - echo " $at_msg" - at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" - case $at_status in - 0|77) - # $at_times_file is only available if the group succeeded. - # We're not including the group log, so the success message - # is written in the global log separately. But we also - # write to the group log in case they're using -d. - if test -f "$at_times_file"; then - at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' - rm -f "$at_times_file" - fi - echo "$at_log_msg" >> "$at_group_log" - echo "$at_log_msg" >&5 - - # Cleanup the group directory, unless the user wants the files. - if $at_debug_p ; then - { - echo "#! /bin/sh" - echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' - echo "cd '$at_dir'" - echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \ - '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}' - echo 'exit 1' - } >$at_group_dir/run - chmod +x $at_group_dir/run - - elif test -d "$at_group_dir"; then - find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -fr "$at_group_dir" - fi - ;; - *) - # Upon failure, include the log into the testsuite's global - # log. The failure message is written in the group log. It - # is later included in the global log. - echo "$at_log_msg" >> "$at_group_log" - - # Upon failure, keep the group directory for autopsy, and - # create the debugging script. - { - echo "#! /bin/sh" - echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' - echo "cd '$at_dir'" - echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \ - '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}' - echo 'exit 1' - } >$at_group_dir/run - chmod +x $at_group_dir/run - - $at_errexit && break - ;; - esac - ;; - esac -done - -# Back to the top directory. -cd "$at_dir" - -# Compute the duration of the suite. -at_stop_date=`date` -at_stop_time=`date +%s 2>/dev/null` -echo "$as_me: ending at: $at_stop_date" >&5 -case $at_start_time,$at_stop_time in - [0-9]*,[0-9]*) - at_duration_s=`expr $at_stop_time - $at_start_time` - at_duration_m=`expr $at_duration_s / 60` - at_duration_h=`expr $at_duration_m / 60` - at_duration_s=`expr $at_duration_s % 60` - at_duration_m=`expr $at_duration_m % 60` - at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" - echo "$as_me: test suite duration: $at_duration" >&5 - ;; -esac - -# Wrap up the test suite with summary statistics. -at_skip_count=`set dummy $at_skip_list; shift; echo $#` -at_fail_count=`set dummy $at_fail_list; shift; echo $#` -at_xpass_count=`set dummy $at_xpass_list; shift; echo $#` -at_xfail_count=`set dummy $at_xfail_list; shift; echo $#` - -at_run_count=`expr $at_group_count - $at_skip_count` -at_unexpected_count=`expr $at_xpass_count + $at_fail_count` -at_total_fail_count=`expr $at_xfail_count + $at_fail_count` - -echo -cat <<\_ASBOX -## ------------- ## -## Test results. ## -## ------------- ## -_ASBOX -echo -{ - echo - cat <<\_ASBOX -## ------------- ## -## Test results. ## -## ------------- ## -_ASBOX - echo -} >&5 - -if test $at_run_count = 1; then - at_result="1 test" - at_were=was -else - at_result="$at_run_count tests" - at_were=were -fi -if $at_errexit_p && test $at_unexpected_count != 0; then - if test $at_xpass_count = 1; then - at_result="$at_result $at_were run, one passed" - else - at_result="$at_result $at_were run, one failed" - fi - at_result="$at_result unexpectedly and inhibited subsequent tests." -else - # Don't you just love exponential explosion of the number of cases? - case $at_xpass_count:$at_fail_count:$at_xfail_count in - # So far, so good. - 0:0:0) at_result="$at_result $at_were successful." ;; - 0:0:*) at_result="$at_result behaved as expected." ;; - - # Some unexpected failures - 0:*:0) at_result="$at_result $at_were run, -$at_fail_count failed unexpectedly." ;; - - # Some failures, both expected and unexpected - 0:*:1) at_result="$at_result $at_were run, -$at_total_fail_count failed ($at_xfail_count expected failure)." ;; - 0:*:*) at_result="$at_result $at_were run, -$at_total_fail_count failed ($at_xfail_count expected failures)." ;; - - # No unexpected failures, but some xpasses - *:0:*) at_result="$at_result $at_were run, -$at_xpass_count passed unexpectedly." ;; - - # No expected failures, but failures and xpasses - *:1:0) at_result="$at_result $at_were run, -$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; - *:*:0) at_result="$at_result $at_were run, -$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; - - # All of them. - *:*:1) at_result="$at_result $at_were run, -$at_xpass_count passed unexpectedly, -$at_total_fail_count failed ($at_xfail_count expected failure)." ;; - *:*:*) at_result="$at_result $at_were run, -$at_xpass_count passed unexpectedly, -$at_total_fail_count failed ($at_xfail_count expected failures)." ;; - esac - - if test $at_skip_count = 0 && test $at_run_count -gt 1; then - at_result="All $at_result" - fi -fi - -# Now put skips in the mix. -case $at_skip_count in - 0) ;; - 1) at_result="$at_result -1 test was skipped." ;; - *) at_result="$at_result -$at_skip_count tests were skipped." ;; -esac - -if test $at_unexpected_count = 0; then - echo "$at_result" - echo "$at_result" >&5 -else - echo "ERROR: $at_result" >&2 - echo "ERROR: $at_result" >&5 - { - echo - cat <<\_ASBOX -## ------------------------ ## -## Summary of the failures. ## -## ------------------------ ## -_ASBOX - - # Summary of failed and skipped tests. - if test $at_fail_count != 0; then - echo "Failed tests:" - $SHELL "$0" $at_fail_list --list - echo - fi - if test $at_skip_count != 0; then - echo "Skipped tests:" - $SHELL "$0" $at_skip_list --list - echo - fi - if test $at_xpass_count != 0; then - echo "Unexpected passes:" - $SHELL "$0" $at_xpass_list --list - echo - fi - if test $at_fail_count != 0; then - cat <<\_ASBOX -## ---------------------- ## -## Detailed failed tests. ## -## ---------------------- ## -_ASBOX - echo - for at_group in $at_fail_list - do - at_group_normalized=$at_group - - while :; do - case $at_group_normalized in #( - $at_format*) break;; - esac - at_group_normalized=0$at_group_normalized - done - - cat "$at_suite_dir/$at_group_normalized/$as_me.log" - echo - done - echo - fi - if test -n "$at_top_srcdir"; then - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## ${at_top_build_prefix}config.log ## -_ASBOX - sed 's/^/| /' ${at_top_build_prefix}config.log - echo - fi - } >&5 - - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## $as_me.log was created. ## -_ASBOX - - echo - echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:" - echo - echo " To: " - echo " Subject: [Automated Testing Framework 0.5] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}" - echo - if test $at_debug_p = false; then - echo - echo 'You may investigate any problem if you feel able to do so, in which' - echo 'case the test suite provides a good starting point. Its output may' - echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'." - echo - fi - exit 1 -fi - -exit 0 - - - diff --git a/dist/atf/tests/bootstrap/testsuite.at b/dist/atf/tests/bootstrap/testsuite.at deleted file mode 100644 index abc8019376cf..000000000000 --- a/dist/atf/tests/bootstrap/testsuite.at +++ /dev/null @@ -1,73 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007, 2008 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 - -AT_INIT([bootstrap tests]) - -m4_define([GUESS_TOPDIR], { - old=$(pwd) - while test $(pwd) != '/' -a ! -e ./Makefile; do - cd .. - done - topdir=$(pwd) - cd ${old} - echo ${topdir} -}) - -m4_define([APP_HELPER], [$(GUESS_TOPDIR)/tests/bootstrap/h_$1]) - -m4_define([TEST_HELPER_NO_S], [$(GUESS_TOPDIR)/tests/bootstrap/h_$1]) - -m4_define([TEST_HELPER], [$(GUESS_TOPDIR)/tests/bootstrap/h_$1 \ - -s $(GUESS_TOPDIR)/tests/bootstrap]) - -m4_define(COUNT_IN_LINES, - [test @S|@[($1 | wc -l | awk '{ print @S|@1 }')] = $2]) - -m4_define(COUNT_LINES, [test @S|@[(wc -l $1 | awk '{ print @S|@1 }')] = $2]) - -m4_define(CHECK_TCS_TCR, - [AT_CHECK([grep '^tc-end: $1, $2' $3], [0], [ignore], [])]) - -m4_define(CHECK_TPS_TCR, - [AT_CHECK([grep '^tc-end: $1, $2' $3], [0], [ignore], [])]) - -dnl The tests below are sorted depending on how important they are. -m4_include(tests/bootstrap/t_application_opts_args.at) -m4_include(tests/bootstrap/t_application_help.at) -m4_include(tests/bootstrap/t_test_program_filter.at) -m4_include(tests/bootstrap/t_test_program_run.at) -m4_include(tests/bootstrap/t_test_program_list.at) -m4_include(tests/bootstrap/t_atf_format.at) -m4_include(tests/bootstrap/t_atf_config.at) -m4_include(tests/bootstrap/t_atf_run.at) -dnl TODO m4_include(tests/bootstrap/t_atf_compile.at) -m4_include(tests/bootstrap/t_test_program_compare.at) -m4_include(tests/bootstrap/t_subr_atf_check.at) - -dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tests/build/atf-c++/t_include_application_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_application_hpp.cpp deleted file mode 100644 index ba44800a77da..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_application_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_atffile_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_atffile_hpp.cpp deleted file mode 100644 index fad1cd204135..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_atffile_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_config_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_config_hpp.cpp deleted file mode 100644 index d249392bbfe5..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_config_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_env_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_env_hpp.cpp deleted file mode 100644 index 6f7eabe7fc9f..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_env_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_exceptions_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_exceptions_hpp.cpp deleted file mode 100644 index 2a9a11f3b7ec..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_exceptions_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_expand_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_expand_hpp.cpp deleted file mode 100644 index 638dafa068ff..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_expand_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_formats_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_formats_hpp.cpp deleted file mode 100644 index 041667b333c9..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_formats_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_fs_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_fs_hpp.cpp deleted file mode 100644 index e8a8fdf8a2f7..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_fs_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_io_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_io_hpp.cpp deleted file mode 100644 index 286c984a4533..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_io_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_macros_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_macros_hpp.cpp deleted file mode 100644 index fd2c22d5fc92..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_macros_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_parser_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_parser_hpp.cpp deleted file mode 100644 index 25668e9ef4cd..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_parser_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_sanity_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_sanity_hpp.cpp deleted file mode 100644 index 039474bb80fa..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_sanity_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_signals_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_signals_hpp.cpp deleted file mode 100644 index 8adc0ce7217d..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_signals_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_tests_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_tests_hpp.cpp deleted file mode 100644 index 5bb59f798fd5..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_tests_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_text_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_text_hpp.cpp deleted file mode 100644 index 142c9166767e..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_text_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_ui_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_ui_hpp.cpp deleted file mode 100644 index 1ef8820bf7f3..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_ui_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_user_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_user_hpp.cpp deleted file mode 100644 index 0e1c35d5583e..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_user_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_include_utils_hpp.cpp b/dist/atf/tests/build/atf-c++/t_include_utils_hpp.cpp deleted file mode 100644 index 601210e24096..000000000000 --- a/dist/atf/tests/build/atf-c++/t_include_utils_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c++/t_use_macros_hpp.cpp b/dist/atf/tests/build/atf-c++/t_use_macros_hpp.cpp deleted file mode 100644 index 4ff42eb5f3af..000000000000 --- a/dist/atf/tests/build/atf-c++/t_use_macros_hpp.cpp +++ /dev/null @@ -1,80 +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 - -void -atf_check_inside_if(void) -{ - // Make sure that ATF_CHECK can be used inside an if statement that - // does not have braces. Earlier versions of it generated an error - // if there was an else clause because they confused the compiler - // by defining an unprotected nested if. - if (true) - ATF_CHECK(true); - else - ATF_CHECK(true); -} - -void -atf_check_equal_inside_if(void) -{ - // Make sure that ATF_CHECK_EQUAL can be used inside an if statement - // that does not have braces. Earlier versions of it generated an - // error if there was an else clause because they confused the - // compiler by defining an unprotected nested if. - if (true) - ATF_CHECK_EQUAL(true, true); - else - ATF_CHECK_EQUAL(true, true); -} - -void -atf_check_throw_runtime_error(void) -{ - // Check that we can pass std::runtime_error to ATF_CHECK_THROW. - // Earlier versions generated a warning because the macro's code also - // attempted to capture this exception, and thus we had a duplicate - // catch clause. - ATF_CHECK_THROW((void)0, std::runtime_error); -} - -void -atf_check_throw_inside_if(void) -{ - // Make sure that ATF_CHECK_THROW can be used inside an if statement - // that does not have braces. Earlier versions of it generated an - // error because a trailing ; after a catch block was not allowed. - if (true) - ATF_CHECK_THROW((void)0, std::runtime_error); - else - ATF_CHECK_THROW((void)1, std::runtime_error); -} diff --git a/dist/atf/tests/build/atf-c/t_include_config_h.c b/dist/atf/tests/build/atf-c/t_include_config_h.c deleted file mode 100644 index e8326fd35a03..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_config_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_dynstr_h.c b/dist/atf/tests/build/atf-c/t_include_dynstr_h.c deleted file mode 100644 index d202fa072bfc..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_dynstr_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_env_h.c b/dist/atf/tests/build/atf-c/t_include_env_h.c deleted file mode 100644 index 0a5e325c6945..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_env_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_error_h.c b/dist/atf/tests/build/atf-c/t_include_error_h.c deleted file mode 100644 index 6cf06a0f3e21..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_error_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_expand_h.c b/dist/atf/tests/build/atf-c/t_include_expand_h.c deleted file mode 100644 index 56884ca78244..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_expand_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_fs_h.c b/dist/atf/tests/build/atf-c/t_include_fs_h.c deleted file mode 100644 index 4c523751a40c..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_fs_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_io_h.c b/dist/atf/tests/build/atf-c/t_include_io_h.c deleted file mode 100644 index 0b1aaf8bb4fd..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_io_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_list_h.c b/dist/atf/tests/build/atf-c/t_include_list_h.c deleted file mode 100644 index a53c6dff1e9b..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_list_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_macros_h.c b/dist/atf/tests/build/atf-c/t_include_macros_h.c deleted file mode 100644 index 936b8b4b21b8..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_macros_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_map_h.c b/dist/atf/tests/build/atf-c/t_include_map_h.c deleted file mode 100644 index e6a1de336952..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_map_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_object_h.c b/dist/atf/tests/build/atf-c/t_include_object_h.c deleted file mode 100644 index ba9fb489d614..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_object_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_sanity_h.c b/dist/atf/tests/build/atf-c/t_include_sanity_h.c deleted file mode 100644 index 4881e1bc383e..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_sanity_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_signals_h.c b/dist/atf/tests/build/atf-c/t_include_signals_h.c deleted file mode 100644 index 526a4284e429..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_signals_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_tc_h.c b/dist/atf/tests/build/atf-c/t_include_tc_h.c deleted file mode 100644 index f5e56d1e7e96..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_tc_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_tcr_h.c b/dist/atf/tests/build/atf-c/t_include_tcr_h.c deleted file mode 100644 index e47da20371c4..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_tcr_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_text_h.c b/dist/atf/tests/build/atf-c/t_include_text_h.c deleted file mode 100644 index 54460f1b4ac0..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_text_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_tp_h.c b/dist/atf/tests/build/atf-c/t_include_tp_h.c deleted file mode 100644 index d8135d1edf3a..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_tp_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_include_ui_h.c b/dist/atf/tests/build/atf-c/t_include_ui_h.c deleted file mode 100644 index 767730b86b66..000000000000 --- a/dist/atf/tests/build/atf-c/t_include_ui_h.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/atf-c/t_use_macros_h.c b/dist/atf/tests/build/atf-c/t_use_macros_h.c deleted file mode 100644 index 8050aae787db..000000000000 --- a/dist/atf/tests/build/atf-c/t_use_macros_h.c +++ /dev/null @@ -1,59 +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 - -void atf_check_inside_if(void); -void atf_check_equal_inside_if(void); - -void -atf_check_inside_if(void) -{ - /* Make sure that ATF_CHECK can be used inside an if statement that - * does not have braces. Earlier versions of it generated an error - * if there was an else clause because they confused the compiler - * by defining an unprotected nested if. */ - if (true) - ATF_CHECK(true); - else - ATF_CHECK(true); -} - -void -atf_check_equal_inside_if(void) -{ - /* Make sure that ATF_CHECK_EQUAL can be used inside an if statement - * that does not have braces. Earlier versions of it generated an - * error if there was an else clause because they confused the - * compiler by defining an unprotected nested if. */ - if (true) - ATF_CHECK_EQUAL(true, true); - else - ATF_CHECK_EQUAL(true, true); -} diff --git a/dist/atf/tests/build/t_include_atf_c++_hpp.cpp b/dist/atf/tests/build/t_include_atf_c++_hpp.cpp deleted file mode 100644 index ca0d4bf700bb..000000000000 --- a/dist/atf/tests/build/t_include_atf_c++_hpp.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tests/build/t_include_atf_c_h.cpp b/dist/atf/tests/build/t_include_atf_c_h.cpp deleted file mode 100644 index dde183b30181..000000000000 --- a/dist/atf/tests/build/t_include_atf_c_h.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/dist/atf/tools/atf-cleanup.1 b/dist/atf/tools/atf-cleanup.1 deleted file mode 100644 index 844be237808e..000000000000 --- a/dist/atf/tools/atf-cleanup.1 +++ /dev/null @@ -1,69 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd August 18, 2007 -.Dt ATF-CLEANUP 1 -.Os -.Sh NAME -.Nm atf-cleanup -.Nd safe removal of directory hierarchies -.Sh SYNOPSIS -.Nm -.Ar path1 -.Op Ar .. pathN -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -is a utility that removes files and directories recursively, but doing -it in a safe manner to avoid crossing mount point boundaries. -Before the removal of a given tree, -.Nm -will look for file systems mounted anywhere inside it and try to unmount -them. -If all mount points were properly unmounted, it later proceeds to do the -real removal. -This tool is used internally by test programs to clean up the test cases' -work directories, as they may have left other file systems mounted inside -them. -.Pp -In the first synopsis form, -.Nm -proceeds to scan and remove all the given files or directories. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width flag -.It Fl h -Shows a short summary of all available options and their purpose. -.El -.Sh SEE ALSO -.Xr atf 7 diff --git a/dist/atf/tools/atf-cleanup.cpp b/dist/atf/tools/atf-cleanup.cpp deleted file mode 100644 index eb70d6c09a3e..000000000000 --- a/dist/atf/tools/atf-cleanup.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/application.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/ui.hpp" - -class atf_cleanup : public atf::application::app { - static const char* m_description; - - std::string specific_args(void) const; - -public: - atf_cleanup(void); - - int main(void); -}; - -const char* atf_cleanup::m_description = - "atf-cleanup recursively removes a test case's work directory, " - "unmounting any file systems it may contain and preventing to " - "recurse into them if the unmounting fails."; - -atf_cleanup::atf_cleanup(void) : - app(m_description, "atf-cleanup(1)", "atf(7)") -{ -} - -std::string -atf_cleanup::specific_args(void) - const -{ - return "[path1 [.. pathN]]"; -} - -int -atf_cleanup::main(void) -{ - for (int i = 0; i < m_argc; i++) - atf::fs::cleanup(atf::fs::path(m_argv[i])); - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_cleanup().run(argc, argv); -} diff --git a/dist/atf/tools/atf-compile.1 b/dist/atf/tools/atf-compile.1 deleted file mode 100644 index d6a295f5909d..000000000000 --- a/dist/atf/tools/atf-compile.1 +++ /dev/null @@ -1,69 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd October 5, 2007 -.Dt ATF-COMPILE 1 -.Os -.Sh NAME -.Nm atf-compile -.Nd generates POSIX shell test programs -.Sh SYNOPSIS -.Nm -.Fl o Ar out-file -.Ar src1 -.Op Ar .. srcN -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -generates a POSIX shell program based on a set of input files that -implement test cases in this language. -All the given source files are concatenated in order, and the tool -prepends and appends to the results the necessary boilerplate to -implement a test program directly runnable by the user. -.Pp -In the first synopsis form, -.Nm -will generate the -.Ar out-file -test program by adding the source files to it as well as all the necessary -helper code to turn it into an executable. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XoXoutXfileXX -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl o Ar out-file -Specifies the file to which the results will be written. -.El -.Sh SEE ALSO -.Xr atf 7 diff --git a/dist/atf/tools/atf-compile.cpp b/dist/atf/tools/atf-compile.cpp deleted file mode 100644 index f37605dc4a29..000000000000 --- a/dist/atf/tools/atf-compile.cpp +++ /dev/null @@ -1,160 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/application.hpp" -#include "atf-c++/config.hpp" -#include "atf-c++/sanity.hpp" - -static -void -cat_file(std::ostream& os, const std::string& path) -{ - std::ifstream is(path.c_str()); - if (!is) - throw std::runtime_error("Cannot open " + path); - std::string line; - while (std::getline(is, line)) - os << line << std::endl; - is.close(); -} - -class atf_compile : public atf::application::app { - static const char* m_description; - - std::string m_outfile; - - std::string specific_args(void) const; - options_set specific_options(void) const; - void process_option(int ch, const char*); - - void compile(std::ostream&); - -public: - atf_compile(void); - - int main(void); -}; - -const char* atf_compile::m_description = - "atf-compile is a tool that ``compiles'' test cases written in the " - "POSIX shell language, generating an executable."; - -atf_compile::atf_compile(void) : - app(m_description, "atf-compile(1)", "atf(7)") -{ -} - -std::string -atf_compile::specific_args(void) - const -{ - return ""; -} - -atf_compile::options_set -atf_compile::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('o', "out-file", "Name of the output file")); - return opts; -} - -void -atf_compile::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'o': - m_outfile = arg; - break; - - default: - UNREACHABLE; - } -} - -void -atf_compile::compile(std::ostream& os) -{ - os << "#! " << atf::config::get("atf_shell") << std::endl; - cat_file(os, atf::config::get("atf_pkgdatadir") + "/atf.init.subr"); - os << std::endl; - os << ". ${Atf_Pkgdatadir}/atf.header.subr" << std::endl; - os << std::endl; - for (int i = 0; i < m_argc; i++) { - cat_file(os, m_argv[i]); - os << std::endl; - } - os << ". ${Atf_Pkgdatadir}/atf.footer.subr" << std::endl; - os << std::endl; - os << "main \"${@}\"" << std::endl; -} - -int -atf_compile::main(void) -{ - if (m_argc < 1) - throw atf::application::usage_error("No test program specified"); - - if (m_outfile.empty()) - throw atf::application::usage_error("No output file specified"); - - std::ofstream os(m_outfile.c_str()); - if (!os) - throw std::runtime_error("Cannot open output file `" + - m_outfile + "'"); - compile(os); - os.close(); - - mode_t umask = ::umask(S_IRWXU | S_IRWXG | S_IRWXO); - ::umask(umask); - - if (::chmod(m_outfile.c_str(), - (S_IRWXU | S_IRWXG | S_IRWXO) & ~umask) == -1) - throw std::runtime_error("Cannot set executable permissions " - "on `" + m_outfile + "'"); - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_compile().run(argc, argv); -} diff --git a/dist/atf/tools/atf-config.1 b/dist/atf/tools/atf-config.1 deleted file mode 100644 index 2618c9b07710..000000000000 --- a/dist/atf/tools/atf-config.1 +++ /dev/null @@ -1,137 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd January 4, 2008 -.Dt ATF-CONFIG 1 -.Os -.Sh NAME -.Nm atf-config -.Nd queries static configuration information of ATF -.Sh SYNOPSIS -.Nm -.Op Fl t -.Op Ar var1 Op Ar .. varN -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -is a utility that queries static configuration information of ATF. -Static configuration refers to all those values for settings that -were built into the ATF binaries at build time. -.Pp -In the first synopsis form, -.Nm -will print variable-value pairs for all built-in static variables if -no variable names are provided as arguments. -If any is provided, it will only print the variable-value pairs for -those variables. -The output of the utility does not use the -.Sq = -symbol to separate the variable name from its corresponding value in -an attempt to avoid sourcing the output in shell scripts or Makefiles. -If you need to do that, the -.Fl t -flag allows you to query the value of individual variables without any -surrounding text. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width flag -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl t -Changes the output of the utility to show the variable values, one -per line, without the variable names. -.El -.Ss Static configuration variables -The following list describes all the variables that are part of ATF's -static configuration: -.Bl -tag -width atfXpkgdatadirXX -.It Va atf_arch -The architecture name detected by ATF. -This is derived from -.Va atf_machine -because it is a subset of it. -Given that this name might be misdetected, it is provided to the user -as a configuration variable so that he can fix its value temporarily -until a real fix is incorporated into mainstream sources. -.It Va atf_confdir -The path to the directory that contains the system-wide configuration -files for ATF. -.It Va atf_libexecdir -The path to the directory that contains the auxiliary utilities of ATF, -used internally by the public tools. -.It Va atf_machine -The machine type name detected by ATF. -This should not be tunable but is provided for symmetry with -.Va atf_arch . -.It Va atf_pkgdatadir -The path to the directory that contains the files that form the ATF's -shell-scripting library. -.It Va atf_shell -The path to the shell interpreter that will be used by ATF. -.It Va atf_workdir -The path to the temporary directory that the utilities and the test -programs will use to store temporary files in. -.El -.Sh ENVIRONMENT -Every variable that is part of the static configuration can be -overridden at run-time by defining an environment variable. -This environment variable has the exact same name as the one shown by -.Nm -except that the name is all composed of uppercase letters. -.Pp -The recognized environment variables are: -.Bl -tag -width ATFXPKGDATADIRXX -.It Ev ATF_ARCH -Overrides the built-in value of -.Va atf_arch . -.It Ev ATF_CONFDIR -Overrides the built-in value of -.Va atf_confdir . -.It Ev ATF_LIBEXECDIR -Overrides the built-in value of -.Va atf_libexecdir . -.It Ev ATF_MACHINE -Overrides the built-in value of -.Va atf_machine . -.It Ev ATF_PKGDATADIR -Overrides the built-in value of -.Va atf_pkgdatadir . -.It Ev ATF_SHELL -Overrides the built-in value of -.Va atf_shell . -.It Ev ATF_WORKDIR -Overrides the built-in value of -.Va atf_workdir . -.El -.Sh SEE ALSO -.Xr atf 7 diff --git a/dist/atf/tools/atf-config.cpp b/dist/atf/tools/atf-config.cpp deleted file mode 100644 index c120c4902977..000000000000 --- a/dist/atf/tools/atf-config.cpp +++ /dev/null @@ -1,141 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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++/application.hpp" -#include "atf-c++/config.hpp" -#include "atf-c++/sanity.hpp" - -class atf_config : public atf::application::app { - static const char* m_description; - - bool m_tflag; - - void process_option(int, const char*); - std::string specific_args(void) const; - options_set specific_options(void) const; - - std::string format_var(const std::string&, const std::string&); - -public: - atf_config(void); - - int main(void); -}; - -const char* atf_config::m_description = - "atf-config is a tool that queries the value of several " - "installation-specific configuration values of the atf. " - "It can be used by external tools to discover where specific " - "internal atf files are installed."; - -atf_config::atf_config(void) : - app(m_description, "atf-config(1)", "atf(7)"), - m_tflag(false) -{ -} - -void -atf_config::process_option(int ch, const char* arg) -{ - switch (ch) { - case 't': - m_tflag = true; - break; - - default: - UNREACHABLE; - } -} - -std::string -atf_config::specific_args(void) - const -{ - return "[var1 [.. varN]]"; -} - -atf_config::options_set -atf_config::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('t', "", "Terse output: show values only")); - return opts; -} - -std::string -atf_config::format_var(const std::string& name, const std::string& val) -{ - std::string str; - - if (m_tflag) - str = val; - else - str = name + " : " + val; - - return str; -} - -int -atf_config::main(void) -{ - if (m_argc < 1) { - std::map< std::string, std::string > cv = atf::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) - << std::endl; - } else { - for (int i = 0; i < m_argc; i++) { - if (!atf::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::endl; - } - } - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_config().run(argc, argv); -} diff --git a/dist/atf/tools/atf-exec.1 b/dist/atf/tools/atf-exec.1 deleted file mode 100644 index 3d47bc7f0b7a..000000000000 --- a/dist/atf/tools/atf-exec.1 +++ /dev/null @@ -1,69 +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. -.\" -.Dd January 25, 2008 -.Dt ATF-EXEC 1 -.Os -.Sh NAME -.Nm atf-exec -.Nd executes a command after modifying settings in its container process -.Sh SYNOPSIS -.Nm -.Fl g -.Ar command -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -is a wrapper that executes the given command after doing some additional -tasks. -These tasks involve modifying the properties of the process that will run -the command that cannot be changed with regular system tools. -.Pp -In the first synopsis form, -.Nm -will execute the provided command after applying the changes requested by -the options to its environment. -If no additional options are given, the command is executed as if -.Nm -had not been used. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XgXX -.It Fl g -Configures the process to become a new process group leader. -.It Fl h -Shows a short summary of all available options and their purpose. -.El -.Sh SEE ALSO -.Xr atf-killpg 1 , -.Xr atf 7 diff --git a/dist/atf/tools/atf-exec.cpp b/dist/atf/tools/atf-exec.cpp deleted file mode 100644 index 752dabd7f667..000000000000 --- a/dist/atf/tools/atf-exec.cpp +++ /dev/null @@ -1,144 +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. -// - -extern "C" { -#include -#include -#include -#include -} - -#include -#include -#include -#include - -#include "atf-c++/application.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/text.hpp" - -class atf_exec : public atf::application::app { - static const char* m_description; - - std::string specific_args(void) const; - options_set specific_options(void) const; - void process_option(int, const char*); - - bool m_pgid; - -public: - atf_exec(void); - - int main(void); -}; - -const char* atf_exec::m_description = - "atf-exec executes the given command after modifying its environment " - "in different ways."; - -atf_exec::atf_exec(void) : - app(m_description, "atf-exec(1)", "atf(7)"), - m_pgid(false) -{ -} - -std::string -atf_exec::specific_args(void) - const -{ - return ""; -} - -atf_exec::options_set -atf_exec::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('g', "", "Creates a new process group under which " - "to run the command")); - return opts; -} - -void -atf_exec::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'g': - m_pgid = true; - break; - - default: - UNREACHABLE; - } -} - -int -atf_exec::main(void) -{ - if (m_argc < 1) - throw atf::application::usage_error("No command specified"); - - if (m_pgid) { - if (::setpgid(::getpid(), 0) == -1) - throw atf::system_error("main", "setpgid failed", errno); - } - - int exitcode = EXIT_FAILURE; - - pid_t pid = ::fork(); - if (pid == 0) { - char** argv = new char*[m_argc + 1]; - for (int i = 0; i < m_argc; i++) - argv[i] = ::strdup(m_argv[i]); - argv[m_argc] = NULL; - - ::execvp(m_argv[0], argv); - return EXIT_FAILURE; - } else { - int status; - if (::waitpid(pid, &status, 0) != pid) - throw atf::system_error("main", "waitpid failed", errno); - if (WIFEXITED(status)) - exitcode = WEXITSTATUS(status); - else if (WIFSIGNALED(status)) - ::kill(0, WTERMSIG(status)); - else - UNREACHABLE; - } - - return exitcode; -} - -int -main(int argc, char* const* argv) -{ - return atf_exec().run(argc, argv); -} diff --git a/dist/atf/tools/atf-format.1 b/dist/atf/tools/atf-format.1 deleted file mode 100644 index 696b49d0cb72..000000000000 --- a/dist/atf/tools/atf-format.1 +++ /dev/null @@ -1,90 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd August 18, 2007 -.Dt ATF-FORMAT 1 -.Os -.Sh NAME -.Nm atf-format -.Nd formats a text paragraph to fit nicely on screen -.Sh SYNOPSIS -.Nm -.Op Ar str1 Op Ar .. strN -.Nm -.Fl t Ar tag -.Op Fl l Ar length -.Op Fl r -.Op Ar str1 Op Ar .. strN -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -formats text messages to not overflow the terminal's width, and optionally -adds a prefix string to them. -Messages can be fed through the standard input or through multiple -arguments; in the latter case, all of them are concatenated as if they were -separated by a single space. -Different lines (those separated by a new-line character) are treated as -different paragraphs and thus formatted accordingly. -.Pp -In the first synopsis form, -.Nm -formats the message to not overflow the terminal's width. -The message is supposed to start at column 0. -.Pp -In the second synopsis form, -.Nm -also formats the message to not overflow the terminal's width, but it -appends a tag to the beginning of the string. -This tag may or may be not repeated on each line of the text; if it is -not repeated, the text is simply indented. -This synopsis form is useful to easily format two-column tables, being the -first one much shorter than the second one. -The message is supposed to start at column 0. -.Pp -In the third synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XlXlengthXX -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl l Ar length -Specifies the length in characters of te tag. -Useful if the tag is shorter than the desired length, which happens when -formatting two-column tables. -.It Fl r -Repeat the tag on each line. -Otherwise it is only shown on the first one, and all others are indented -appropriately using whitespace. -.It Fl t Ar tag -Specifies the tag to use -.El -.Sh SEE ALSO -.Xr atf 7 diff --git a/dist/atf/tools/atf-format.cpp b/dist/atf/tools/atf-format.cpp deleted file mode 100644 index 923534c94362..000000000000 --- a/dist/atf/tools/atf-format.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 "atf-c++/application.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/ui.hpp" - -class atf_format : public atf::application::app { - static const char* m_description; - - size_t m_length; - std::string m_tag; - bool m_repeat; - - void process_option(int, const char*); - std::string specific_args(void) const; - options_set specific_options(void) const; - -public: - atf_format(void); - - int main(void); -}; - -const char* atf_format::m_description = - "atf-format is a tool that formats text messages to fit inside " - "the terminal's size. Messages can be fed either through the " - "standard input or as arguments to the program. Each independent " - "line is treated as a different paragraph."; - -atf_format::atf_format(void) : - app(m_description, "atf-format(1)", "atf(7)"), - m_length(0), - m_repeat(false) -{ -} - -void -atf_format::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'l': - { - std::istringstream ss(arg); - ss >> m_length; - if (m_length < m_tag.length()) - throw std::runtime_error("Length must be greater than " - "tag's length"); - } - break; - - case 'r': - m_repeat = true; - break; - - case 't': - m_tag = arg; - if (m_length < m_tag.length()) - m_length = m_tag.length(); - break; - - default: - UNREACHABLE; - } -} - -std::string -atf_format::specific_args(void) - const -{ - return "[str1 [.. strN]]"; -} - -atf_format::options_set -atf_format::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('l', "length", "Tag length")); - opts.insert(option('r', "", "Repeat tag on each line")); - opts.insert(option('t', "tag", "Tag to use for printing")); - return opts; -} - -int -atf_format::main(void) -{ - std::string str; - - if (m_argc > 0) { - for (int i = 0; i < m_argc; i++) { - str += m_argv[i]; - if (i < m_argc - 1) - str += ' '; - } - str += '\n'; - } else { - std::string line; - while (std::getline(std::cin, line)) - str += line + '\n'; - } - - std::cout << atf::ui::format_text_with_tag(str, m_tag, m_repeat, m_length) - << std::endl; - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_format().run(argc, argv); -} diff --git a/dist/atf/tools/atf-host-compile.sh b/dist/atf/tools/atf-host-compile.sh deleted file mode 100644 index 63ded39c8e08..000000000000 --- a/dist/atf/tools/atf-host-compile.sh +++ /dev/null @@ -1,86 +0,0 @@ -#! __ATF_SHELL__ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -Prog_Name=${0##*/} -Atf_Pkgdatadir="__ATF_PKGDATADIR__" -Atf_Shell="__ATF_SHELL__" - -err() -{ - echo "${Prog_Name}: ${@}" 1>&2 - exit 1 -} - -usage() -{ - echo "${Prog_Name}: ${@}" 1>&2 - echo "Usage: ${Prog_Name} -o outfile srcfile" 1>&2 - exit 1 -} - -main() -{ - [ -f "${Atf_Pkgdatadir}/atf.init.subr" ] || \ - err "Could not find ${Atf_Pkgdatadir}/atf.init.subr" - - [ ${#} -ge 1 ] || usage "No -o option specified" - [ ${1} = '-o' ] || usage "No -o option specified" - [ ${#} -ge 2 ] || usage "No target file specified" - [ ${#} -ge 3 ] || usage "No source file specified" - - shift # Strip -o - tfile=${1}; shift - sfiles="${@}" - - for sfile in ${sfiles}; do - [ "${tfile}" != "${sfile}" ] || \ - err "Source file and target file must not be the same" - - [ -f "${sfile}" ] || err "Source file ${sfile} does not exist" - done - - echo "#! ${Atf_Shell}" >${tfile} - cat ${Atf_Pkgdatadir}/atf.init.subr >>${tfile} - echo >>${tfile} - echo '. ${Atf_Pkgdatadir}/atf.header.subr' >>${tfile} - echo >>${tfile} - cat ${sfiles} >>${tfile} - echo '. ${Atf_Pkgdatadir}/atf.footer.subr' >>${tfile} - echo >>${tfile} - echo "main \"\${@}\"" >>${tfile} - - chmod +x ${tfile} - - exit 0 -} - -main "${@}" - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tools/atf-killpg.1 b/dist/atf/tools/atf-killpg.1 deleted file mode 100644 index e9e1ab447429..000000000000 --- a/dist/atf/tools/atf-killpg.1 +++ /dev/null @@ -1,68 +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. -.\" -.Dd January 25, 2008 -.Dt ATF-KILLPG 1 -.Os -.Sh NAME -.Nm atf-killpg -.Nd sends a signal to a process group -.Sh SYNOPSIS -.Nm -.Op Fl s Ar signal -.Ar pgid -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -sends a signal to a process group. -.Pp -In the first synopsis form, -.Nm -will send the specified signal to the given process group. -If the signal is not provided through the -.Fl s -flag, -.Sq SIGTERM -will be send instead. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XsXsignalXX -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl s Ar signal -The numerical signal to send; defaults to -.Sq SIGTERM . -.El -.Sh SEE ALSO -.Xr atf-exec 1 , -.Xr atf 7 diff --git a/dist/atf/tools/atf-killpg.cpp b/dist/atf/tools/atf-killpg.cpp deleted file mode 100644 index 44fa96d6654f..000000000000 --- a/dist/atf/tools/atf-killpg.cpp +++ /dev/null @@ -1,116 +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. -// - -extern "C" { -#include -#include -} - -#include -#include -#include - -#include "atf-c++/application.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/text.hpp" - -class atf_killpg : public atf::application::app { - static const char* m_description; - - int m_signo; - - std::string specific_args(void) const; - options_set specific_options(void) const; - void process_option(int, const char*); - -public: - atf_killpg(void); - - int main(void); -}; - -const char* atf_killpg::m_description = - "atf-killpg sends a signal to a process group."; - -atf_killpg::atf_killpg(void) : - app(m_description, "atf-killpg(1)", "atf(7)"), - m_signo(SIGTERM) -{ -} - -std::string -atf_killpg::specific_args(void) - const -{ - return ""; -} - -atf_killpg::options_set -atf_killpg::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('s', "signal", - "The signal to send to processes (default SIGTERM)")); - return opts; -} - -void -atf_killpg::process_option(int ch, const char* arg) -{ - switch (ch) { - case 's': - m_signo = atf::text::to_type< int >(arg); - break; - - default: - UNREACHABLE; - } -} - -int -atf_killpg::main(void) -{ - if (m_argc < 1) - throw atf::application::usage_error("No PID specified"); - - pid_t pid = atf::text::to_type< pid_t >(m_argv[0]); - if (::killpg(pid, m_signo) == -1) - throw atf::system_error("main", "killpg failed", errno); - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_killpg().run(argc, argv); -} diff --git a/dist/atf/tools/atf-report.1 b/dist/atf/tools/atf-report.1 deleted file mode 100644 index 26a773f8eab9..000000000000 --- a/dist/atf/tools/atf-report.1 +++ /dev/null @@ -1,166 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd October 29, 2007 -.Dt ATF-REPORT 1 -.Os -.Sh NAME -.Nm atf-report -.Nd transforms the output of atf-run to different formats -.Sh SYNOPSIS -.Nm -.Op Fl o Ar fmt1:path1 Op .. Fl o Ar fmtN:pathN -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -reads the output of -.Nm atf-run -and transforms it to different formats. -Some of these are user-friendly and others are machine-parseable, which -opens a wide range of possibilities to analyze the results of a test -suite's execution. -See -.Sx Output formats -below for more details on which these formats are. -.Pp -In the first synopsis form, -.Nm -reads the output of -.Nm atf-run -through its standard input and, if no -.Fl o -options are given, prints a user-friendly report on its standard -output using the -.Sq ticker -format. -If -.Fl o -options are provided (more than one are allowed), they specify the complete -list of reports to generate. -They are all generated simulatneously, and for obvious reasons, two reports -cannot be written to the same file. -Note that the default output is suppressed when -.Fl o -is provided. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XoXfmtXpathXX -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl o Ar fmt:path -Adds a new output format. -.Ar fmt -is one of the formats described later on in -.Sx Output formats . -.Ar path -specifies where the report will be written to. -Depending on the chosen format, this may refer to a single file or to -a directory. -For those formats that write to a single file, specifying a -.Sq - -as the path will redirect the report to the standard output. -.El -.Ss Output formats -The following output formats are allowed: -.Bl -tag -width tickerXX -.It csv -A machine-parseable Comma-Separated Values (CSV) file. -This file contains the results for all test cases and test programs. -Test cases are logged using the following syntax: -.Bd -literal -offset indent -tc, test-program, test-case, result[, reason] -.Ed -.Pp -The -.Sq result -field for test cases is always one of -.Sq passed , -.Sq skipped -or -.Sq failed . -The last two are always followed by a reason. -.Pp -Test programs are logged with the following syntax: -.Bd -literal -offset indent -tp, test-program, result[, reason] -.Ed -.Pp -In this case, the -.Sq result -can be one of: -.Sq passed , -which denotes test programs that ran without any failure; -.Sq failed , -which refers to test programs in which one or more test cases failed; -or -.Sq bogus , -which mentions those test programs that failed to execute by some reason. -The reason file is only available in the last case. -.Pp -You should not rely on the order of the entries in the resulting output. -.It ticker -A user-friendly report that shows the progress of the test suite's -execution as it operates. -This type of report should always be redirected to a virtual terminal, -not a file, as it may use control sequences that will make the output -unreadable in regular files. -.It xml -A report contained in a single XML file. -Ideal for later processing with -.Xr xsltproc 1 -to generate nice HTML reports. -.El -.Sh EXAMPLES -The most simple way of running a test suite is to pipe the output of -.Nm atf-run -through -.Nm -without any additional flags. -This will use the default output format, which is suitable to most users: -.Bd -literal -offset indent -atf-run | atf-report -.Ed -.Pp -In some situations, it may be interesting to get a machine-parseable file -aside from the standard report. -This can be done as follows: -.Bd -literal -offset indent -atf-run | atf-report -o csv:testsuite.csv -o ticker:- -.Ed -.Pp -Or if the standard report is not desired, thus achieving completely silent -operation: -atf-run | atf-report -o csv:testsuite.csv -.Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf 7 diff --git a/dist/atf/tools/atf-report.cpp b/dist/atf/tools/atf-report.cpp deleted file mode 100644 index 78c0c7669506..000000000000 --- a/dist/atf/tools/atf-report.cpp +++ /dev/null @@ -1,654 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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 - -#include "atf-c++/application.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/formats.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/text.hpp" -#include "atf-c++/ui.hpp" - -typedef std::auto_ptr< std::ostream > ostream_ptr; - -ostream_ptr -open_outfile(const atf::fs::path& path) -{ - ostream_ptr osp; - if (path.str() == "-") - osp = ostream_ptr(new std::ofstream("/dev/stdout")); - else - osp = ostream_ptr(new std::ofstream(path.c_str())); - if (!(*osp)) - throw std::runtime_error("Could not create file " + path.str()); - return osp; -} - -// ------------------------------------------------------------------------ -// The "writer" interface. -// ------------------------------------------------------------------------ - -//! -//! \brief A base class that defines an output format. -//! -//! The writer base class defines a generic interface to output formats. -//! This is meant to be subclassed, and each subclass can redefine any -//! method to format the information as it wishes. -//! -//! This class is not tied to a output stream nor a file because, depending -//! on the output format, we will want to write to a single file or to -//! multiple ones. -//! -class writer { -public: - writer(void) {} - virtual ~writer(void) {} - - virtual void write_info(const std::string&, const std::string&) {} - virtual void write_ntps(size_t) {} - virtual void write_tp_start(const std::string&, size_t) {} - virtual void write_tp_end(const std::string&) {} - virtual void write_tc_start(const std::string&) {} - virtual void write_tc_stdout_line(const std::string&) {} - virtual void write_tc_stderr_line(const std::string&) {} - virtual void write_tc_end(const atf::tests::tcr&) {} - virtual void write_eof(void) {} -}; - -// ------------------------------------------------------------------------ -// The "csv_writer" class. -// ------------------------------------------------------------------------ - -//! -//! \brief A very simple plain-text output format. -//! -//! The csv_writer class implements a very simple plain-text output -//! format that summarizes the results of each executed test case. The -//! results are meant to be easily parseable by third-party tools, hence -//! they are formatted as a CSV file. -//! -class csv_writer : public writer { - ostream_ptr m_os; - bool m_failed; - - std::string m_tpname; - std::string m_tcname; - -public: - csv_writer(const atf::fs::path& p) : - m_os(open_outfile(p)) - { - } - - virtual - void - write_tp_start(const std::string& name, size_t ntcs) - { - m_tpname = name; - m_failed = false; - } - - virtual - void - write_tp_end(const std::string& reason) - { - if (!reason.empty()) - (*m_os) << "tp, " << m_tpname << ", bogus, " << reason - << std::endl; - else if (m_failed) - (*m_os) << "tp, " << m_tpname << ", failed" << std::endl; - else - (*m_os) << "tp, " << m_tpname << ", passed" << std::endl; - } - - virtual - void - write_tc_start(const std::string& name) - { - m_tcname = name; - } - - virtual - void - write_tc_end(const atf::tests::tcr& tcr) - { - std::string str = "tc, "; - if (tcr.get_state() == atf::tests::tcr::passed_state) { - str += m_tpname + ", " + m_tcname + ", passed"; - } else if (tcr.get_state() == atf::tests::tcr::failed_state) { - str += m_tpname + ", " + m_tcname + ", failed, " + - tcr.get_reason(); - m_failed = true; - } else if (tcr.get_state() == atf::tests::tcr::skipped_state) { - str += m_tpname + ", " + m_tcname + ", skipped, " + - tcr.get_reason(); - } else - UNREACHABLE; - (*m_os) << str << std::endl; - } -}; - -// ------------------------------------------------------------------------ -// The "ticker_writer" class. -// ------------------------------------------------------------------------ - -//! -//! \brief A console-friendly output format. -//! -//! The ticker_writer class implements a formatter that is user-friendly -//! in the sense that it shows the execution of test cases in an easy to -//! read format. It is not meant to be parseable and its format can -//! freely change across releases. -//! -class ticker_writer : public writer { - ostream_ptr m_os; - - size_t m_curtp, m_ntps; - size_t m_tcs_passed, m_tcs_failed, m_tcs_skipped; - std::string m_tcname, m_tpname; - std::vector< std::string > m_failed_tcs; - std::vector< std::string > m_failed_tps; - - void - write_info(const std::string& what, const std::string& val) - { - if (what == "tests.root") { - (*m_os) << "Tests root: " << val << std::endl - << std::endl; - } - } - - void - write_ntps(size_t ntps) - { - m_curtp = 1; - m_tcs_passed = 0; - m_tcs_failed = 0; - m_tcs_skipped = 0; - m_ntps = ntps; - } - - void - write_tp_start(const std::string& tp, size_t ntcs) - { - using atf::text::to_string; - using atf::ui::format_text; - - m_tpname = tp; - - (*m_os) << format_text(tp + " (" + to_string(m_curtp) + - "/" + to_string(m_ntps) + "): " + - to_string(ntcs) + " test cases") - << std::endl; - (*m_os).flush(); - } - - void - write_tp_end(const std::string& reason) - { - using atf::ui::format_text_with_tag; - - m_curtp++; - - if (!reason.empty()) { - (*m_os) << format_text_with_tag("BOGUS TEST PROGRAM: Cannot " - "trust its results because " - "of `" + reason + "'", - m_tpname + ": ", false) - << std::endl; - m_failed_tps.push_back(m_tpname); - } - (*m_os) << std::endl; - (*m_os).flush(); - - m_tpname.clear(); - } - - void - write_tc_start(const std::string& tcname) - { - m_tcname = tcname; - - (*m_os) << " " + tcname + ": "; - (*m_os).flush(); - } - - void - write_tc_end(const atf::tests::tcr& tcr) - { - std::string str; - - atf::tests::tcr::state s = tcr.get_state(); - if (s == atf::tests::tcr::passed_state) { - str = "Passed."; - m_tcs_passed++; - } else if (s == atf::tests::tcr::failed_state) { - str = "Failed: " + tcr.get_reason(); - m_tcs_failed++; - m_failed_tcs.push_back(m_tpname + ":" + m_tcname); - } else if (s == atf::tests::tcr::skipped_state) { - str = "Skipped: " + tcr.get_reason(); - m_tcs_skipped++; - } else - UNREACHABLE; - - // XXX Wrap text. format_text_with_tag does not currently allow - // to specify the current column, which is needed because we have - // already printed the tc's name. - (*m_os) << str << std::endl; - - m_tcname = ""; - } - - 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; - - if (!m_failed_tps.empty()) { - (*m_os) << format_text("Failed (bogus) test programs:") - << std::endl; - (*m_os) << format_text_with_tag(join(m_failed_tps, ", "), - " ", false) << std::endl - << std::endl; - } - - if (!m_failed_tcs.empty()) { - (*m_os) << format_text("Failed test cases:") << std::endl; - (*m_os) << format_text_with_tag(join(m_failed_tcs, ", "), - " ", false) << std::endl - << std::endl; - } - - (*m_os) << format_text("Summary for " + to_string(m_ntps) + - " test programs:") - << std::endl; - (*m_os) << format_text_with_tag(to_string(m_tcs_passed) + - " passed test cases.", - " ", false) - << std::endl; - (*m_os) << format_text_with_tag(to_string(m_tcs_failed) + - " failed test cases.", - " ", false) - << std::endl; - (*m_os) << format_text_with_tag(to_string(m_tcs_skipped) + - " skipped test cases.", - " ", false) - << std::endl; - } - -public: - ticker_writer(const atf::fs::path& p) : - m_os(open_outfile(p)) - { - } -}; - -// ------------------------------------------------------------------------ -// The "xml" class. -// ------------------------------------------------------------------------ - -//! -//! \brief A single-file XML output format. -//! -//! The xml_writer class implements a formatter that prints the results -//! of test cases in an XML format easily parseable later on by other -//! utilities. -//! -class xml_writer : public writer { - ostream_ptr m_os; - - size_t m_curtp, m_ntps; - size_t m_tcs_passed, m_tcs_failed, m_tcs_skipped; - std::string m_tcname, m_tpname; - std::vector< std::string > m_failed_tcs; - std::vector< std::string > m_failed_tps; - - static - std::string - attrval(const std::string& str) - { - return str; - } - - static - std::string - elemval(const std::string& str) - { - std::string ostr; - for (std::string::const_iterator iter = str.begin(); - iter != str.end(); iter++) { - switch (*iter) { - case '&': ostr += "&"; break; - case '<': ostr += "<"; break; - case '>': ostr += ">"; break; - default: ostr += *iter; - } - } - return ostr; - } - - void - write_info(const std::string& what, const std::string& val) - { - (*m_os) << "" << val << "" - << std::endl; - } - - void - write_tp_start(const std::string& tp, size_t ntcs) - { - (*m_os) << "" << std::endl; - } - - void - write_tp_end(const std::string& reason) - { - if (!reason.empty()) - (*m_os) << "" << elemval(reason) << "" - << std::endl; - (*m_os) << "" << std::endl; - } - - void - write_tc_start(const std::string& tcname) - { - (*m_os) << "" << std::endl; - } - - void - write_tc_stdout_line(const std::string& line) - { - (*m_os) << "" << elemval(line) << "" << std::endl; - } - - void - write_tc_stderr_line(const std::string& line) - { - (*m_os) << "" << elemval(line) << "" << std::endl; - } - - void - write_tc_end(const atf::tests::tcr& tcr) - { - std::string str; - - atf::tests::tcr::state s = tcr.get_state(); - if (s == atf::tests::tcr::passed_state) { - (*m_os) << "" << std::endl; - } else if (s == atf::tests::tcr::failed_state) { - (*m_os) << "" << elemval(tcr.get_reason()) - << "" << std::endl; - } else if (s == atf::tests::tcr::skipped_state) { - (*m_os) << "" << elemval(tcr.get_reason()) - << "" << std::endl; - } else - UNREACHABLE; - (*m_os) << "" << std::endl; - } - - void - write_eof(void) - { - (*m_os) << "" << std::endl; - } - -public: - xml_writer(const atf::fs::path& p) : - m_os(open_outfile(p)) - { - (*m_os) << "" << std::endl - << "" - << std::endl - << std::endl - << "" << std::endl; - } -}; - -// ------------------------------------------------------------------------ -// The "converter" class. -// ------------------------------------------------------------------------ - -//! -//! \brief A reader that redirects events to multiple writers. -//! -//! The converter class implements an atf_tps_reader that, for each event -//! raised by the parser, redirects it to multiple writers so that they -//! can reformat it according to their output rules. -//! -class converter : public atf::formats::atf_tps_reader { - typedef std::vector< writer* > outs_vector; - outs_vector m_outs; - - void - got_info(const std::string& what, const std::string& val) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_info(what, val); - } - - void - got_ntps(size_t ntps) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_ntps(ntps); - } - - void - got_tp_start(const std::string& tp, size_t ntcs) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_tp_start(tp, ntcs); - } - - void - got_tp_end(const std::string& reason) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_tp_end(reason); - } - - void - got_tc_start(const std::string& tcname) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_tc_start(tcname); - } - - void - got_tc_stdout_line(const std::string& line) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_tc_stdout_line(line); - } - - void - got_tc_stderr_line(const std::string& line) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_tc_stderr_line(line); - } - - void - got_tc_end(const atf::tests::tcr& tcr) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_tc_end(tcr); - } - - void - got_eof(void) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - (*iter)->write_eof(); - } - -public: - converter(std::istream& is) : - atf::formats::atf_tps_reader(is) - { - } - - ~converter(void) - { - for (outs_vector::iterator iter = m_outs.begin(); - iter != m_outs.end(); iter++) - delete *iter; - } - - void - add_output(const std::string& fmt, const atf::fs::path& p) - { - if (fmt == "csv") { - m_outs.push_back(new csv_writer(p)); - } else if (fmt == "ticker") { - m_outs.push_back(new ticker_writer(p)); - } else if (fmt == "xml") { - m_outs.push_back(new xml_writer(p)); - } else - throw std::runtime_error("Unknown format `" + fmt + "'"); - } -}; - -// ------------------------------------------------------------------------ -// The "atf_report" class. -// ------------------------------------------------------------------------ - -class atf_report : public atf::application::app { - static const char* m_description; - - typedef std::pair< std::string, atf::fs::path > fmt_path_pair; - std::vector< fmt_path_pair > m_oflags; - - void process_option(int, const char*); - options_set specific_options(void) const; - -public: - atf_report(void); - - int main(void); -}; - -const char* atf_report::m_description = - "atf-report is a tool that parses the output of atf-run and " - "generates user-friendly reports in multiple different formats."; - -atf_report::atf_report(void) : - app(m_description, "atf-report(1)", "atf(7)") -{ -} - -void -atf_report::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'o': - { - std::string str(arg); - std::string::size_type pos = str.find(':'); - if (pos == std::string::npos) - 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)); - m_oflags.push_back(fmt_path_pair(fmt, path)); - } - } - break; - - default: - UNREACHABLE; - } -} - -atf_report::options_set -atf_report::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('o', "fmt:path", "Adds a new output file; multiple " - "ones can be specified, and a - " - "path means stdout")); - return opts; -} - -int -atf_report::main(void) -{ - if (m_oflags.empty()) - m_oflags.push_back(fmt_path_pair("ticker", atf::fs::path("-"))); - - // Look for path duplicates. - std::set< atf::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("-"); - if (paths.find(p) != paths.end()) - throw std::runtime_error("The file `" + p.str() + "' was " - "specified more than once"); - paths.insert((*iter).second); - } - - // Generate the output files. - converter cnv(std::cin); - for (std::vector< fmt_path_pair >::const_iterator iter = m_oflags.begin(); - iter != m_oflags.end(); iter++) - cnv.add_output((*iter).first, (*iter).second); - cnv.read(); - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_report().run(argc, argv); -} diff --git a/dist/atf/tools/atf-run.1 b/dist/atf/tools/atf-run.1 deleted file mode 100644 index ace7f557f4ad..000000000000 --- a/dist/atf/tools/atf-run.1 +++ /dev/null @@ -1,191 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd September 25, 2007 -.Dt ATF-RUN 1 -.Os -.Sh NAME -.Nm atf-run -.Nd executes a collection of test programs -.Sh SYNOPSIS -.Nm -.Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN -.Op Ar test_program1 Op Ar .. test_programN -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -executes a collection of test programs or, in other words, a complete -test suite. -The results of each test program are collected by the tool, and are then -multiplexed into a single machine-parseable report; see -.Xr atf-formats 5 -for more details. -This report can later be transformed into many different and saner formats -using the -.Nm atf-report -tool. -.Pp -The list of test programs to execute is read from an -.Pa Atffile -present in the current directory. -This file describes the test suite stored in the directory it lives in, -which aside from the list of test programs also includes meta-data and -configuration variables. -.Pp -.Nm -is also in charge of reading the configuration files that tune the behavior -of each test program and passing down the necessary variables to them. -More details on how this is done are given in the -.Sx Configuration -section. -.Pp -In the first synopsis form, -.Nm -parses the -.Pa Atffile -in the current directory and runs all the test programs specified in it. -If any test program names are given as part of the command line, those are -the ones executed instead of the complete list. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Pp -The following options are available: -.Bl -tag -width XvXvarXvalueXX -.It Fl h -Shows a short summary of all available options and their purpose. -.It Fl v Ar var=value -Sets the configuration variable -.Ar var -to the given value -.Ar value . -.El -.Ss Configuration -.Nm -reads configuration data from multiple places. -After all of these places have been analyzed, a list of variable-value -pairs are passed to the test programs to be run. -.Pp -The following locations are scanned for configuration data, in order. -Items down the list override values defined above them: -.Bl -enum -.It -Configuration variables defined in the -.Pa Atffile . -.It -Configuration variables defined in the system-wide configuration file -shared among all test suites. -This lives in -.Pa ${ATF_CONFDIR}/common.conf . -.It -Configuration variables defined in the system-wide test-suite-specific -configuration file. -This lives in -.Pa ${ATF_CONFDIR}/.conf . -.It -Configuration variables defined in the user-specific configuration file -shared among all test suites. -This lives in -.Pa ${HOME}/.atf/common.conf . -.It -Configuration variables defined in the user-specific test-suite-specific -configuration file. -This lives in -.Pa ${HOME}/.atf/.conf . -.It -Configuration variables provided as part of the command line through the -.Fl v -option. -.El -.Pp -The value of -.Va ATF_CONFIG -in the above list determined as detailed in -.Xr atf-config 1 . -.Ss Hooks -.Nm Ns 's -internal behavior can be customized by the system administrator and the -user by means of hooks. -These hooks are written in the shell script language for simplicity and -are stored in the following files, which are read in the order provided -below: -.Bl -enum -.It -${ATF_CONFDIR}/atf-run.hooks -.It -${HOME}/.atf/atf-run.hooks -.El -.Pp -The following hooks are supported: -.Bl -tag -width infoXstartXhookXX -.It info_start_hook -Called before -.Nm -executes any test program. -The purpose of this hook is to write additional -.Sq info -stanzas to the top of the output report; these are defined by the -.Sq application/X-atf-tps format -described in -.Xr atf-formats 1 . -Always use the -.Sq atf_tps_writer_info -function to print these. -.Pp -This takes no parameters. -.It info_end_hook -Similar to -.Sq info_start_hook -but executed after all test programs have been run so that additional -.Sq info -stanzas can be added to the bottom of the output report. -.Pp -This takes no parameters. -.El -.Pp -All hooks are accompanied by a function named -.Sq default_ -that can be executed by them to invoke the default behavior built into -.Nm . -For example, in order to extend the default -.Sq info_start_hook -hook, we could write the following function: -.Bd -literal -offset indent -info_start_hook() -{ - default_info_start_hook "${@}" - - atf_tps_writer_info "uptime" "$(uptime)" -} -.Ed -.Sh SEE ALSO -.Xr atf-report 1 , -.Xr atf-test-program 1 , -.Xr atf 7 diff --git a/dist/atf/tools/atf-run.cpp b/dist/atf/tools/atf-run.cpp deleted file mode 100644 index 3f1da0b5f9a4..000000000000 --- a/dist/atf/tools/atf-run.cpp +++ /dev/null @@ -1,634 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -extern "C" { -#include -#include -#include -} - -#include -#include -#include -#include -#include -#include - -#include "atf-c++/application.hpp" -#include "atf-c++/atffile.hpp" -#include "atf-c++/config.hpp" -#include "atf-c++/env.hpp" -#include "atf-c++/exceptions.hpp" -#include "atf-c++/formats.hpp" -#include "atf-c++/fs.hpp" -#include "atf-c++/io.hpp" -#include "atf-c++/parser.hpp" -#include "atf-c++/sanity.hpp" -#include "atf-c++/tests.hpp" -#include "atf-c++/text.hpp" - -class config : public atf::formats::atf_config_reader { - atf::tests::vars_map m_vars; - - void - got_var(const std::string& var, const std::string& name) - { - m_vars[var] = name; - } - -public: - config(std::istream& is) : - atf::formats::atf_config_reader(is) - { - } - - const atf::tests::vars_map& - get_vars(void) - const - { - return m_vars; - } -}; - -class muxer : public atf::formats::atf_tcs_reader { - atf::fs::path m_tp; - atf::formats::atf_tps_writer m_writer; - - bool m_inited, m_finalized; - size_t m_ntcs; - std::string m_tcname; - - // Counters for the test cases run by the test program. - size_t m_passed, m_failed, m_skipped; - - void - got_ntcs(size_t ntcs) - { - m_writer.start_tp(m_tp.str(), ntcs); - m_inited = true; - if (ntcs == 0) - throw atf::formats::format_error("Bogus test program: reported " - "0 test cases"); - } - - void - got_tc_start(const std::string& tcname) - { - m_tcname = tcname; - m_writer.start_tc(tcname); - } - - void - got_tc_end(const atf::tests::tcr& tcr) - { - const atf::tests::tcr::state& s = tcr.get_state(); - if (s == atf::tests::tcr::passed_state) { - m_passed++; - } else if (s == atf::tests::tcr::skipped_state) { - m_skipped++; - } else if (s == atf::tests::tcr::failed_state) { - m_failed++; - } else - UNREACHABLE; - - m_writer.end_tc(tcr); - m_tcname = ""; - } - - void - got_stdout_line(const std::string& line) - { - m_writer.stdout_tc(line); - } - - void - got_stderr_line(const std::string& line) - { - m_writer.stderr_tc(line); - } - -public: - muxer(const atf::fs::path& tp, atf::formats::atf_tps_writer& w, - atf::io::pistream& is) : - atf::formats::atf_tcs_reader(is), - m_tp(tp), - m_writer(w), - m_inited(false), - m_finalized(false), - m_passed(0), - m_failed(0), - m_skipped(0) - { - } - - size_t - failed(void) - const - { - return m_failed; - } - - void - finalize(const std::string& reason = "") - { - PRE(!m_finalized); - - if (!m_inited) - m_writer.start_tp(m_tp.str(), 0); - if (!m_tcname.empty()) { - INV(!reason.empty()); - got_tc_end(atf::tests::tcr(atf::tests::tcr::failed_state, - "Bogus test program")); - } - - m_writer.end_tp(reason); - m_finalized = true; - } - - ~muxer(void) - { - // The following is incorrect because we cannot throw an exception - // from a destructor. Let's just hope that this never happens. - PRE(m_finalized); - } -}; - -template< class K, class V > -void -merge_maps(std::map< K, V >& dest, const std::map< K, V >& src) -{ - for (typename std::map< K, V >::const_iterator iter = src.begin(); - iter != src.end(); iter++) - dest[(*iter).first] = (*iter).second; -} - -class atf_run : public atf::application::app { - static const char* m_description; - - atf::tests::vars_map m_atffile_vars; - atf::tests::vars_map m_cmdline_vars; - atf::tests::vars_map m_config_vars; - - static atf::tests::vars_map::value_type parse_var(const std::string&); - - void process_option(int, const char*); - std::string specific_args(void) const; - options_set specific_options(void) const; - - void parse_vflag(const std::string&); - - void read_one_config(const atf::fs::path&); - void read_config(const std::string&); - std::vector< std::string > conf_args(void) const; - - size_t count_tps(std::vector< std::string >) const; - - int run_test(const atf::fs::path&, - atf::formats::atf_tps_writer&); - int run_test_directory(const atf::fs::path&, - atf::formats::atf_tps_writer&); - int run_test_program(const atf::fs::path&, - atf::formats::atf_tps_writer&); - - void run_test_program_child(const atf::fs::path&, - atf::io::pipe&, - atf::io::pipe&, - atf::io::pipe&); - int run_test_program_parent(const atf::fs::path&, - atf::formats::atf_tps_writer&, - atf::io::pipe&, - atf::io::pipe&, - atf::io::pipe&, - pid_t); - -public: - atf_run(void); - - int main(void); -}; - -const char* atf_run::m_description = - "atf-run is a tool that runs tests programs and collects their " - "results."; - -atf_run::atf_run(void) : - app(m_description, "atf-run(1)", "atf(7)") -{ -} - -void -atf_run::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'v': - parse_vflag(arg); - break; - - default: - UNREACHABLE; - } -} - -std::string -atf_run::specific_args(void) - const -{ - return "[test-program1 .. test-programN]"; -} - -atf_run::options_set -atf_run::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('v', "var=value", "Sets the configuration variable " - "`var' to `value'; overrides " - "values in configuration files")); - return opts; -} - -void -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, "="); - if (ws.size() == 1 && str[str.length() - 1] == '=') { - m_cmdline_vars[ws[0]] = ""; - } else { - if (ws.size() != 2) - throw std::runtime_error("-v requires an argument of the form " - "var=value"); - - m_cmdline_vars[ws[0]] = ws[1]; - } -} - -int -atf_run::run_test(const atf::fs::path& tp, - atf::formats::atf_tps_writer& w) -{ - atf::fs::file_info fi(tp); - - int errcode; - if (fi.get_type() == atf::fs::file_info::dir_type) - errcode = run_test_directory(tp, w); - else - errcode = run_test_program(tp, w); - return errcode; -} - -int -atf_run::run_test_directory(const atf::fs::path& tp, - atf::formats::atf_tps_writer& w) -{ - atf::atffile af(tp / "Atffile"); - m_atffile_vars = af.conf(); - - atf::tests::vars_map oldvars = m_config_vars; - { - atf::tests::vars_map::const_iterator iter = - af.props().find("test-suite"); - INV(iter != af.props().end()); - read_config((*iter).second); - } - - bool ok = true; - for (std::vector< std::string >::const_iterator iter = af.tps().begin(); - iter != af.tps().end(); iter++) - ok &= (run_test(tp / *iter, w) == EXIT_SUCCESS); - - m_config_vars = oldvars; - - return ok ? EXIT_SUCCESS : EXIT_FAILURE; -} - -std::vector< std::string > -atf_run::conf_args(void) const -{ - using atf::tests::vars_map; - - atf::tests::vars_map vars; - std::vector< std::string > args; - - merge_maps(vars, m_atffile_vars); - merge_maps(vars, m_config_vars); - merge_maps(vars, m_cmdline_vars); - - for (vars_map::const_iterator i = vars.begin(); i != vars.end(); i++) - args.push_back("-v" + (*i).first + "=" + (*i).second); - - return args; -} - -void -atf_run::run_test_program_child(const atf::fs::path& tp, - atf::io::pipe& outpipe, - atf::io::pipe& errpipe, - atf::io::pipe& respipe) -{ - // Remap stdout and stderr to point to the parent, who will capture - // everything sent to these. - outpipe.rend().close(); - outpipe.wend().posix_remap(STDOUT_FILENO); - errpipe.rend().close(); - errpipe.wend().posix_remap(STDERR_FILENO); - - // Remap the results file descriptor to point to the parent too. - // We use the 9th one (instead of a bigger one) because shell scripts - // can only use the [0..9] file descriptors in their redirections. - respipe.rend().close(); - respipe.wend().posix_remap(9); - - // 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, - // either due to exec(2) or to exit(3). - std::vector< std::string > confargs = conf_args(); - char** args = new char*[4 + confargs.size()]; - { - // 0: Program name. - std::string progname = tp.leaf_name(); - args[0] = new char[progname.length() + 1]; - std::strcpy(args[0], progname.c_str()); - - // 1: The file descriptor to which the results will be printed. - args[1] = new char[4]; - std::strcpy(args[1], "-r9"); - - // 2: The directory where the test program lives. - atf::fs::path bp = tp.branch_path(); - if (!bp.is_absolute()) - bp = bp.to_absolute(); - const char* dir = bp.c_str(); - args[2] = new char[std::strlen(dir) + 3]; - std::strcpy(args[2], "-s"); - std::strcat(args[2], dir); - - // [3..last - 1]: Configuration arguments. - std::vector< std::string >::size_type i; - for (i = 0; i < confargs.size(); i++) { - const char* str = confargs[i].c_str(); - args[3 + i] = new char[std::strlen(str) + 1]; - std::strcpy(args[3 + i], str); - } - - // Last: Terminator. - args[3 + i] = NULL; - } - - // Do the real exec and report any errors to the parent through the - // only mechanism we can use: stderr. - // TODO Try to make this fail. - ::execv(tp.c_str(), args); - std::cerr << "Failed to execute `" << tp.str() << "': " - << std::strerror(errno) << std::endl; - std::exit(EXIT_FAILURE); -} - -int -atf_run::run_test_program_parent(const atf::fs::path& tp, - atf::formats::atf_tps_writer& w, - atf::io::pipe& outpipe, - atf::io::pipe& errpipe, - atf::io::pipe& respipe, - pid_t pid) -{ - // Get the file descriptor and input stream of stdout. - outpipe.wend().close(); - atf::io::unbuffered_istream outin(outpipe.rend()); - - // Get the file descriptor and input stream of stderr. - errpipe.wend().close(); - atf::io::unbuffered_istream errin(errpipe.rend()); - - // Get the file descriptor and input stream of the results channel. - respipe.wend().close(); - atf::io::pistream resin(respipe.rend()); - - // Process the test case's output and multiplex it into our output - // stream as we read it. - muxer m(tp, w, resin); - std::string fmterr; - try { - m.read(outin, errin); - } catch (const atf::parser::parse_errors& e) { - fmterr = "There were errors parsing the output of the test " - "program:"; - for (atf::parser::parse_errors::const_iterator iter = e.begin(); - iter != e.end(); iter++) { - fmterr += " Line " + atf::text::to_string((*iter).first) + - ": " + (*iter).second + "."; - } - } catch (const atf::formats::format_error& e) { - fmterr = e.what(); - } catch (...) { - UNREACHABLE; - } - - try { - outin.close(); - errin.close(); - resin.close(); - } catch (...) { - UNREACHABLE; - } - - int code, status; - if (::waitpid(pid, &status, 0) != pid) { - m.finalize("waitpid(2) on the child process " + - atf::text::to_string(pid) + " failed" + - (fmterr.empty() ? "" : (". " + fmterr))); - code = EXIT_FAILURE; - } else { - if (WIFEXITED(status)) { - code = WEXITSTATUS(status); - if (m.failed() > 0 && code == EXIT_SUCCESS) { - code = EXIT_FAILURE; - m.finalize("Test program returned success but some test " - "cases failed" + - (fmterr.empty() ? "" : (". " + fmterr))); - } else { - code = fmterr.empty() ? code : EXIT_FAILURE; - m.finalize(fmterr); - } - } else if (WIFSIGNALED(status)) { - code = EXIT_FAILURE; - m.finalize("Test program received signal " + - atf::text::to_string(WTERMSIG(status)) + - (WCOREDUMP(status) ? " (core dumped)" : "") + - (fmterr.empty() ? "" : (". " + fmterr))); - } else - throw std::runtime_error - ("Child process " + atf::text::to_string(pid) + - " terminated with an unknown status condition " + - atf::text::to_string(status)); - } - return code; -} - -int -atf_run::run_test_program(const atf::fs::path& tp, - atf::formats::atf_tps_writer& w) -{ - int errcode; - - atf::io::pipe outpipe, errpipe, respipe; - pid_t pid = ::fork(); - if (pid == -1) { - throw atf::system_error("run_test_program", - "fork(2) failed", errno); - } else if (pid == 0) { - run_test_program_child(tp, outpipe, errpipe, respipe); - UNREACHABLE; - errcode = EXIT_FAILURE; - } else { - errcode = run_test_program_parent(tp, w, outpipe, errpipe, - respipe, pid); - } - - return errcode; -} - -size_t -atf_run::count_tps(std::vector< std::string > tps) - const -{ - size_t ntps = 0; - - 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); - - if (fi.get_type() == atf::fs::file_info::dir_type) { - atf::atffile af = atf::atffile(tp / "Atffile"); - std::vector< std::string > aux = af.tps(); - for (std::vector< std::string >::iterator i2 = aux.begin(); - i2 != aux.end(); i2++) - *i2 = (tp / *i2).str(); - ntps += count_tps(aux); - } else - ntps++; - } - - return ntps; -} - -void -atf_run::read_one_config(const atf::fs::path& p) -{ - std::ifstream is(p.c_str()); - if (is) { - config reader(is); - reader.read(); - merge_maps(m_config_vars, reader.get_vars()); - } -} - -void -atf_run::read_config(const std::string& name) -{ - 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"); - - m_config_vars.clear(); - for (std::vector< atf::fs::path >::const_iterator iter = dirs.begin(); - iter != dirs.end(); iter++) { - read_one_config((*iter) / "common.conf"); - read_one_config((*iter) / (name + ".conf")); - } -} - -static -void -call_hook(const std::string& tool, const std::string& hook) -{ - std::string sh = atf::config::get("atf_shell"); - atf::fs::path p = atf::fs::path(atf::config::get("atf_pkgdatadir")) / - (tool + ".hooks"); - std::string cmd = sh + " '" + p.str() + "' '" + hook + "'"; - int exitcode = std::system(cmd.c_str()); - if (!WIFEXITED(exitcode) || WEXITSTATUS(exitcode) != EXIT_SUCCESS) - throw std::runtime_error("Failed to run the '" + hook + "' hook " - "for '" + tool + "'; command was '" + - cmd + "'; exit code " + - atf::text::to_string(exitcode)); -} - -int -atf_run::main(void) -{ - atf::atffile af(atf::fs::path("Atffile")); - m_atffile_vars = af.conf(); - - std::vector< std::string > tps; - tps = af.tps(); - if (m_argc >= 1) { - // TODO: Ensure that the given test names are listed in the - // Atffile. Take into account that the file can be using globs. - tps.clear(); - for (int i = 0; i < m_argc; i++) - tps.push_back(m_argv[i]); - } - - // Read configuration data for this test suite. - { - atf::tests::vars_map::const_iterator iter = - af.props().find("test-suite"); - INV(iter != af.props().end()); - read_config((*iter).second); - } - - atf::formats::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++) - ok &= (run_test(atf::fs::path(*iter), w) == EXIT_SUCCESS); - - call_hook("atf-run", "info_end_hook"); - - return ok ? EXIT_SUCCESS : EXIT_FAILURE; -} - -int -main(int argc, char* const* argv) -{ - return atf_run().run(argc, argv); -} diff --git a/dist/atf/tools/atf-run.hooks b/dist/atf/tools/atf-run.hooks deleted file mode 100644 index 3a55aee6bfed..000000000000 --- a/dist/atf/tools/atf-run.hooks +++ /dev/null @@ -1,94 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007, 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. -# - -atf_tps_writer_info() -{ - class=${1}; shift - echo "info: ${class}, $*" -} - -info_start_hook() -{ - default_info_start_hook "${@}" -} - -default_info_start_hook() -{ - atf_tps_writer_info "atf.version" $(atf-version | head -n 1) - - atf_tps_writer_info "tests.root" $(pwd) - - atf_tps_writer_info "time.start" $(date) - - atf_tps_writer_info "uname.sysname" $(uname -s) - atf_tps_writer_info "uname.nodename" $(uname -n) - atf_tps_writer_info "uname.release" $(uname -r) - atf_tps_writer_info "uname.version" $(uname -v) - atf_tps_writer_info "uname.machine" $(uname -m) - - # Add all the environment variables to the report. We have to be - # careful with those that span over multiple lines; otherwise their - # values could be printed as multiple different variables (one per - # line), which is incorrect. - oldifs="${IFS}" - IFS=' -' - set -- $(env) - val=${1}; shift - while [ ${#} -gt 0 ]; do - if echo "${1}" | grep '^[a-zA-Z_][a-zA-Z_]*=' >/dev/null; then - atf_tps_writer_info "env" "${val}" - val="${1}" - else - val="${val} ${1}" - fi - shift - done - atf_tps_writer_info "env" "${val}" - IFS="${oldifs}" -} - -info_end_hook() -{ - default_info_end_hook "${@}" -} - -default_info_end_hook() -{ - atf_tps_writer_info "time.end" $(date) -} - -sitehooks=$(atf-config -t atf_confdir)/atf-run.hooks -userhooks=${HOME}/.atf/atf-run.hooks -[ -f ${sitehooks} ] && . ${sitehooks} -[ -f ${userhooks} ] && . ${userhooks} - -eval ${1} - -# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/dist/atf/tools/atf-version.1 b/dist/atf/tools/atf-version.1 deleted file mode 100644 index 751df08ec4d1..000000000000 --- a/dist/atf/tools/atf-version.1 +++ /dev/null @@ -1,56 +0,0 @@ -.\" -.\" Automated Testing Framework (atf) -.\" -.\" Copyright (c) 2007, 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. -.\" -.Dd September 16, 2007 -.Dt ATF-VERSION 1 -.Os -.Sh NAME -.Nm atf-version -.Nd shows information about the installed ATF version -.Sh SYNOPSIS -.Nm -.Nm -.Fl h -.Sh DESCRIPTION -.Nm -is a utility that prints information about the version of ATF currently -installed in the system. -.Pp -In the first synopsis form, -.Nm -shows the release version of the ATF package installed in the system (the -installation that corresponds to the instance of -.Nm -being executed) and also shows information related to the repository -revision used to build that package. -.Pp -In the second synopsis form, -.Nm -will print information about all supported options and their purpose. -.Sh SEE ALSO -.Xr atf 7 diff --git a/dist/atf/tools/atf-version.cpp b/dist/atf/tools/atf-version.cpp deleted file mode 100644 index 6af5ff3e4f7c..000000000000 --- a/dist/atf/tools/atf-version.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007, 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(HAVE_CONFIG_H) -#include "bconfig.h" -#endif -#include "revision.h" - -#include -#include - -#include "atf-c++/application.hpp" -#include "atf-c++/ui.hpp" - -class atf_version : public atf::application::app { - static const char* m_description; - -public: - atf_version(void); - - int main(void); -}; - -const char* atf_version::m_description = - "atf-version is a tool that shows information about the currently " - "installed version of ATF."; - -atf_version::atf_version(void) : - app(m_description, "atf-version(1)", "atf(7)") -{ -} - -int -atf_version::main(void) -{ - using atf::ui::format_text; - using atf::ui::format_text_with_tag; - - std::cout << PACKAGE_STRING " (" PACKAGE_TARNAME "-" PACKAGE_VERSION - ")" << std::endl - << PACKAGE_COPYRIGHT << std::endl - << std::endl; - - std::cout << format_text_with_tag(PACKAGE_REVISION_BASE -#if PACKAGE_REVISION_MODIFIED - " (locally modified)" -#endif - , "Base revision: ", false) - << std::endl; -#if PACKAGE_REVISION_CACHED - std::cout << format_text("Information gathered from data cached in " - "distribution; further changes may have been " - "made.") << std::endl; -#endif - - return EXIT_SUCCESS; -} - -int -main(int argc, char* const* argv) -{ - return atf_version().run(argc, argv); -} diff --git a/etc/Makefile b/etc/Makefile index fd9218876913..5e5f60c2a9be 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.362 2008/12/05 18:52:59 cube Exp $ +# $NetBSD: Makefile,v 1.363 2009/01/19 07:08:27 jmmv Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -338,7 +338,7 @@ install-etc-files: .PHONY .MAKE check_DESTDIR MAKEDEV ${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \ /dev/null ${DESTDIR}${file} .endfor -.for subdir in . atf defaults bluetooth iscsi mtree namedb pam.d powerd rc.d root skel ssh +.for subdir in . defaults bluetooth iscsi mtree namedb pam.d powerd rc.d root skel ssh ${MAKEDIRTARGET} ${subdir} configinstall .endfor ${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/bsd/dhcpcd/sbin/dhcpcd configinstall @@ -352,6 +352,9 @@ install-etc-files: .PHONY .MAKE check_DESTDIR MAKEDEV .if (${MKPOSTFIX} != "no") ${MAKEDIRTARGET} ${NETBSDSRCDIR}/gnu/usr.sbin/postfix configinstall .endif +.if (${MKATF} != "no") + ${MAKEDIRTARGET} ${NETBSDSRCDIR}/external/bsd/atf/etc/atf configinstall +.endif # install-obsolete-lists -- diff --git a/etc/atf/Makefile b/etc/atf/Makefile deleted file mode 100644 index 6c037096a974..000000000000 --- a/etc/atf/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2007/12/20 16:53:59 apb Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/data - -CONFIGFILES= NetBSD.conf atf-run.hooks -FILESDIR= /etc/atf -FILESMODE= 644 - -.include diff --git a/etc/atf/NetBSD.conf b/etc/atf/NetBSD.conf deleted file mode 100644 index cd6d0712333b..000000000000 --- a/etc/atf/NetBSD.conf +++ /dev/null @@ -1,12 +0,0 @@ -Content-Type: application/X-atf-config; version="1" - -# -# Configuration file for the NetBSD test suite. -# See atf-formats(5) for more details on its syntax. -# - -# When running the test suite as root, some tests require to switch to -# an unprivileged user to perform extra checks. Set this variable to -# the user you want to use in those cases. If not set, those tests will -# be skipped. -#unprivileged-user = "nobody" diff --git a/lib/Makefile b/lib/Makefile index 26ae4dccd74e..fbf570d9251d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.131 2008/11/27 16:14:46 pooka Exp $ +# $NetBSD: Makefile,v 1.132 2009/01/19 07:08:27 jmmv Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -11,10 +11,6 @@ SUBDIR= csu libc .WAIT libarch \ libpthread_dbg libpuffs libresolv librmt librpcsvc librt libsdp \ libterm libusbhid libutil libwrap liby libz -.if (${MKATF} != "no") -SUBDIR+= libatf-c libatf-c++ -.endif - # libform and libmenu need libcurses SUBDIR+= .WAIT libform libmenu diff --git a/lib/libatf-c++/Makefile b/lib/libatf-c++/Makefile deleted file mode 100644 index 0b47b87f2776..000000000000 --- a/lib/libatf-c++/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2008/05/01 15:33:33 jmmv Exp $ - -NOLINT= # defined - -.include - -LIB= atf-c++ -LDADD= -L${.OBJDIR}/../libatf-c -latf-c -NOPIC= # defined; interface is still too unstable - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR} -.PATH: ${SRCDIR}/atf-c++ - -CPPFLAGS+= -I${.CURDIR}/../libatf-c -CPPFLAGS+= -I. - -CPPFLAGS+= -DHAVE_CONFIG_H - -WARNS?= 2 - -SRCS= application.cpp \ - atffile.cpp \ - config.cpp \ - env.cpp \ - exceptions.cpp \ - expand.cpp \ - formats.cpp \ - fs.cpp \ - io.cpp \ - parser.cpp \ - signals.cpp \ - tests.cpp \ - text.cpp \ - ui.cpp \ - user.cpp - -INCS= application.hpp \ - atffile.hpp \ - config.hpp \ - env.hpp \ - exceptions.hpp \ - expand.hpp \ - formats.hpp \ - fs.hpp \ - io.hpp \ - macros.hpp \ - parser.hpp \ - sanity.hpp \ - signals.hpp \ - tests.hpp \ - text.hpp \ - ui.hpp \ - user.hpp \ - utils.hpp -INCSDIR= /usr/include/atf-c++ - -INCS+= atf-c++.hpp -INCSDIR_atf-c++.hpp=/usr/include - -MAN= # empty - -.include diff --git a/lib/libatf-c/Makefile b/lib/libatf-c/Makefile deleted file mode 100644 index 91467d2ab607..000000000000 --- a/lib/libatf-c/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/07/20 14:36:52 veego Exp $ - -NOLINT= # defined - -.include - -LIB= atf-c -NOPIC= # defined; interface is still too unstable - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR} -.PATH: ${SRCDIR}/atf-c - -CPPFLAGS+= -I${.CURDIR} -CPPFLAGS+= -I. - -CPPFLAGS+= -DHAVE_CONFIG_H -CPPFLAGS+= -DATF_ARCH=\"${MACHINE}\" -CPPFLAGS+= -DATF_CONFDIR=\"/etc/atf\" -CPPFLAGS+= -DATF_LIBEXECDIR=\"/usr/libexec\" -CPPFLAGS+= -DATF_MACHINE=\"${MACHINE_ARCH}\" -CPPFLAGS+= -DATF_PKGDATADIR=\"/usr/share/atf\" -CPPFLAGS+= -DATF_SHELL=\"/bin/sh\" -CPPFLAGS+= -DATF_WORKDIR=\"/tmp\" - -WARNS?= 2 - -SRCS= config.c \ - dynstr.c \ - env.c \ - error.c \ - expand.c \ - fs.c \ - io.c \ - list.c \ - map.c \ - object.c \ - sanity.c \ - signals.c \ - text.c \ - ui.c \ - user.c \ - tc.c \ - tcr.c \ - tp.c \ - tp_main.c - -INCS= config.h \ - defs.h \ - dynstr.h \ - env.h \ - error.h \ - expand.h \ - fs.h \ - io.h \ - list.h \ - macros.h \ - map.h \ - object.h \ - sanity.h \ - signals.h \ - tc.h \ - tcr.h \ - text.h \ - tp.h \ - ui.h \ - user.h -INCSDIR= /usr/include/atf-c - -INCS+= atf-c.h -INCSDIR_atf-c.h=/usr/include - -MAN= # empty - -CLEANFILES+= defs.h - -defs.h: defs.h.in - sed -e 's,@ATTRIBUTE_NORETURN@,__attribute__((noreturn)),g' \ - <${SRCDIR}/atf-c/defs.h.in >defs.h.tmp - mv defs.h.tmp defs.h - -.include diff --git a/lib/libatf-c/bconfig.h b/lib/libatf-c/bconfig.h deleted file mode 100644 index 93501cd1d66f..000000000000 --- a/lib/libatf-c/bconfig.h +++ /dev/null @@ -1,104 +0,0 @@ -/* bconfig.h. Generated from bconfig.h.in by configure. */ -/* bconfig.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. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if getcwd(NULL, 0) works */ -#define HAVE_GETCWD_DYN 1 - -/* Define to 1 if getopt allows a + sign for POSIX behavior */ -/* #undef HAVE_GNU_GETOPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if putenv is in std */ -/* #undef HAVE_PUTENV_IN_STD */ - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if setenv is in std */ -/* #undef HAVE_SETENV_IN_STD */ - -/* Define to 1 if snprintf is in std */ -/* #undef HAVE_SNPRINTF_IN_STD */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `unmount' function. */ -#define HAVE_UNMOUNT 1 - -/* Define to 1 if you have the `unsetenv' function. */ -#define HAVE_UNSETENV 1 - -/* 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 */ -#define LAST_SIGNO 63 - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Name of package */ -#define PACKAGE "atf" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "atf-devel@NetBSD.org" - -/* Define to the copyright string applicable to this package. */ -#define PACKAGE_COPYRIGHT "Copyright (c) 2007, 2008 The NetBSD Foundation, Inc." - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Automated Testing Framework" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Automated Testing Framework 0.5" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "atf" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.5" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "0.5" diff --git a/libexec/Makefile b/libexec/Makefile index 63d96d0bbf97..b9a66fb54ee7 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.58 2008/08/16 23:51:15 gmcgarry Exp $ +# $NetBSD: Makefile,v 1.59 2009/01/19 07:08:27 jmmv Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 .include @@ -9,10 +9,6 @@ SUBDIR= atrun \ rlogind rshd rpc.rquotad rpc.rstatd rpc.rusersd rpc.rwalld \ rpc.sprayd talkd telnetd tftpd utmp_update -.if (${MKATF} != "no") -SUBDIR+= atf-cleanup atf-exec atf-format atf-killpg -.endif - .if (${MKKERBEROS} != "no") # Heimdal/KTH Kerberos SUBDIR+= hpropd kadmind kpasswdd ipropd-master ipropd-slave diff --git a/libexec/atf-cleanup/Makefile b/libexec/atf-cleanup/Makefile deleted file mode 100644 index 42281a06a906..000000000000 --- a/libexec/atf-cleanup/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -BINDIR= /usr/libexec -PROG_CXX= atf-cleanup -SRCS= atf-cleanup.cpp -MAN= atf-cleanup.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/libexec/atf-exec/Makefile b/libexec/atf-exec/Makefile deleted file mode 100644 index 71fd1e7164b9..000000000000 --- a/libexec/atf-exec/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -BINDIR= /usr/libexec -PROG_CXX= atf-exec -SRCS= atf-exec.cpp -MAN= atf-exec.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/libexec/atf-format/Makefile b/libexec/atf-format/Makefile deleted file mode 100644 index 9d3abde4f601..000000000000 --- a/libexec/atf-format/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -BINDIR= /usr/libexec -PROG_CXX= atf-format -SRCS= atf-format.cpp -MAN= atf-format.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/libexec/atf-killpg/Makefile b/libexec/atf-killpg/Makefile deleted file mode 100644 index 3da280c39545..000000000000 --- a/libexec/atf-killpg/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -BINDIR= /usr/libexec -PROG_CXX= atf-killpg -SRCS= atf-killpg.cpp -MAN= atf-killpg.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/share/Makefile b/share/Makefile index 1105272f05e8..5f48c7e33da1 100644 --- a/share/Makefile +++ b/share/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2008/10/12 23:00:54 mrg Exp $ +# $NetBSD: Makefile,v 1.30 2009/01/19 07:08:14 jmmv Exp $ # from @(#)Makefile 8.1 (Berkeley) 6/5/93 # Missing: ms @@ -7,7 +7,7 @@ .if ${MKSHARE} != "no" || \ make(clean) || make(cleandir) || make(distclean) || make(obj) -SUBDIR= atf dict doc examples legal man me misc mk \ +SUBDIR= dict doc examples legal man me misc mk \ tabset termcap tmac wscons xml xsl zoneinfo .if ${MKNLS} != "no" SUBDIR+=i18n locale nls diff --git a/share/atf/Makefile b/share/atf/Makefile deleted file mode 100644 index 79f0b62add08..000000000000 --- a/share/atf/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $NetBSD: Makefile,v 1.5 2008/10/30 21:37:55 mrg Exp $ - -.include - -.if ${MKSHARE} != "no" - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/data ${SRCDIR}/atf-sh - -# Files in ${SRCDIR}/subrs. -FILESDIR= /usr/share/atf -FILESMODE= 444 -FILES= atf.footer.subr \ - atf.header.subr \ - atf.init.subr -.endif - -.include diff --git a/share/doc/atf/Makefile b/share/doc/atf/Makefile deleted file mode 100644 index a123eac1e7e7..000000000000 --- a/share/doc/atf/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/10/25 22:27:35 apb Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR} -.PATH: ${SRCDIR}/atf-c -.PATH: ${SRCDIR}/atf-c++ -.PATH: ${SRCDIR}/atf-sh -.PATH: ${SRCDIR}/doc - -.if ${MKDOC} != "no" -FILESDIR= /usr/share/doc/atf -FILES= AUTHORS COPYING NEWS README ROADMAP -.endif - -MAN= atf.7 atf-formats.5 atf-test-case.4 atf-test-program.1 -MAN+= atf-c-api.3 atf-c++-api.3 atf-sh-api.3 - -CLEANFILES+= atf.7 atf.7.tmp -atf.7: atf.7.in - ${TOOL_SED} -e 's,__DOCDIR__,/usr/share/doc/atf,g' \ - <${SRCDIR}/doc/atf.7.in >atf.7.tmp - mv atf.7.tmp atf.7 - -.include -.include diff --git a/share/examples/Makefile b/share/examples/Makefile index 6ff5797e5847..1f4244bf839a 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.16 2008/10/25 17:43:24 christos Exp $ +# $NetBSD: Makefile,v 1.17 2009/01/19 07:08:28 jmmv Exp $ -SUBDIR= amd apm atf disktab emul fstab ftpd hostapd isdn pppd racoon \ +SUBDIR= amd apm disktab emul fstab ftpd hostapd isdn pppd racoon \ supfiles syslogd wsmoused .include diff --git a/share/examples/atf/Makefile b/share/examples/atf/Makefile deleted file mode 100644 index 2ef998009569..000000000000 --- a/share/examples/atf/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2007/11/12 20:13:21 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/data - -FILESDIR= /usr/share/examples/atf -FILESMODE= 444 -FILES= atf-run.hooks \ - tests-results.css - -.include diff --git a/share/xml/atf/Makefile b/share/xml/atf/Makefile deleted file mode 100644 index 893c76b1390c..000000000000 --- a/share/xml/atf/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2007/11/12 15:01:51 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/data - -FILESDIR= /usr/share/xml/atf -FILESMODE= 444 -FILES= tests-results.dtd - -.include diff --git a/share/xsl/atf/Makefile b/share/xsl/atf/Makefile deleted file mode 100644 index b36ce229dee2..000000000000 --- a/share/xsl/atf/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2007/11/12 15:01:51 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/data - -FILESDIR= /usr/share/xsl/atf -FILESMODE= 444 -FILES= tests-results.xsl - -.include diff --git a/tests/Makefile b/tests/Makefile index d377dc998ed7..cca8d21ed37a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2008/12/08 12:39:04 pooka Exp $ +# $NetBSD: Makefile,v 1.11 2009/01/19 07:08:14 jmmv Exp $ .include @@ -8,10 +8,6 @@ SUBDIR= fs games net util SUBDIR+= modules .endif -.if ${MKATF} != "no" -SUBDIR+= atf -.endif - TESTSDIR= ${TESTSBASE} .include diff --git a/tests/atf/Makefile b/tests/atf/Makefile deleted file mode 100644 index 437a8dc765a9..000000000000 --- a/tests/atf/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/05/01 15:37:18 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf - -SUBDIR= atf-c atf-c++ atf-sh data formats test_programs tools - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf - -.include -.include diff --git a/tests/atf/atf-c++/Makefile b/tests/atf/atf-c++/Makefile deleted file mode 100644 index cbfeb74d902e..000000000000 --- a/tests/atf/atf-c++/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2008/05/01 15:37:18 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/atf-c++ - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/atf-c++ - -CPPFLAGS+= -DHAVE_CONFIG_H -CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libatf-c - -TESTS_CXX= t_config -TESTS_CXX+= t_env -TESTS_CXX+= t_expand -TESTS_CXX+= t_fs -TESTS_CXX+= t_io -TESTS_CXX+= t_macros -TESTS_CXX+= t_parser -TESTS_CXX+= t_signals -TESTS_CXX+= t_tests -TESTS_CXX+= t_text -TESTS_CXX+= t_user -TESTS_CXX+= t_utils - -.include diff --git a/tests/atf/atf-c/Makefile b/tests/atf/atf-c/Makefile deleted file mode 100644 index b654cf97fc9a..000000000000 --- a/tests/atf/atf-c/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2008/05/01 15:37:18 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/atf-c - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/atf-c - -CPPFLAGS+= -DHAVE_CONFIG_H -CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libatf-c - -TESTS_C= t_config -TESTS_C+= t_dynstr -TESTS_C+= t_env -TESTS_C+= t_error -TESTS_C+= t_expand -TESTS_C+= t_fs -TESTS_C+= t_io -TESTS_C+= t_list -TESTS_C+= t_macros -TESTS_C+= t_map -TESTS_C+= t_sanity -TESTS_C+= t_signals -TESTS_C+= t_tc -TESTS_C+= t_tcr -TESTS_C+= t_text -TESTS_C+= t_ui -TESTS_C+= t_user - -.include diff --git a/tests/atf/atf-sh/Makefile b/tests/atf/atf-sh/Makefile deleted file mode 100644 index 5496a51c734c..000000000000 --- a/tests/atf/atf-sh/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2008/05/01 15:37:18 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/atf-sh - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/atf-sh - -TESTS_SH= h_misc -TESTS_SH+= t_atf_check -TESTS_SH+= t_config -TESTS_SH+= t_normalize -TESTS_SH+= t_tc -TESTS_SH+= t_tp - -.include diff --git a/tests/atf/data/Makefile b/tests/atf/data/Makefile deleted file mode 100644 index 40802669379a..000000000000 --- a/tests/atf/data/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $NetBSD: Makefile,v 1.1 2008/02/04 20:30:15 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/data - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/data - -TESTS_SH= t_pkg_config - -.include diff --git a/tests/atf/formats/Makefile b/tests/atf/formats/Makefile deleted file mode 100644 index cce93f37b7f2..000000000000 --- a/tests/atf/formats/Makefile +++ /dev/null @@ -1,184 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2007/11/21 15:39:33 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/formats - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/formats - -CPPFLAGS+= -I${SRCDIR}/libs - -TESTS_CXX= h_parser -TESTS_CXX+= t_writers -TESTS_SH= t_parsers - -FILESDIR= ${TESTSDIR} -FILES= d_atffile_1 \ - d_atffile_1.expout \ - d_atffile_2 \ - d_atffile_2.expout \ - d_atffile_3 \ - d_atffile_3.expout \ - d_atffile_4 \ - d_atffile_4.expout \ - d_atffile_5 \ - d_atffile_5.expout \ - d_atffile_50 \ - d_atffile_50.experr \ - d_atffile_51 \ - d_atffile_51.experr \ - d_atffile_52 \ - d_atffile_52.experr \ - d_atffile_53 \ - d_atffile_53.experr \ - d_atffile_53.expout \ - d_atffile_54 \ - d_atffile_54.experr \ - d_atffile_6 \ - d_atffile_6.expout \ - d_config_1 \ - d_config_1.expout \ - d_config_2 \ - d_config_2.expout \ - d_config_3 \ - d_config_3.expout \ - d_config_4 \ - d_config_4.expout \ - d_config_50 \ - d_config_50.experr \ - d_config_51 \ - d_config_51.experr \ - d_config_52 \ - d_config_52.experr \ - d_config_53 \ - d_config_53.experr \ - d_config_53.expout \ - d_config_54 \ - d_config_54.experr \ - d_headers_1 \ - d_headers_1.experr \ - d_headers_10 \ - d_headers_10.experr \ - d_headers_11 \ - d_headers_11.experr \ - d_headers_12 \ - d_headers_12.experr \ - d_headers_2 \ - d_headers_2.experr \ - d_headers_3 \ - d_headers_3.experr \ - d_headers_4 \ - d_headers_4.experr \ - d_headers_5 \ - d_headers_5.experr \ - d_headers_6 \ - d_headers_6.experr \ - d_headers_7 \ - d_headers_7.experr \ - d_headers_8 \ - d_headers_8.experr \ - d_headers_9 \ - d_headers_9.experr \ - d_tcs_1 \ - d_tcs_1.errin \ - d_tcs_1.expout \ - d_tcs_1.outin \ - d_tcs_2 \ - d_tcs_2.errin \ - d_tcs_2.expout \ - d_tcs_2.outin \ - d_tcs_3 \ - d_tcs_3.errin \ - d_tcs_3.expout \ - d_tcs_3.outin \ - d_tcs_4 \ - d_tcs_4.errin \ - d_tcs_4.expout \ - d_tcs_4.outin \ - d_tcs_5 \ - d_tcs_5.errin \ - d_tcs_5.expout \ - d_tcs_5.outin \ - d_tcs_50 \ - d_tcs_50.experr \ - d_tcs_51 \ - d_tcs_51.experr \ - d_tcs_52 \ - d_tcs_52.experr \ - d_tcs_53 \ - d_tcs_53.experr \ - d_tcs_53.expout \ - d_tcs_54 \ - d_tcs_54.experr \ - d_tcs_54.expout \ - d_tcs_55 \ - d_tcs_55.experr \ - d_tcs_55.expout \ - d_tcs_56 \ - d_tcs_56.errin \ - d_tcs_56.experr \ - d_tcs_56.expout \ - d_tcs_56.outin \ - d_tcs_57 \ - d_tcs_57.errin \ - d_tcs_57.experr \ - d_tcs_57.expout \ - d_tcs_57.outin \ - d_tps_1 \ - d_tps_1.expout \ - d_tps_2 \ - d_tps_2.expout \ - d_tps_3 \ - d_tps_3.expout \ - d_tps_4 \ - d_tps_4.expout \ - d_tps_5 \ - d_tps_5.expout \ - d_tps_50 \ - d_tps_50.experr \ - d_tps_51 \ - d_tps_51.experr \ - d_tps_52 \ - d_tps_52.experr \ - d_tps_53 \ - d_tps_53.experr \ - d_tps_53.expout \ - d_tps_54 \ - d_tps_54.experr \ - d_tps_54.expout \ - d_tps_55 \ - d_tps_55.experr \ - d_tps_55.expout \ - d_tps_56 \ - d_tps_56.experr \ - d_tps_56.expout \ - d_tps_57 \ - d_tps_57.experr \ - d_tps_57.expout \ - d_tps_58 \ - d_tps_58.experr \ - d_tps_58.expout \ - d_tps_59 \ - d_tps_59.experr \ - d_tps_60 \ - d_tps_60.experr \ - d_tps_61 \ - d_tps_61.experr \ - d_tps_62 \ - d_tps_62.experr \ - d_tps_62.expout \ - d_tps_63 \ - d_tps_63.experr \ - d_tps_63.expout \ - d_tps_64 \ - d_tps_64.experr \ - d_tps_64.expout \ - d_tps_65 \ - d_tps_65.experr \ - d_tps_65.expout \ - d_tps_66 \ - d_tps_66.experr \ - d_tps_66.expout - -.include diff --git a/tests/atf/test_programs/Makefile b/tests/atf/test_programs/Makefile deleted file mode 100644 index 9c28664345fc..000000000000 --- a/tests/atf/test_programs/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2007/11/21 15:39:34 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/test_programs - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/test_programs - -CPPFLAGS+= -I${SRCDIR}/libs - -TESTS_CXX= h_cpp -TESTS_SH= h_sh -TESTS_SH+= t_cleanup -TESTS_SH+= t_config -TESTS_SH+= t_env -TESTS_SH+= t_fork -TESTS_SH+= t_meta_data -TESTS_SH+= t_srcdir -TESTS_SH+= t_status -TESTS_SH+= t_workdir - -.include diff --git a/tests/atf/tools/Makefile b/tests/atf/tools/Makefile deleted file mode 100644 index 3b295e2fc40a..000000000000 --- a/tests/atf/tools/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2008/02/04 20:30:15 jmmv Exp $ - -.include - -TESTSDIR= ${TESTSBASE}/atf/tools - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tests/atf/tools - -TESTS_CXX= h_fail -TESTS_CXX+= h_misc -TESTS_CXX+= h_pass -TESTS_SH= t_atf_cleanup -TESTS_SH+= t_atf_compile -TESTS_SH+= t_atf_config -TESTS_SH+= t_atf_exec -TESTS_SH+= t_atf_killpg -TESTS_SH+= t_atf_report -TESTS_SH+= t_atf_run - -BINDIR= ${TESTSDIR} -PROGS_CXX= h_mode -MAN.h_mode= # empty - -.include diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 035c6ef11772..f332ffccfe89 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.173 2008/12/11 11:14:37 roy Exp $ +# $NetBSD: Makefile,v 1.174 2009/01/19 07:08:29 jmmv Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include @@ -30,10 +30,6 @@ SUBDIR= apply apropos asa at audio awk \ wall wc what whatis whereis who whois window \ write xargs xinstall xlint xstr yacc yes -.if (${MKATF} != "no") -SUBDIR+= atf-compile atf-config atf-report atf-run atf-version -.endif - .if (${MKHESIOD} != "no") SUBDIR+= hesinfo .endif diff --git a/usr.bin/atf-compile/Makefile b/usr.bin/atf-compile/Makefile deleted file mode 100644 index 73b63f933256..000000000000 --- a/usr.bin/atf-compile/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -PROG_CXX= atf-compile -SRCS= atf-compile.cpp -MAN= atf-compile.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/usr.bin/atf-config/Makefile b/usr.bin/atf-config/Makefile deleted file mode 100644 index 150385ead87c..000000000000 --- a/usr.bin/atf-config/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -PROG_CXX= atf-config -SRCS= atf-config.cpp -MAN= atf-config.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/usr.bin/atf-report/Makefile b/usr.bin/atf-report/Makefile deleted file mode 100644 index d9462dcb8e8f..000000000000 --- a/usr.bin/atf-report/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2008/05/01 15:35:14 jmmv Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools - -PROG_CXX= atf-report -SRCS= atf-report.cpp -MAN= atf-report.1 - -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -.include diff --git a/usr.bin/atf-run/Makefile b/usr.bin/atf-run/Makefile deleted file mode 100644 index e4ef8dedb6d9..000000000000 --- a/usr.bin/atf-run/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# $NetBSD: Makefile,v 1.4 2008/10/30 21:37:55 mrg Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/tools -.PATH: ${SRCDIR}/data ${SRCDIR}/atf-sh - -PROG_CXX= atf-run -SRCS= atf-run.cpp -MAN= atf-run.1 - -CPPFLAGS+= -DHAVE_CONFIG_H -CPPFLAGS+= -I${.CURDIR}/../../lib/libatf-c -LDADD+= -latf-c++ -latf-c - -COPTS.atf-run.cpp+= -Wno-stack-protector - -WARNS?= 2 - -.if ${MKSHARE} != "no" -FILESDIR= /usr/share/atf -FILES= atf-run.hooks -.endif - -# Files in ${SRCDIR}/data. -FILES+= atf-c.pc \ - atf-c++.pc -FILESDIR_atf-c.pc= /usr/lib/pkgconfig -FILESDIR_atf-c++.pc= /usr/lib/pkgconfig - -realall: atf-c.pc -atf-c.pc: atf-c.pc.in - ${TOOL_SED} -e 's,__ATF_VERSION__,0.5,g' \ - -e 's,__CC__,gcc,g' \ - -e 's,__INCLUDEDIR__,/usr/include,g' \ - -e 's,__LIBDIR__,/usr/lib,g' \ - <${SRCDIR}/data/atf-c.pc.in >atf-c.pc -CLEANFILES+= atf-c.pc - -realall: atf-c++.pc -atf-c++.pc: atf-c++.pc.in - ${TOOL_SED} -e 's,__ATF_VERSION__,0.5,g' \ - -e 's,__CXX__,g++,g' \ - -e 's,__INCLUDEDIR__,/usr/include,g' \ - -e 's,__LIBDIR__,/usr/lib,g' \ - <${SRCDIR}/data/atf-c++.pc.in >atf-c++.pc -CLEANFILES+= atf-c++.pc - -.include diff --git a/usr.bin/atf-version/Makefile b/usr.bin/atf-version/Makefile deleted file mode 100644 index 2381c7b54d28..000000000000 --- a/usr.bin/atf-version/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2008/05/01 20:56:39 gdt Exp $ - -.include - -SRCDIR= ${NETBSDSRCDIR}/dist/atf -.PATH: ${SRCDIR}/admin ${SRCDIR}/tools - -PROG_CXX= atf-version -SRCS= atf-version.cpp -MAN= atf-version.1 - -CPPFLAGS+= -DHAVE_CONFIG_H -CPPFLAGS+= -I${.CURDIR}/../../lib/libatf-c -CPPFLAGS+= -I. -LDADD+= -latf-c++ -latf-c - -WARNS?= 2 - -CLEANFILES= revision.h -atf-version.cpp: revision.h -revision.h: revision-dist.h - cp -f ${SRCDIR}/admin/revision-dist.h revision.h - -.include