Imported Upstream version 0.12.0 99/186099/1 submit/upstream/20180829.044929 upstream/0.12.0
authorYeongjong Lee <yj34.lee@samsung.com>
Tue, 7 Aug 2018 03:14:40 +0000 (12:14 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 7 Aug 2018 08:20:00 +0000 (17:20 +0900)
Change-Id: I5b98a0811a766fcb160fba504a30603111c127c1

247 files changed:
AUTHORS
CMakeLists.txt [new file with mode: 0644]
ChangeLog
ChangeLogOld [deleted file]
INSTALL
Makefile.am
Makefile.in
NEWS
README
SVNChangeLog [deleted file]
TODO
aclocal.m4
ar-lib [new file with mode: 0755]
build-aux/compile [deleted file]
build-aux/depcomp [deleted file]
build-aux/ltmain.sh [deleted file]
build-aux/missing [deleted file]
check.pc.in
check_stdint.h [new file with mode: 0644]
checkmk/Makefile.am [new file with mode: 0644]
checkmk/Makefile.in [new file with mode: 0644]
checkmk/README [new file with mode: 0644]
checkmk/checkmk.in [new file with mode: 0644]
checkmk/doc/checkmk.1 [new file with mode: 0644]
checkmk/examples/basic_complete.ts [new file with mode: 0644]
checkmk/examples/multiple_everything.ts [new file with mode: 0644]
checkmk/test/argument_ws/in [new file with mode: 0644]
checkmk/test/argument_ws/x_output [new file with mode: 0644]
checkmk/test/basic_complete/in [new file with mode: 0644]
checkmk/test/basic_complete/x_output [new file with mode: 0644]
checkmk/test/between_the_lines/in [new file with mode: 0644]
checkmk/test/between_the_lines/x_output [new file with mode: 0644]
checkmk/test/case_insensitive_pp/in [new file with mode: 0644]
checkmk/test/case_insensitive_pp/x_output [new file with mode: 0644]
checkmk/test/check_checkmk [new file with mode: 0755]
checkmk/test/clean_mode/cmd [new file with mode: 0644]
checkmk/test/clean_mode/in [new file with mode: 0644]
checkmk/test/clean_mode/x_output [new file with mode: 0644]
checkmk/test/declarations/in [new file with mode: 0644]
checkmk/test/declarations/x_output [new file with mode: 0644]
checkmk/test/empty_input/in [new file with mode: 0644]
checkmk/test/empty_input/x_err [new file with mode: 0644]
checkmk/test/empty_input/x_output [new file with mode: 0644]
checkmk/test/invalid_ucn/in [new file with mode: 0644]
checkmk/test/invalid_ucn/x_err [new file with mode: 0644]
checkmk/test/invalid_ucn/x_output [new file with mode: 0644]
checkmk/test/main_post/in [new file with mode: 0644]
checkmk/test/main_post/x_output [new file with mode: 0644]
checkmk/test/main_post_multiple/in [new file with mode: 0644]
checkmk/test/main_post_multiple/x_err [new file with mode: 0644]
checkmk/test/main_post_multiple/x_output [new file with mode: 0644]
checkmk/test/main_pre_after_post/in [new file with mode: 0644]
checkmk/test/main_pre_after_post/x_err [new file with mode: 0644]
checkmk/test/main_pre_after_post/x_output [new file with mode: 0644]
checkmk/test/main_pre_multiple/in [new file with mode: 0644]
checkmk/test/main_pre_multiple/x_err [new file with mode: 0644]
checkmk/test/main_pre_multiple/x_output [new file with mode: 0644]
checkmk/test/multiple_everything/in [new file with mode: 0644]
checkmk/test/multiple_everything/x_output [new file with mode: 0644]
checkmk/test/name_enc/cmd [new file with mode: 0644]
checkmk/test/name_enc/x_output [new file with mode: 0644]
checkmk/test/no_args/cmd [new file with mode: 0644]
checkmk/test/no_args/in [new file with mode: 0644]
checkmk/test/no_args/x_output [new file with mode: 0644]
checkmk/test/non_word_chars/in [new file with mode: 0644]
checkmk/test/non_word_chars/x_output [new file with mode: 0644]
checkmk/test/not_really_repeated/in [new file with mode: 0644]
checkmk/test/not_really_repeated/x_output [new file with mode: 0644]
checkmk/test/num_start_test_name/in [new file with mode: 0644]
checkmk/test/num_start_test_name/x_err [new file with mode: 0644]
checkmk/test/num_start_test_name/x_output [new file with mode: 0644]
checkmk/test/pass_thru/in [new file with mode: 0644]
checkmk/test/pass_thru/x_err [new file with mode: 0644]
checkmk/test/pass_thru/x_output [new file with mode: 0644]
checkmk/test/repeated_argument_tests/in [new file with mode: 0644]
checkmk/test/repeated_argument_tests/x_err [new file with mode: 0644]
checkmk/test/repeated_argument_tests/x_output [new file with mode: 0644]
checkmk/test/repeated_suites/in [new file with mode: 0644]
checkmk/test/repeated_suites/x_err [new file with mode: 0644]
checkmk/test/repeated_suites/x_output [new file with mode: 0644]
checkmk/test/repeated_tcases/in [new file with mode: 0644]
checkmk/test/repeated_tcases/x_err [new file with mode: 0644]
checkmk/test/repeated_tcases/x_output [new file with mode: 0644]
checkmk/test/repeated_tests/in [new file with mode: 0644]
checkmk/test/repeated_tests/x_err [new file with mode: 0644]
checkmk/test/repeated_tests/x_output [new file with mode: 0644]
checkmk/test/single_test_line/in [new file with mode: 0644]
checkmk/test/single_test_line/x_output [new file with mode: 0644]
checkmk/test/tcase_implied_repeat/in [new file with mode: 0644]
checkmk/test/tcase_implied_repeat/x_err [new file with mode: 0644]
checkmk/test/tcase_implied_repeat/x_output [new file with mode: 0644]
checkmk/test/test_after_main_post/in [new file with mode: 0644]
checkmk/test/test_after_main_post/x_err [new file with mode: 0644]
checkmk/test/test_after_main_post/x_output [new file with mode: 0644]
checkmk/test/test_after_main_pre/in [new file with mode: 0644]
checkmk/test/test_after_main_pre/x_err [new file with mode: 0644]
checkmk/test/test_after_main_pre/x_output [new file with mode: 0644]
checkmk/test/test_chars/in [new file with mode: 0644]
checkmk/test/test_chars/x_err [new file with mode: 0644]
checkmk/test/test_chars/x_output [new file with mode: 0644]
checkmk/test/trailing_ws/in [new file with mode: 0644]
checkmk/test/trailing_ws/x_output [new file with mode: 0644]
checkmk/test/ucn/in [new file with mode: 0644]
checkmk/test/ucn/x_output [new file with mode: 0644]
cmake/CheckHeaderDirent.cmake [new file with mode: 0644]
cmake/CheckStructMember.cmake [new file with mode: 0644]
cmake/CheckTypeExists.cmake [new file with mode: 0644]
cmake/check_stdint.h.in [new file with mode: 0644]
cmake/config.h.in [new file with mode: 0644]
compile [new file with mode: 0755]
config.guess [moved from build-aux/config.guess with 72% similarity]
config.h.in
config.sub [moved from build-aux/config.sub with 82% similarity]
configure
configure.ac
depcomp [new file with mode: 0755]
doc/Makefile.am
doc/Makefile.in
doc/check.info
doc/check.texi
doc/example/CMakeLists.txt [new file with mode: 0644]
doc/example/README
doc/example/cmake/COPYING-CMAKE-SCRIPTS.txt [new file with mode: 0644]
doc/example/cmake/FindCheck.cmake [new file with mode: 0644]
doc/example/cmake/config.h.in [new file with mode: 0644]
doc/example/configure.ac
doc/example/src/CMakeLists.txt [new file with mode: 0644]
doc/example/src/main.c
doc/example/src/money.1.c
doc/example/src/money.1.h
doc/example/src/money.2.h
doc/example/src/money.3.c
doc/example/src/money.4.c
doc/example/src/money.5.c
doc/example/src/money.6.c
doc/example/src/money.c
doc/example/src/money.h
doc/example/tests/CMakeLists.txt [new file with mode: 0644]
doc/example/tests/check_money.1.c
doc/example/tests/check_money.2.c
doc/example/tests/check_money.3.c
doc/example/tests/check_money.6.c
doc/example/tests/check_money.7.c
doc/example/tests/check_money.c
doc/mdate-sh [moved from build-aux/mdate-sh with 82% similarity]
doc/stamp-vti
doc/texinfo.tex [moved from build-aux/texinfo.tex with 82% similarity]
doc/version.texi
install-sh [moved from build-aux/install-sh with 54% similarity]
lib/CMakeLists.txt [new file with mode: 0644]
lib/Makefile.am
lib/Makefile.in
lib/alarm.c [new file with mode: 0644]
lib/clock_gettime.c [new file with mode: 0644]
lib/fileno.c [deleted file]
lib/fpclassify.c [new file with mode: 0644]
lib/getline.c [new file with mode: 0644]
lib/gettimeofday.c [new file with mode: 0644]
lib/libcompat.c
lib/libcompat.h
lib/localtime_r.c
lib/malloc.c
lib/pipe.c [deleted file]
lib/putenv.c [deleted file]
lib/realloc.c
lib/setenv.c [deleted file]
lib/sleep.c [deleted file]
lib/snprintf.c [new file with mode: 0644]
lib/strdup.c
lib/strsignal.c
lib/timer_create.c [new file with mode: 0644]
lib/timer_delete.c [new file with mode: 0644]
lib/timer_settime.c [new file with mode: 0644]
lib/unsetenv.c [deleted file]
ltmain.sh [new file with mode: 0644]
m4/ax_cflags_warn_all_ansi.m4 [deleted file]
m4/ax_create_stdint_h.m4 [new file with mode: 0644]
m4/librt_timers.m4 [new file with mode: 0644]
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
m4/snprintf.m4 [new file with mode: 0644]
missing [new file with mode: 0755]
src/CMakeLists.txt [new file with mode: 0644]
src/Makefile.am
src/Makefile.in
src/check.c
src/check.h
src/check.h.in
src/check_error.c
src/check_error.h
src/check_impl.h
src/check_list.c
src/check_list.h
src/check_log.c
src/check_log.h
src/check_msg.c
src/check_msg.h
src/check_pack.c
src/check_pack.h
src/check_print.c
src/check_print.h
src/check_run.c
src/check_str.c
src/check_str.h
test-driver [new file with mode: 0755]
tests/CMakeLists.txt [new file with mode: 0644]
tests/Makefile.am
tests/Makefile.in
tests/check_check.h
tests/check_check_exit.c
tests/check_check_export_main.c
tests/check_check_fixture.c
tests/check_check_fork.c
tests/check_check_limit.c
tests/check_check_log.c
tests/check_check_log_internal.c
tests/check_check_main.c
tests/check_check_master.c
tests/check_check_msg.c
tests/check_check_pack.c
tests/check_check_selective.c [new file with mode: 0644]
tests/check_check_sub.c
tests/check_check_tags.c [new file with mode: 0644]
tests/check_list.c
tests/check_mem_leaks.c [new file with mode: 0644]
tests/check_nofork.c [new file with mode: 0644]
tests/check_nofork_teardown.c [new file with mode: 0644]
tests/check_set_max_msg_size.c [new file with mode: 0644]
tests/check_stress.c
tests/check_thread_stress.c
tests/ex_log_output.c [deleted file]
tests/ex_output.c
tests/ex_xml_output.c [deleted file]
tests/test_check_nofork.sh [new file with mode: 0755]
tests/test_check_nofork_teardown.sh [new file with mode: 0755]
tests/test_log_output.sh
tests/test_mem_leaks.sh [new file with mode: 0755]
tests/test_output.sh
tests/test_output_strings [new file with mode: 0644]
tests/test_set_max_msg_size.sh [new file with mode: 0755]
tests/test_tap_output.sh [new file with mode: 0755]
tests/test_vars.in
tests/test_xml_output.sh
xml/check_unittest.xslt [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index e720feb..229c8d1 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
-Maintainers:     Fredrik Hugosson <hugo303 at users dot sourceforge dot net>
-                Chris Pickett <chris dot pickett at mail dot mcgill dot ca>
+Maintainers:
+    Fredrik Hugosson  <hugo303 at users dot sourceforge dot net>     |  hugo303
+    Chris Pickett     <chris dot pickett at mail dot mcgill dot ca>  |  cpickett
+    Branden Archer    <b dot m dot archer4 at gmail dot com          |  brarcher
 
-Ex-Maintainer:   Sven Neumann <sven at convergence dot de>
-Original Author: Arien Malec <arien dot malec at gmail dot com>
+Ex-Maintainers:
+    Arien Malec       <arien dot malec at gmail dot com>             |  amalec
+    Sven Neumann      <sven at convergence dot de>                   |  neo23
 
-Patches:         Bernhard Reiter (configure issues)
-                 Neil Spring (const fixes)
-                 Rick Poyner (pipe handling, bug fixes)
-                 Dietmar Petras (bug fixes)
-                 Gilgamesh Nootebos (bug fixes)
-                Frederic Peters (XML output)
-                Lucas Di Pentima and Cesar Ballardini (signals)
-                 Robert Lemmen (gcov description in manual)
-                Loic Martin (AM_PATH_CHECK patch)
-                Ross Burton (pkg-config patch)
-                Roland Stigge (bug fix: allow fail inside setup)
-                Torok Edwin (strsignal and build fixes)
-                Roland Illig (varargs and strsignal portability fixes)
-                Daniel Gollub (pthreads support)
-                Friedrich Beckmann (mingw and msvc port)
-                Roy Merkel (specified test exit value)
-                Robert Collins (subunit support)
+Committers:
+    Robert Collins                              |  rbcollins
+        (subunit support)
+    Micah Cowan                                 |  micahcowan
+        (checkmk tool, docs and tests)
+    Zdenek Crha                                 |  zdenekc
+        (new Check API docs, fixes, and tests)
+    Mateusz Loskot                              |  mloskot
+        (msvc port #2)
+    Jose E. Marchesi                            |  jemarch
+        (selective testing support)
+
+Contributors:
+    Cesar Ballardini
+        (signals)
+    Anthony G. Basile
+        (fix configure.ac and strsignal())
+    Friedrich Beckmann
+        (mingw and msvc port #1)
+    Frank Bergmann
+        (WIN32 tmpfile workaround)
+    Joshua Boyd
+        (travis testing with both build systems, cmake fixes)
+    Ross Burton
+        (pkg-config patch)
+    Bogdan Cristea
+        (eclipse support in contrib dir)
+    Lucas Di Pentima
+        (signals)
+    Torok Edwin
+        (strsignal and build fixes)
+    Daniel Gollub
+        (pthreads support)
+    Roland Illig
+        (varargs and strsignal portability fixes)
+    Elmir Jagudin
+        (well-formed XML and log file via env variables)
+    Jerry James
+        (cleanup compiler warnings)
+    Jon Kowal
+        (deadlock on thread cancellation fix)
+    Robert Lemmen
+        (gcov description in manual)
+    Loic Martin
+        (AM_PATH_CHECK patch)
+    Roy Merkel
+        (specified test exit value)
+    Gilgamesh Nootebos
+        (bug fixes)
+    Diego Elio Petteno
+        (autoconf patch for 64-bit safe code)
+    Frederic Peters
+        (XML output)
+    Dietmar Petras
+        (bug fixes)
+    Rick Poyner
+        (pipe handling, bug fixes)
+    Bernhard Reiter
+        (configure issues)
+    Pavol Rusnak
+        (memory location comparison macros ck_assert_mem_*)
+    Neil Spring
+        (const fixes)
+    Roland Stigge
+        (bug fix: allow fail inside setup)
+    Sebastian Rasmussen
+        (duration bug fix, 64-bit API fix)
+    Martin Willers
+        (rename check's internal list API to start with check_)
+    bross
+        (patches for msys/mingw32 support)
+    Pino Toscano
+        (GNU/Hurd support for subsecond timeouts)
+    lod
+        (compiler warning)
+    Bill Kolokithas
+        (more checkmk directives)
+    Julien Godin
+        (configure.ac patch for Check example)
+    Kosma Moczek
+        (fix for string formatting in ck_assert_*() methods with %)
+    Tim Müller
+        (Use _exit() instead of exit() on _ck_assert_failed())
+    Georg Sauthoff
+        (Solaris support, misc autotools fixes)
+    forest
+        (AIX and Solaris support)
+    Michael Piszczek
+        (misc cleanup)
+    Stewart Brodie
+        (bug fix: no fork mode failure reporting with teardowns)
+    MichaÅ‚ DÄ™bski
+        (Use mkstemp() if available instead of tmpfile() or tempnam())
+    Sebastian Dröge
+        (Kill running tests if SIGTERM or SIGINT are caught in test runner)
+    Matt Clarkson
+        (Fix CMake checks using time.h for MinGW and MSVC)
+    Mario Sanchez Prada
+        (configure.ac cleanup)
+    Tobias Frost
+        (strip timestamps from examples to enable reproducible builds)
+    James Morris
+        (checkmk regex update for Solaris support)
+    Mick Beaver
+        (Visual Studio 2015 build fixes)
+    Jan Pokorny
+        (corner case segfault fix)
+    Dotsenko Andrey Nikolaevich
+        (floating point comparison macros)
+    bel2125
+        (AppVeyor build with multiple Visual Studio versions,
+         test source code compliance to C89/C90 standard,
+         substitution functions for floating point functions missing
+         in older C standard libraries)
 
 Anybody who has contributed code to Check or Check's build system is
-considered an author.  Send patches to this file to 
-<check-devel at lists dot sourceforge dot net>.
+considered an author.  Submit a pull request of this file or send
+a patch to <check-devel at lists dot sourceforge dot net>.
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0d66a5d
--- /dev/null
@@ -0,0 +1,368 @@
+#
+# Check: a unit test framework for C
+#
+# Copyright (C) 2011 Mateusz Loskot
+# Copyright (C) 2001, 2002 Arien Malec
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+project(check C)
+
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+macro(extract_version file setting_name)
+  file(STRINGS ${file} VERSION_NUMBER REGEX "^${setting_name}")
+  string(REPLACE "=" ";" VERSION_NUMBER_LIST ${VERSION_NUMBER})
+  list(GET VERSION_NUMBER_LIST 1 ${setting_name})
+endmacro(extract_version)
+
+extract_version(configure.ac CHECK_MAJOR_VERSION)
+extract_version(configure.ac CHECK_MINOR_VERSION)
+extract_version(configure.ac CHECK_MICRO_VERSION)
+
+set(CHECK_VERSION
+  "${CHECK_MAJOR_VERSION}.${CHECK_MINOR_VERSION}.${CHECK_MICRO_VERSION}")
+
+set(MEMORY_LEAKING_TESTS_ENABLED 1)
+
+###############################################################################
+# Set build features
+set(CMAKE_BUILD_TYPE Debug)
+
+###############################################################################
+# Option
+option(CHECK_ENABLE_TESTS
+  "Enable the compilation and running of Check's unit tests" ON)
+
+###############################################################################
+# Check system and architecture
+if(WIN32)
+  if(MSVC60)
+    set(WINVER 0x0400)
+  else()
+    set(WINVER 0x0500)
+  endif()
+  set(_WIN32_WINNT ${WINVER})
+endif(WIN32)
+
+if(MSVC)
+  add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+  add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
+endif(MSVC)
+
+###############################################################################
+include(CheckCSourceCompiles)
+include(CheckCSourceRuns)
+include(CheckFunctionExists)
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckLibraryExists)
+include(CheckStructMember)
+include(CheckSymbolExists)
+include(CheckTypeExists)
+include(CheckTypeSize)
+
+###############################################################################
+# Check headers
+set(INCLUDES "")
+macro(ck_check_include_file header var)
+  check_include_files("${INCLUDES};${header}" ${var})
+  if(${var})
+    set(INCLUDES ${INCLUDES} ${header})
+  endif(${var})
+endmacro(ck_check_include_file)
+
+# Some FreeBSD headers assume sys/types.h was already included.
+ck_check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
+
+# Alphabetize the rest unless there's a compelling reason
+ck_check_include_file("errno.h" HAVE_ERRNO_H)
+ck_check_include_file("inttypes.h" HAVE_INTTYPES_H)
+ck_check_include_file("limits.h" HAVE_LIMITS_H)
+ck_check_include_file("regex.h" HAVE_REGEX_H)
+ck_check_include_file("signal.h" HAVE_SIGNAL_H)
+ck_check_include_file("stdarg.h" HAVE_STDARG_H)
+ck_check_include_file("stdint.h" HAVE_STDINT_H)
+ck_check_include_file("stdlib.h" HAVE_STDLIB_H)
+ck_check_include_file("string.h" HAVE_STRING_H)
+ck_check_include_file("strings.h" HAVE_STRINGS_H)
+ck_check_include_file("sys/time.h" HAVE_SYS_TIME_H)
+ck_check_include_file("time.h" HAVE_TIME_H)
+
+###############################################################################
+# Check functions
+check_function_exists(fork HAVE_FORK)
+check_function_exists(getline HAVE_GETLINE)
+check_function_exists(getpid HAVE_GETPID)
+check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
+check_function_exists(localtime_r HAVE_DECL_LOCALTIME_R)
+check_function_exists(malloc HAVE_MALLOC)
+check_function_exists(mkstemp HAVE_MKSTEMP)
+check_function_exists(realloc HAVE_REALLOC)
+check_function_exists(setenv HAVE_DECL_SETENV)
+check_function_exists(sigaction HAVE_SIGACTION)
+check_function_exists(strdup HAVE_DECL_STRDUP)
+check_function_exists(strsignal HAVE_DECL_STRSIGNAL)
+check_function_exists(_getpid HAVE__GETPID)
+check_function_exists(_strdup HAVE__STRDUP)
+if (HAVE_REGEX_H)
+  check_function_exists(regcomp HAVE_REGCOMP)
+  check_function_exists(regexec HAVE_REGEXEC)
+endif()
+
+# printf related checks
+check_function_exists(snprintf HAVE_SNPRINTF_FUNCTION)
+check_function_exists(vsnprintf HAVE_VSNPRINTF_FUNCTION)
+check_symbol_exists(snprintf stdio.h HAVE_SNPRINTF_SYMBOL)
+check_symbol_exists(vsnprintf stdio.h HAVE_VSNPRINTF_SYMBOL)
+
+if(NOT HAVE_SNPRINTF_FUNCTION AND NOT HAVE_SNPRINTF_SYMBOL)
+    add_definitions(-Dsnprintf=rpl_snprintf)
+    set(snprintf rpl_snprintf)
+    add_definitions(-Dvsnprintf=rpl_vsnprintf)
+    set(vsnprintf rpl_vsnprintf)
+else(NOT HAVE_SNPRINTF_FUNCTION AND NOT HAVE_SNPRINTF_SYMBOL)
+    set(HAVE_SNPRINTF 1)
+    add_definitions(-DHAVE_SNPRINTF=1)
+    set(HAVE_VSNPRINTF 1)
+    add_definitions(-DHAVE_VSNPRINTF=1)
+endif(NOT HAVE_SNPRINTF_FUNCTION AND NOT HAVE_SNPRINTF_SYMBOL)
+
+if(HAVE_FORK)
+    add_definitions(-DHAVE_FORK=1)
+    set(HAVE_FORK 1)
+else(HAVE_FORK)
+    add_definitions(-DHAVE_FORK=0)
+    set(HAVE_FORK 0)
+endif(HAVE_FORK)
+
+if(HAVE_MKSTEMP)
+    add_definitions(-DHAVE_MKSTEMP=1)
+    set(HAVE_MKSTEMP 1)
+else(HAVE_MKSTEMP)
+    add_definitions(-DHAVE_MKSTEMP=0)
+    set(HAVE_MKSTEMP 0)
+endif(HAVE_MKSTEMP)
+
+if(HAVE_REGEX_H AND HAVE_REGCOMP AND HAVE_REGEXEC)
+    add_definitions(-DHAVE_REGEX=1)
+    set(HAVE_REGEX 1)
+    add_definitions(-DENABLE_REGEX=1)
+    set(ENABLE_REGEX 1)
+endif()
+
+
+###############################################################################
+# Check defines
+set(headers "limits.h")
+
+if(HAVE_STDINT_H)
+  list(APPEND headers "stdint.h")
+endif(HAVE_STDINT_H)
+
+if(HAVE_INTTYPES_H)
+  list(APPEND headers "inttypes.h")
+endif(HAVE_INTTYPES_H)
+
+check_symbol_exists(INT64_MAX "${headers}" HAVE_INT64_MAX)
+check_symbol_exists(INT64_MIN "${headers}" HAVE_INT64_MIN)
+check_symbol_exists(UINT32_MAX "${headers}" HAVE_UINT32_MAX)
+check_symbol_exists(UINT64_MAX "${headers}" HAVE_UINT64_MAX)
+check_symbol_exists(SIZE_MAX "${headers}" HAVE_SIZE_MAX)
+check_symbol_exists(SSIZE_MAX "limits.h"   HAVE_SSIZE_MAX)
+
+###############################################################################
+# Check struct members
+
+# Check for  tv_sec in struct timeval
+if(NOT HAVE_SYS_TIME_H)
+    if(MSVC)
+        check_struct_member("struct timeval" tv_sec "Winsock2.h" HAVE_STRUCT_TIMEVAL_TV_SEC)
+        check_struct_member("struct timeval" tv_usec "Winsock2.h" HAVE_STRUCT_TIMEVAL_TV_USEC)
+        check_struct_member("struct timespec" tv_sec "Winsock2.h" HAVE_WINSOCK2_H_STRUCT_TIMESPEC_TV_SEC)
+        check_struct_member("struct timespec" tv_sec "time.h" HAVE_TIME_H_STRUCT_TIMESPEC_TV_SEC)
+        check_struct_member("struct itimerspec" it_value "Winsock2.h" HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
+
+        if(NOT HAVE_WINSOCK2_H_STRUCT_TIMESPEC_TV_SEC AND NOT HAVE_TIME_H_STRUCT_TIMESPEC_TV_SEC)
+            add_definitions(-DSTRUCT_TIMESPEC_DEFINITION_MISSING=1)
+            set(STRUCT_TIMESPEC_DEFINITION_MISSING 1)
+        endif(NOT HAVE_WINSOCK2_H_STRUCT_TIMESPEC_TV_SEC AND NOT HAVE_TIME_H_STRUCT_TIMESPEC_TV_SEC)
+
+        if(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
+            add_definitions(-DSTRUCT_ITIMERSPEC_DEFINITION_MISSING=1)
+            set(STRUCT_ITIMERSPEC_DEFINITION_MISSING 1)
+        endif(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
+    endif(MSVC)
+endif(NOT HAVE_SYS_TIME_H)
+
+# OSX has sys/time.h, but it still lacks itimerspec
+if(HAVE_SYS_TIME_H)
+    check_struct_member("struct itimerspec" it_value "sys/time.h" HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
+    if(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
+        add_definitions(-DSTRUCT_ITIMERSPEC_DEFINITION_MISSING=1)
+        set(STRUCT_ITIMERSPEC_DEFINITION_MISSING 1)
+    endif(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
+endif(HAVE_SYS_TIME_H)
+
+###############################################################################
+# Check for integer types
+check_type_size("short" SIZE_OF_SHORT)
+check_type_size("int" SIZE_OF_INT)
+check_type_size("long" SIZE_OF_LONG)
+check_type_size("long long" SIZE_OF_LONG_LONG)
+
+check_type_size("unsigned short" SIZE_OF_UNSIGNED_SHORT)
+check_type_size("unsigned" SIZE_OF_UNSIGNED)
+check_type_size("unsigned long" SIZE_OF_UNSIGNED_LONG)
+check_type_size("unsigned long long" SIZE_OF_UNSIGNED_LONG_LONG)
+
+check_type_size("__int64" __INT64)
+check_type_size("unsigned __int64" UNSIGNED___INT64)
+
+check_type_size(int16_t INT16_T)
+check_type_size(int32_t INT32_T)
+check_type_size(int64_t INT64_T)
+check_type_size(intmax_t INTMAX_T)
+check_type_size(uint8_t UINT8_T)
+check_type_size(uint16_t UINT16_T)
+check_type_size(uint32_t UINT32_T)
+check_type_size(uint64_t UINT64_T)
+check_type_size(uintmax_t UINTMAX_T)
+
+#
+set(CMAKE_EXTRA_INCLUDE_FILES time.h)
+check_type_size(clock_t CLOCK_T)
+if(NOT HAVE_CLOCK_T)
+  set(clock_t int)
+endif(NOT HAVE_CLOCK_T)
+unset(CMAKE_EXTRA_INCLUDE_FILES)
+#
+set(CMAKE_EXTRA_INCLUDE_FILES time.h)
+check_type_size(clockid_t CLOCKID_T)
+if(NOT HAVE_CLOCKID_T)
+  set(clockid_t int)
+endif(NOT HAVE_CLOCKID_T)
+unset(CMAKE_EXTRA_INCLUDE_FILES)
+#
+check_type_size(size_t SIZE_T)
+if(NOT HAVE_SIZE_T)
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+    set(size_t "uint64_t")
+  else("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+    set(size_t   "uint32_t")
+  endif("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+endif(NOT HAVE_SIZE_T)
+#
+check_type_size(ssize_t SSIZE_T)
+if(NOT HAVE_SSIZE_T)
+  if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+    set(ssize_t "int64_t")
+  else("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+    set(ssize_t "long")
+  endif("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
+endif(NOT HAVE_SSIZE_T)
+#
+check_type_size(pid_t PID_T)
+if(NOT HAVE_PID_T)
+  if(WIN32)
+    set(pid_t "int")
+  else(WIN32)
+    MESSAGE(FATAL_ERROR "pid_t doesn't exist on this platform?")
+  endif(WIN32)
+endif(NOT HAVE_PID_T)
+#
+set(CMAKE_EXTRA_INCLUDE_FILES time.h)
+check_type_size(timer_t TIMER_T)
+if(NOT HAVE_TIMER_T)
+  set(timer_t int)
+endif(NOT HAVE_TIMER_T)
+unset(CMAKE_EXTRA_INCLUDE_FILES)
+
+###############################################################################
+# Check libraries
+
+check_library_exists(m floor "" HAVE_LIBM)
+if (HAVE_LIBM)
+    set (LIBM "m")
+endif (HAVE_LIBM)
+
+check_library_exists(rt clock_gettime "" HAVE_LIBRT)
+if (HAVE_LIBRT)
+    set(LIBRT "rt")
+    ADD_DEFINITIONS(-DHAVE_LIBRT=1)
+endif (HAVE_LIBRT)
+
+check_library_exists(subunit subunit_test_start "" HAVE_SUBUNIT)
+if (HAVE_SUBUNIT)
+    set(SUBUNIT "subunit")
+    set(ENABLE_SUBUNIT 1)
+    add_definitions(-DENABLE_SUBUNIT=1)
+else(HAVE_SUBUNIT)
+    set(ENABLE_SUBUNIT 0)
+    add_definitions(-DENABLE_SUBUNIT=0)
+endif (HAVE_SUBUNIT)
+
+###############################################################################
+# Generate "config.h" from "cmake/config.h.cmake"
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in
+  ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+add_definitions(-DHAVE_CONFIG_H)
+set(CONFIG_HEADER ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_stdint.h.in
+  ${CMAKE_CURRENT_BINARY_DIR}/check_stdint.h)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/check_stdint.h DESTINATION include)
+
+###############################################################################
+# Subdirectories
+add_subdirectory(lib)
+add_subdirectory(src)
+
+###############################################################################
+# Unit tests
+if (CHECK_ENABLE_TESTS)
+  add_subdirectory(tests)
+  enable_testing()
+  add_test(NAME check_check COMMAND check_check)
+  add_test(NAME check_check_export COMMAND check_check_export)
+
+  # Only offer to run shell scripts if we may have a working interpreter
+  if(UNIX OR MINGW OR MSYS)
+    add_test(NAME test_output.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_output.sh)
+    add_test(NAME test_log_output.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_log_output.sh)
+    add_test(NAME test_xml_output.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_xml_output.sh)
+    add_test(NAME test_tap_output.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_tap_output.sh)
+    add_test(NAME test_check_nofork.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_check_nofork.sh)
+    add_test(NAME test_check_nofork_teardown.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_check_nofork_teardown.sh)
+    add_test(NAME test_set_max_msg_size.sh
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
+      COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_set_max_msg_size.sh)
+  endif(UNIX OR MINGW OR MSYS)
+endif()
index 3a601cd..689437e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,77 @@
+IT IS NOT NECESSARY TO UPDATE THIS FILE.
+
+PLEASE MAKE SURE TO LEAVE A GOOD SVN COMMIT MESSAGE.
+
+2010-04-08  Micah Cowan  <micah@cowan.name>
+
+       * configure.ac: Determine at configure time, how many
+       backslashes are needed in the second argument to Awk's built-in
+       "gsub" function in order to generate two backslashes.
+
+       * checkmk/checkmk.in: Replaced POSIX character-classes
+       with (roughly) equivalent character groups from pre-POSIX
+       syntax, to support pre-POSIX awk implementations.
+       (string_encode): Use configure-substituted AWK_GSUB_DBL_BSLASH
+       to determine how to substitute a doubled backslash in gsub.
+
+2010-04-03  Micah Cowan  <micah@cowan.name>
+
+       * checkmk/*: Added Awk program "checkmk", for eliminating
+       boilerplate work when writing unit test modules. Includes
+       documentation and tests.
+
+       * Makefile.am (SUBDIRS): Added checkmk.
+
+       * configure.ac: Added extra awk-detection logic for checkmk.
+
+       * NEWS: Updated with news about checkmk.
+
+       * AUTHORS (Patches): Added myself.
+
+2010-02-17  Jose E. Marchesi  <jemarch@gnu.org>
+
+       * tests/check_check_selective.c (make_selective_suite): New
+       function.
+       (selective_setup): New function.
+       (selective_teardown): New function.
+       New tests 'test_srunner_run_run_all, 'test_srunner_run_suite',
+       'test_srunner_run_no_suite', test_srunner_run_tcase',
+       'test_srunner_no_tcase', 'test_srunner_suite_tcase',
+       'test_srunner_suite_no_tcase', 'test_srunner_run_suite_env',
+       'test_srunner_run_no_suite_env', 'test_srunner_run_tcase_env',
+       'test_srunner_run_no_tcase_env', 'test_srunner_suite_tcase_env',
+       'test_srunner_suite_no_tcase_env'.
+
+       * tests/Makefile.am (check_check_SOURCES): Add
+       'check_check_selective.c'.
+
+       * tests/check_check_selective.c: New file.
+
+       * tests/check_check_main.c (main): Add the selective_suite to the
+       master suite.
+
+2010-02-10  Jose E. Marchesi  <jemarch@gnu.org>
+
+       * doc/check.texi (SRunner Output): Document 'srunner_run' and the
+       usage of CK_RUN_CASE and CK_RUN_SUITE environment variables.
+
+       * src/check_run.c (srunner_run): Use values of environment
+       variables CK_RUN_CASE and CK_RUN_SUITE.
+
+2010-02-02  Jose E. Marchesi  <jemarch@gnu.org>
+
+       * src/check.c (suite_tcase): New function that determines whether
+       a a given test suite contains a test case named after a given
+       string.
+
+       * src/check_run.c (srunner_run): New function, renamed from
+       'srunner_run_all', allowing selective running of an specific test
+       suite and/or test case.
+       (srunner_run_all): New function, invoking srunner_run internally
+       to provide backwards compatibility.
+
+       * src/check.h.in: Add prototype for srunner_run.
+
 2005-12-16 hugo303
 
        * src/check_pack.c: Fixed buggy eprintf string.
diff --git a/ChangeLogOld b/ChangeLogOld
deleted file mode 100644 (file)
index ed78fcf..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-Revisions previous to move to SourceForge
-2001-05-25 05:56  amalec
-
-       * src/check_msg.c, src/check_msg.h, tests/Makefile.am,
-       tests/check_check_msg.c: Added testcases for check_msg
-
-2001-05-25 05:25  amalec
-
-       * ChangeLog: Update ChangeLog
-
-2001-05-25 05:25  amalec
-
-       * configure, src/Makefile.am, src/check.c, src/check.h,
-       src/check_impl.h, src/check_run.c, src/check_run.h,
-       tests/check_check.c, tests/check_list.c, tests/check_stress.c:
-       Added fixture support and moved suite running functions to main
-       check.h header
-
-2001-05-23 20:29  amalec
-
-       * ChangeLog, configure.in: Bumped version
-
-2001-05-23 20:28  amalec
-
-       * src/check.h, src/check_impl.h, src/check_msg.c, src/check_msg.h,
-       src/check_run.c, src/check_run.h, tests/check_check.c,
-       tests/check_list.c, tests/check_stress.c: Changed check_check to
-       run silently if no errors
-
-2001-05-22 16:15  amalec
-
-       * src/Makefile.am, tests/Makefile.am: Cleanup of move to a non-flat
-       directory structure
-
-2001-05-22 16:15  amalec
-
-       * Makefile.am, Makefile.in, check.c, check.h, check_check.c,
-       check_impl.h, check_list.c, check_msg.c, check_msg.h, check_run.h,
-       configure, configure.in, error.c, error.h, list.c, list.h,
-       src/check.c, src/check.h, src/check_impl.h, src/check_msg.c,
-       src/check_msg.h, src/check_run.c, src/check_run.h, src/error.c,
-       src/error.h, src/list.c, src/list.h, tests/check_check.c,
-       tests/check_list.c, tests/check_stress.c: Moved to a non-flat
-       directory structure
-
-2001-05-22 14:53  amalec
-
-       * ChangeLog: Update ChangeLog
-
-2001-05-22 14:52  amalec
-
-       * Makefile.am, Makefile.in, check.c, check.h, check_check.c,
-       check_list.c, check_run.h, config.h.in, configure, configure.in,
-       error.c, error.h, list.c: Switched to a dynamically grown array
-       implementation for lists, to solve a performance problem forking
-       with large numbers of tests; fixed a memory problem in srunner_free
-
-2001-05-18 12:31  amalec
-
-       * ChangeLog: Useing cvs2cl.pl to handle ChangeLog
-
-2001-05-18 12:02  amalec
-
-       * check_run.h, configure, stamp-h.in: More code reorgazization
-
-2001-05-16 11:20  amalec
-
-       * check.c, check_check.c, check_msg.c, check_msg.h, check_run.h,
-       configure.in: Cleaned up memory leaks and rearranged some
-       responsibilities
-
-2001-05-15 17:36  amalec
-
-       * check.c, check.h, check_check.c, check_impl.h, check_list.c,
-       check_msg.c, check_msg.h, check_run.h: Addition of SRunner object,
-       and major reorganization of responsibilites between suites/cases
-       and the SRunner
-
-2001-05-15 15:11  amalec
-
-       * list.c: Added list_add_end function
-
-2001-05-15 09:20  amalec
-
-       * Makefile.am, Makefile.in: Cleaned up Makefile.am to declare
-       headers correctly, and install correctly.
-
-2001-05-14 18:06  amalec
-
-       * check.c, check.h, check_impl.h, check_run.h: Completed
-       reorganization
-
-2001-05-14 17:33  amalec
-
-       * Makefile.in, check.c, check_run.h: Complete commit of last
-       changes
-
-2001-05-14 17:30  amalec
-
-       * Makefile.am, check.h, check_check.c, check_list.c, check_run.h:
-       Cleaned up some documentation, and moved suite printing functions
-       to a separate module as a first step to separating the text runner
-       from the underlying interface.
-
-2001-05-14 17:07  amalec
-
-       * AUTHORS, ChangeLog, Makefile.am, Makefile.in, NEWS, README,
-       aclocal.m4, check.c, check.h, check_check.c, check_impl.h,
-       check_list.c, check_msg.c, check_msg.h, config.h.in, configure,
-       configure.in, error.c, error.h, list.c, list.h, stamp-h.in: Initial
-       revision
-
-2001-05-14 17:07  amalec
-
-       * AUTHORS, ChangeLog, Makefile.am, Makefile.in, NEWS, README,
-       aclocal.m4, check.c, check.h, check_check.c, check_impl.h,
-       check_list.c, check_msg.c, check_msg.h, config.h.in, configure,
-       configure.in, error.c, error.h, list.c, list.h, stamp-h.in:
-       Imported sources
-
diff --git a/INSTALL b/INSTALL
index 8b82ade..2099840 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,19 +1,25 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
 
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
 
 Basic Installation
 ==================
 
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -42,7 +48,7 @@ may remove or edit it.
 you want to change it or regenerate `configure' using a newer version
 of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
      `./configure' to configure the package for your system.
@@ -53,12 +59,22 @@ The simplest way to compile this package is:
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -67,8 +83,15 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
 
 Compilers and Options
 =====================
@@ -93,7 +116,8 @@ same time, by placing the object files for each architecture in their
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
 
    With a non-GNU `make', it is safer to compile the package for one
 architecture at a time in the source code directory.  After you have
@@ -120,7 +144,8 @@ Installation Names
    By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
@@ -131,15 +156,46 @@ Documentation and other data files still use the regular prefix.
    In addition, if you use an unusual directory layout you can give
 options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -152,6 +208,13 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
 Particular systems
 ==================
 
@@ -159,10 +222,15 @@ Particular systems
 CC is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
-     ./configure CC="cc -Ae"
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
 parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
 a workaround.  If GNU CC is not installed, it is therefore recommended
@@ -174,6 +242,16 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
@@ -189,7 +267,8 @@ type, such as `sun4', or a canonical name which has the form:
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
@@ -230,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
 overridden in the site shell script).
 
 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
 
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
@@ -277,7 +357,7 @@ operates.
      `configure' can determine that directory automatically.
 
 `--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
+     Use DIR as the installation prefix.  *note Installation Names::
      for more details, including other options available for fine-tuning
      the installation locations.
 
@@ -288,4 +368,3 @@ operates.
 
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
-
index 8815c65..27d2531 100644 (file)
@@ -2,7 +2,7 @@
 
 ## run tests after everything else
 
-SUBDIRS = lib src doc . tests
+SUBDIRS = lib src doc . checkmk tests
 
 ## FIXME: maybe we don't need this line
 
@@ -16,11 +16,15 @@ CLEANFILES = *~\
 
 ## what additional things to distribute
 
-EXTRA_DIST = SVNChangeLog ChangeLogOld check.pc.in $(m4data_DATA)
+include_HEADERS = check_stdint.h
+
+EXTRA_DIST = check.pc.in $(m4data_DATA) xml/check_unittest.xslt \
+       CMakeLists.txt src/CMakeLists.txt tests/CMakeLists.txt lib/CMakeLists.txt \
+       cmake
 
 ## install docs
 docdir = $(datadir)/doc/$(PACKAGE)
-doc_DATA = SVNChangeLog ChangeLog ChangeLogOld NEWS README COPYING.LESSER
+doc_DATA = ChangeLog NEWS README COPYING.LESSER
 
 ## install check.m4 with AM_PATH_CHECK in it
 m4datadir = $(datadir)/aclocal
@@ -30,88 +34,25 @@ m4data_DATA = check.m4
 pcdatadir = $(libdir)/pkgconfig
 pcdata_DATA = check.pc
 
-SVNChangeLog:
-       if [ -e .svn ] ; then \
-       svn log -v @abs_top_srcdir@ > $@ ;\
-       else \
-       echo "SVN Changelog not available" > $@ ;\
-       fi
+DISTCLEANFILES = check_stdint.h
 
 ACLOCAL_AMFLAGS = -I m4
 
-doc/check.html:
-       $(MAKE) -C doc check.html
+README:
+       fgrep -v "Build Status]" $(top_srcdir)/README.md > $@
+
+doc/check_html:
+       $(MAKE) -C doc check_html
+
+doc/doxygen:
+       $(MAKE) -C doc doxygen
 
 # check we can do a clean build, including docs.
 # perhaps we should check for out of date (svn st -u) and modified files.
-prereleasecheck: doc/check.html
+prereleasecheck: doc/check_html doc/doxygen
        -$(MAKE) distclean
        autoreconf -i && ./configure \
            && ulimit -c 0 && \
            $(MAKE) distcheck
 
-RELEASE_VERSION ?= unset
-SF_USERNAME ?= unset
-releasevars:
-       @if [ "unset" = "${RELEASE_VERSION}" ]; then \
-           echo "set RELEASE_VERSION to something like 0.9.6 to prepare a release."; \
-           false; \
-       fi
-       @if [ "unset" = "${SF_USERNAME}" ]; then \
-           echo "set SF_USERNAME to your sourceforge username"; \
-           false; \
-       fi
-
-.svnrelease:
-       svn st -u | grep "Status against revision:" | awk '{ print $$4 }' > $@
-
-preparerelease: releasevars .svnrelease prereleasecheck
-       @echo checking we have can connect properly to do release tasks before tagging:
-       sftp -b /dev/null ${SF_USERNAME}@web.sourceforge.net
-       sftp -b /dev/null ${SF_USERNAME}@frs.sourceforge.net
-       @echo tagging release from `cat .svnrelease`
-       svn cp -m "Release check-${RELEASE_VERSION}" -r`cat .svnrelease` https://svn.sourceforge.net/svnroot/check/trunk https://svn.sourceforge.net/svnroot/check/tags/check-${RELEASE_VERSION}
-       svn co https://svn.sourceforge.net/svnroot/check/tags/check-${RELEASE_VERSION} check-${RELEASE_VERSION}
-       @echo "You need to:"
-       @echo "Update TODO and make sure version numbers match appropriately."
-       @echo "Update configure.ac with new version numbers."
-       @echo "Then svn commit these changes."
-       @echo "CTRL-D when finished or 'exit 1' to abort."
-       @echo "aborting will leave the partially prepared release in" `pwd`
-       cd check-${RELEASE_VERSION} && ${SHELL} && autoreconf -i && ./configure
-       $(MAKE) -C check-${RELEASE_VERSION} dorelease
-       -svn merge -r`cat .svnrelease`:`svn st -u check-${RELEASE_VERSION} | grep "Status against revision:" | awk '{ print $4 }'` check-${RELEASE_VERSION} .
-       @echo "Please resolve any conflicts. Be sure to also restore the 'In Development:' line to NEWS."
-       ${SHELL}
-       svn ci -m "Merge back release ${RELEASE_VERSION}"
-       @echo "Cleaning up workdir."
-       rm -rf check-${RELEASE_VERSION}
-
-
-dorelease: releasevars doc/check.html prereleasecheck
-       cp NEWS NEWS-${RELEASE_VERSION}.txt
-       @echo "You need to:"
-       @echo "cut out old release news from NEWS-${RELEASE_VERSION}.txt."
-       @echo "CTRL-D to complete, or exit 1 to abort."
-       ${SHELL}
-       @echo uploading...
-       rsync -e ssh NEWS-${RELEASE_VERSION}.txt ${SF_USERNAME},check@frs.sourceforge.net:/home/frs/project/c/ch/check/check/${RELEASE_VERSION}/
-       rsync -e ssh check-${RELEASE_VERSION}.tar.gz ${SF_USERNAME},check@frs.sourceforge.net:/home/frs/project/c/ch/check/check/${RELEASE_VERSION}/
-       rsync -rlvC doc/. ${SF_USERNAME},check@web.sourceforge.net:/home/groups/c/ch/check/htdocs
-       @echo
-       @echo Uploaded...
-       @echo "visit https://sourceforge.net/project/admin/explorer.php?group_id=28255"
-       @echo "Mark the NEWS file in check/${RELEASE_VERSION} as being a release note."
-       @echo "And the tar.gz file as being 'all platforms', using the NEWS file for release notes."
-       @echo "visit https://sourceforge.net/projects/check/files/"
-       @echo "Check it looks ok. It may take 15 minutes to show up."
-       @echo Finally, mail check-devel ,announce and users at lists dot sourceforge dot net
-       @echo an email (template is in HACKING) about this announcement.
-       @echo NEWS-release can be found at `pwd`/NEWS-${RELEASE_VERSION}.txt
-       @echo Note that with the tarballs, docs amd NEWS up, the release is done :P
-       @echo "so you'll have to manually roll back if you abort."
-       @echo "CTRL-D to complete, or exit 1 to abort."
-       ${SHELL}
-       
-
-.PHONY: releasevars prereleasecheck preparerelease dorelease .svnrelease
+.PHONY: prereleasecheck
index 787456e..d36f733 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 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.
+# Copyright (C) 1994-2014 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.
 
 @SET_MAKE@
 
+
 VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -33,71 +90,168 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/check.pc.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS \
-       COPYING.LESSER ChangeLog INSTALL NEWS THANKS TODO \
-       build-aux/compile build-aux/config.guess build-aux/config.sub \
-       build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
-       build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
        $(top_srcdir)/m4/ax_c_check_flag.m4 \
-       $(top_srcdir)/m4/ax_cflags_warn_all_ansi.m4 \
-       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+       $(top_srcdir)/m4/librt_timers.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = check.pc
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-dvi-recursive install-exec-recursive \
-       install-html-recursive install-info-recursive \
-       install-pdf-recursive install-ps-recursive install-recursive \
-       installcheck-recursive installdirs-recursive pdf-recursive \
-       ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 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__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(m4datadir)" \
-       "$(DESTDIR)$(pcdatadir)"
-docDATA_INSTALL = $(INSTALL_DATA)
-m4dataDATA_INSTALL = $(INSTALL_DATA)
-pcdataDATA_INSTALL = $(INSTALL_DATA)
+       "$(DESTDIR)$(pcdatadir)" "$(DESTDIR)$(includedir)"
 DATA = $(doc_DATA) $(m4data_DATA) $(pcdata_DATA)
+HEADERS = $(include_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+       cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+       $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/check.pc.in \
+       $(srcdir)/config.h.in AUTHORS COPYING.LESSER ChangeLog INSTALL \
+       NEWS README THANKS TODO ar-lib compile config.guess config.sub \
+       install-sh ltmain.sh missing
 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); }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+AWK_GSUB_DBL_BSLASH = @AWK_GSUB_DBL_BSLASH@
+AWK_PATH = @AWK_PATH@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -110,20 +264,25 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_REGEX = @ENABLE_REGEX@
 ENABLE_SUBUNIT = @ENABLE_SUBUNIT@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILTERDIFF = @FILTERDIFF@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
 GENHTML = @GENHTML@
 GREP = @GREP@
+HAVE_FORK = @HAVE_FORK@
+HAVE_REGEX = @HAVE_REGEX@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -134,11 +293,16 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBSUBUNIT_CFLAGS = @LIBSUBUNIT_CFLAGS@
+LIBSUBUNIT_LIBS = @LIBSUBUNIT_LIBS@
+LIBSUBUNIT_PC = @LIBSUBUNIT_PC@
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -151,8 +315,12 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -167,6 +335,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 acx_pthread_config = @acx_pthread_config@
@@ -200,7 +369,6 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -208,6 +376,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -216,39 +385,43 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = lib src doc . tests
+SUBDIRS = lib src doc . checkmk tests
 AM_MAKEINFOFLAGS = -I$(top_srcdir)/doc/example
 CLEANFILES = *~\
        $(PACKAGE)-$(VERSION).tar.gz\
        ChangeLog.bak
 
-EXTRA_DIST = SVNChangeLog ChangeLogOld check.pc.in $(m4data_DATA)
-doc_DATA = SVNChangeLog ChangeLog ChangeLogOld NEWS README COPYING.LESSER
+include_HEADERS = check_stdint.h
+EXTRA_DIST = check.pc.in $(m4data_DATA) xml/check_unittest.xslt \
+       CMakeLists.txt src/CMakeLists.txt tests/CMakeLists.txt lib/CMakeLists.txt \
+       cmake
+
+doc_DATA = ChangeLog NEWS README COPYING.LESSER
 m4datadir = $(datadir)/aclocal
 m4data_DATA = check.m4
 pcdatadir = $(libdir)/pkgconfig
 pcdata_DATA = check.pc
+DISTCLEANFILES = check_stdint.h
 ACLOCAL_AMFLAGS = -I m4
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh:
+am--refresh: Makefile
        @:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnits '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnits  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnits'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnits \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnits  Makefile
-.PRECIOUS: Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -263,21 +436,20 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-       else :; fi
+       @test -f $@ || rm -f stamp-h1
+       @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in:  $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -296,73 +468,109 @@ distclean-libtool:
        -rm -f libtool config.lt
 install-docDATA: $(doc_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
-       @list='$(doc_DATA)'; for p in $$list; do \
+       @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+       fi; \
+       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"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
        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
+       @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
 install-m4dataDATA: $(m4data_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
-       @list='$(m4data_DATA)'; for p in $$list; do \
+       @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(m4datadir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(m4datadir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \
-         $(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \
        done
 
 uninstall-m4dataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(m4data_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \
-         rm -f "$(DESTDIR)$(m4datadir)/$$f"; \
-       done
+       @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(m4datadir)'; $(am__uninstall_files_from_dir)
 install-pcdataDATA: $(pcdata_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pcdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pcdatadir)"
-       @list='$(pcdata_DATA)'; for p in $$list; do \
+       @list='$(pcdata_DATA)'; test -n "$(pcdatadir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pcdatadir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pcdatadir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(pcdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pcdatadir)/$$f'"; \
-         $(pcdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pcdatadir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pcdatadir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pcdatadir)" || exit $$?; \
        done
 
 uninstall-pcdataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pcdata_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pcdatadir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pcdatadir)/$$f"; \
+       @list='$(pcdata_DATA)'; test -n "$(pcdatadir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(pcdatadir)'; $(am__uninstall_files_from_dir)
+install-includeHEADERS: $(include_HEADERS)
+       @$(NORMAL_INSTALL)
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
        done
 
+uninstall-includeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -370,65 +578,20 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-$(RECURSIVE_CLEAN_TARGETS):
-       @failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -440,41 +603,59 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS) config.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 \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       list='$(SOURCES) $(HEADERS) config.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: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+       -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
        @case `sed 15q $(srcdir)/NEWS` in \
@@ -484,7 +665,7 @@ distdir: $(DISTFILES)
          exit 1;; \
        esac
        $(am__remove_distdir)
-       test -d $(distdir) || mkdir $(distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -500,66 +681,90 @@ distdir: $(DISTFILES)
          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 "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
                am__remove_distdir=: \
                am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
        done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -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)
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+       $(am__post_remove_distdir)
 
-dist-lzma: distdir
-       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-       $(am__remove_distdir)
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+       $(am__post_remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+       $(am__post_remove_distdir)
 
 dist-tarZ: distdir
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-shar: distdir
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-zip: distdir
        -rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+dist dist-all:
+       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+       $(am__post_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
@@ -567,27 +772,33 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.lzma*) \
-         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(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 -R a-w $(distdir)
+       chmod u+w $(distdir)
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
+           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -607,14 +818,24 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-       $(am__remove_distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__post_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 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
@@ -632,10 +853,10 @@ distcleancheck: distclean
               exit 1; } >&2
 check-am: all-am
 check: check-recursive
-all-am: Makefile $(DATA) config.h
+all-am: Makefile $(DATA) $(HEADERS) config.h
 installdirs: installdirs-recursive
 installdirs-am:
-       for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pcdatadir)"; do \
+       for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pcdatadir)" "$(DESTDIR)$(includedir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-recursive
@@ -648,10 +869,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 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
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -659,6 +885,8 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -679,26 +907,39 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
-install-data-am: install-docDATA install-m4dataDATA install-pcdataDATA
+install-data-am: install-docDATA install-includeHEADERS \
+       install-m4dataDATA install-pcdataDATA
 
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -719,112 +960,53 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-docDATA uninstall-m4dataDATA \
-       uninstall-pcdataDATA
+uninstall-am: uninstall-docDATA uninstall-includeHEADERS \
+       uninstall-m4dataDATA uninstall-pcdataDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-       install-strip
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-       all all-am am--refresh check check-am clean clean-generic \
-       clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-       dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-generic distclean-hdr distclean-libtool \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-docDATA install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am \
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+       am--refresh check check-am clean clean-cscope clean-generic \
+       clean-libtool cscope cscopelist-am ctags ctags-am dist \
+       dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+       dist-xz dist-zip distcheck distclean distclean-generic \
+       distclean-hdr distclean-libtool distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-data install-data-am \
+       install-docDATA install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am \
+       install-includeHEADERS install-info install-info-am \
        install-m4dataDATA install-man install-pcdataDATA install-pdf \
        install-pdf-am install-ps install-ps-am install-strip \
        installcheck installcheck-am installdirs installdirs-am \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags tags-recursive uninstall uninstall-am uninstall-docDATA \
-       uninstall-m4dataDATA uninstall-pcdataDATA
+       tags tags-am uninstall uninstall-am uninstall-docDATA \
+       uninstall-includeHEADERS uninstall-m4dataDATA \
+       uninstall-pcdataDATA
 
+.PRECIOUS: Makefile
 
-SVNChangeLog:
-       if [ -e .svn ] ; then \
-       svn log -v @abs_top_srcdir@ > $@ ;\
-       else \
-       echo "SVN Changelog not available" > $@ ;\
-       fi
 
-doc/check.html:
-       $(MAKE) -C doc check.html
+README:
+       fgrep -v "Build Status]" $(top_srcdir)/README.md > $@
+
+doc/check_html:
+       $(MAKE) -C doc check_html
+
+doc/doxygen:
+       $(MAKE) -C doc doxygen
 
 # check we can do a clean build, including docs.
 # perhaps we should check for out of date (svn st -u) and modified files.
-prereleasecheck: doc/check.html
+prereleasecheck: doc/check_html doc/doxygen
        -$(MAKE) distclean
        autoreconf -i && ./configure \
            && ulimit -c 0 && \
            $(MAKE) distcheck
 
-RELEASE_VERSION ?= unset
-SF_USERNAME ?= unset
-releasevars:
-       @if [ "unset" = "${RELEASE_VERSION}" ]; then \
-           echo "set RELEASE_VERSION to something like 0.9.6 to prepare a release."; \
-           false; \
-       fi
-       @if [ "unset" = "${SF_USERNAME}" ]; then \
-           echo "set SF_USERNAME to your sourceforge username"; \
-           false; \
-       fi
+.PHONY: prereleasecheck
 
-.svnrelease:
-       svn st -u | grep "Status against revision:" | awk '{ print $$4 }' > $@
-
-preparerelease: releasevars .svnrelease prereleasecheck
-       @echo checking we have can connect properly to do release tasks before tagging:
-       sftp -b /dev/null ${SF_USERNAME}@web.sourceforge.net
-       sftp -b /dev/null ${SF_USERNAME}@frs.sourceforge.net
-       @echo tagging release from `cat .svnrelease`
-       svn cp -m "Release check-${RELEASE_VERSION}" -r`cat .svnrelease` https://svn.sourceforge.net/svnroot/check/trunk https://svn.sourceforge.net/svnroot/check/tags/check-${RELEASE_VERSION}
-       svn co https://svn.sourceforge.net/svnroot/check/tags/check-${RELEASE_VERSION} check-${RELEASE_VERSION}
-       @echo "You need to:"
-       @echo "Update TODO and make sure version numbers match appropriately."
-       @echo "Update configure.ac with new version numbers."
-       @echo "Then svn commit these changes."
-       @echo "CTRL-D when finished or 'exit 1' to abort."
-       @echo "aborting will leave the partially prepared release in" `pwd`
-       cd check-${RELEASE_VERSION} && ${SHELL} && autoreconf -i && ./configure
-       $(MAKE) -C check-${RELEASE_VERSION} dorelease
-       -svn merge -r`cat .svnrelease`:`svn st -u check-${RELEASE_VERSION} | grep "Status against revision:" | awk '{ print $4 }'` check-${RELEASE_VERSION} .
-       @echo "Please resolve any conflicts. Be sure to also restore the 'In Development:' line to NEWS."
-       ${SHELL}
-       svn ci -m "Merge back release ${RELEASE_VERSION}"
-       @echo "Cleaning up workdir."
-       rm -rf check-${RELEASE_VERSION}
-
-dorelease: releasevars doc/check.html prereleasecheck
-       cp NEWS NEWS-${RELEASE_VERSION}.txt
-       @echo "You need to:"
-       @echo "cut out old release news from NEWS-${RELEASE_VERSION}.txt."
-       @echo "CTRL-D to complete, or exit 1 to abort."
-       ${SHELL}
-       @echo uploading...
-       rsync -e ssh NEWS-${RELEASE_VERSION}.txt ${SF_USERNAME},check@frs.sourceforge.net:/home/frs/project/c/ch/check/check/${RELEASE_VERSION}/
-       rsync -e ssh check-${RELEASE_VERSION}.tar.gz ${SF_USERNAME},check@frs.sourceforge.net:/home/frs/project/c/ch/check/check/${RELEASE_VERSION}/
-       rsync -rlvC doc/. ${SF_USERNAME},check@web.sourceforge.net:/home/groups/c/ch/check/htdocs
-       @echo
-       @echo Uploaded...
-       @echo "visit https://sourceforge.net/project/admin/explorer.php?group_id=28255"
-       @echo "Mark the NEWS file in check/${RELEASE_VERSION} as being a release note."
-       @echo "And the tar.gz file as being 'all platforms', using the NEWS file for release notes."
-       @echo "visit https://sourceforge.net/projects/check/files/"
-       @echo "Check it looks ok. It may take 15 minutes to show up."
-       @echo Finally, mail check-devel ,announce and users at lists dot sourceforge dot net
-       @echo an email (template is in HACKING) about this announcement.
-       @echo NEWS-release can be found at `pwd`/NEWS-${RELEASE_VERSION}.txt
-       @echo Note that with the tarballs, docs amd NEWS up, the release is done :P
-       @echo "so you'll have to manually roll back if you abort."
-       @echo "CTRL-D to complete, or exit 1 to abort."
-       ${SHELL}
-
-.PHONY: releasevars prereleasecheck preparerelease dorelease .svnrelease
 # 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/NEWS b/NEWS
index ef52353..a3b62c1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,312 @@
+Fri Oct 20, 2017: Released Check 0.12.0
+  2017-10-20 10:00:00 +0000
+  based on hash c472c743d7c9f01ae9ea6a0e8e08132251b62abd
+
+* Fix out-of-tree builds with CMake.
+  Issue #86
+
+* Fix issue found with Clang regarding invalid suffix on a literal
+  Issue #110
+  
+* Check now responds to a few errors in a more clear way when it cannot run tests.
+  PR #122, #123
+
+* Fix missing pid_t definition in check.h on Windows
+  Issue #78
+
+* The maximum message size of check assertions is now configurable.
+  Issue #127
+
+* Check support added for Visual Studios 2010, 2012, 2013, 2015, and 2017 both for x86/64 and ARM.
+  PR #129, Issue #125
+
+* Changed license of example CMake files to BSD (was previously LGPL).
+  Issue #131
+
+* Fix issue with floating point macros on MinGW
+  Issue #101
+
+
+Sat Dec 17, 2016: Released Check 0.11.0
+  2016-12-17 15:00:00 +0000
+  based on hash 7c9cfb4b13124b93a63e60b3c681c2bf4f2723ce
+
+* Avoid issue in unit test output checking where a shell's built-in printf
+  command does not work properly, but the printf program itself is correct.
+
+* Emit only valid XML characters in XML logging (assumes ASCII encoding).
+  Bug #103
+
+* Add LGPL header to files where it was missing; update FSF address in LGPL headers
+  Bug #110
+
+* Strip timestamps from examples using filterdiff if available. This
+  allow build output to be reproducible.
+  Bug #112
+
+* Use double slash for regular expressions in checkmk for better Solaris support.
+
+* Improve CMake build files for better Visual Studio 2015 support.
+  Pull Request #19
+
+* Fix potential SIGSEGV in Check related to the disk filling up during a test.
+  Pull Request #21
+
+* Support added for applying tags to test cases and selectively running
+  test cases based on tags.
+  Pull Request #44
+
+* Macros for comparing memory regions (ck_assert_mem_eq, ck_assert_mem_ne)
+  have been added.
+  Pull Request #64
+
+* Macros for comparing floating point numbers have been added.
+  Pull Request #69
+
+* Macros for comparing string, but allowing for NULL (ck_assert_pstr_eq,
+  ck_assert_pstr_ne) have been added.
+  Pull Request #80
+
+* Macros for checking if a pointer is NULL or not have been added.
+  Pull Request #87
+
+
+Sun Aug 2, 2015: Released Check 0.10.0
+  based on r1217 (2015-08-02 19:21:14 +0000)
+
+* CMake on MinGW and MSVC was unable to find time related types because
+  time.h was not included. This header is now included for the checks.
+  Patch #53.
+
+* If the test runner process catches a SIGTERM or SIGINT signal the running
+  tests are now also killed.
+  Patch #52.
+
+* If Check is compiled without support for fork(), the behavior of
+  functions which require fork() to be useful have been changed.
+  Functions that attempt to set CK_FORK mode are no-ops,
+  check_fork() returns in failure, and check_waitpid_and_exit()
+  exits in failure.
+
+* Add space around operators in assert messages for readability.
+  Bug #102.
+
+* Use mkstemp() if available instead of tmpfile() or tempnam().
+  Patch #51.
+
+* Fix issue with string formatting in ck_assert(), where using
+  the % operator would be interpreted as a string formatter. Bug #96.
+
+* In nofork mode, the location of a failed assertion within a test
+  case was lost if that test case has a checked teardown fixture
+  (even if that fixture function is empty). This is now fixed.
+  Bug #99
+
+
+Sat July 26, 2014: Released Check 0.9.14
+  based on r1174 (2014-07-03 18:43:49 +0000)
+
+* Changes to (unofficially for now) support Solaris and AIX platforms.
+
+* Fix issue with checked teardown functions in CK_NOFORK mode. If
+  the teardown function called an assertion that failed, an
+  infinate loop would result. Bug#98. As a result of the change, for now
+  checked teardown functions that fail in CK_NOFORK mode will
+  not cause the test to fail.
+
+* Allow checked fixtures when compiled without fork(). Previously
+  such setup/teardown functions were disabled, as the full contract
+  for checked fixtures could not be honored. Checked fixtures
+  in CK_NOFORK mode are now closer to the contract, and are now
+  enabled.
+
+* Various code cleanup, including changes for compiling Check on
+  c++ compilers Clang and g++ (which are less forgiving than their
+  c counterparts).
+
+* Re-enable internal unit tests, which verify which line numbers are
+  reported for unit test failures. (The tests were unintentionally
+  disabled in a previous release).
+
+
+Fri May 30, 2014: Released Check 0.9.13
+  based on r1137 (2014-05-26 21:03:09 +0000)
+
+* When a test assertion fails, exit() was invoked. This results in any
+  registered exit handlers being invoked. A test should not be relied
+  upon to clean up if it fails. Instead, _exit() will be used to signal
+  a test failure, to prevent exit handlers from being invoked.
+
+* Fix issue with string formatting in ck_assert_(u)int_* calls, where using
+  the % operator would be interpreted as a string formatter. Bug #96.
+
+* If the LOG/XML/TAP file name is set to "-" either through the
+  srunner_set_log() srunner_set_xml() or srunner_set_tap() calls
+  or through the related environment variables, the logged data will be
+  printed to stdout instead of a file. This is mainly to support using TAP
+  for fixtures which expect the results to be reported via stdout. However,
+  it is available via all of Check's logging modalities.
+
+* For CMake builds, check_stdint.h was not being installed. This is now
+  fixed.
+
+* Check's example under doc/example now also works for CMake projects
+  using Visual Studios and MSVC. This includes an example CMake
+  configuration.
+
+
+Mon Jan 20, 2014: Released Check 0.9.12
+  based on r1054 (2014-01-16 23:08:03 +0000)
+
+* Additional unit tests created for internal and external Check
+  APIs.
+
+* Check now compiled on Windows using MSVC when using CMake and
+  NMake. All unit tests pass, though shell script based ones need
+  to be run in the MSYS environment.
+
+* Check now compiles on Windows using Visual Studio 10
+  when using CMake. check_check passes when run from Visual Studios.
+
+* Always capture the start and end times of tests when using
+  NO_FORK mode. Previously the end time was not captured,
+  resulting in arbitrary durations being recorded when tests
+  failed. Bug #87.
+
+* Added additional configure script checks for support of
+  timer_create() on the target system. This allows for
+  OpenBSD to compile and run all Check's unit tests successfully. 
+
+* Added a unit test, check_mem_leaks, which can be used against
+  valgrind to test for memory leaks. No memory leaks were found.
+
+* Added tcase_add_loop_test support in checkm. Patch from patches #46. 
+
+* Add support for logging in Test Anything Protocol (TAP) format.
+
+* Refactor Check's assertions to be more like the assert() call in
+  assert.h, in that static source code analyzers can use gcc attributes
+  in the header to make assumptions about the flow of the code. See
+  feature request #29.
+
+* fix ck_assert_ptr_* causing const compilation warnings. Patch from
+  bug #91.
+
+Wed, Nov 4, 2013: Released Check 0.9.11
+  based on r856 (2013-11-04 02:09:21 +0000)
+
+* Check's unit tests pass when compiled out of the source tree.
+
+* Check compiles for Windows using the MinGW/msys environment (without using fork), and all unit tests pass.
+
+* Check compiles for Windows using the Cygwin environment, and all unit tests pass.
+
+* Check compiles for Windows using MinGW in Linux (without using fork), and all unit tests pass using wine 1.4.
+
+* Check compiles for Windows using MinGW-w64 in Linux (without using fork), and all unit tests pass using wine 1.4.
+
+* On systems without timer_settimer, use setitimer (if available) to get
+  subsecond unit test timeouts. If setitimer is unavailable, fallback
+  on alarm.
+
+Thu, Apr 18, 2013: Released Check 0.9.10
+  based on r743 (2013-04-18 11:27:03 +0200)
+
+* Support 64bit int for __ck_assert_int. Patch from bug #3599471
+
+* Add equivalent uint variants for __ck_assert_int. Patch from bug #3600433.
+
+* Detect if the system has a C99 compliant version of the printf related
+  functions for check to use, and if not use an implementation provided by
+  check.
+
+* Updated HACKING and release procedure in Makefile.am.
+
+* Detect if the system has clock_gettime() available, and if not use an
+  implementation provided by check. clock_gettime() is used to measure
+  test durations. The implementation for OSX uses OSX specific system calls 
+  to get the time. For all other systems, clock_gettime() does nothing.
+
+* Updated documentation in check.h to reference new check API.
+
+* Remove usage of deprecated fail(), fail_if(), and fail_unless() calls from
+  check's unit tests.
+
+* Fix implementation of putenv in check's libcompat for systems that do not
+  provide it.
+
+* Fix implementation of unsettenv in check's libcompat for systems that do
+  not provide it. 
+
+* Improvements to the new Check API: new comparison functions for pointers:
+  ck_assert_ptr_(eq|ne).
+
+* Test timeouts can now be in nanosecond precision. The tcase_set_timeout
+  call, and CK_DEFAULT_TIMEOUT and CK_TIMEOUT_MULTIPLIER environment
+  variables now can accept floating point arguments.
+
+* Cleanup compile warnings, patch #3579199 on SF.
+
+* Renamed Check's internal list functions to start with check_, patch #3448601 on SF.
+
+Mon, Oct 22, 2012: Released Check 0.9.9
+  based on r637 (2012-10-22 13:54:14 +0200)
+
+* Measure test duration and print in XML output.
+  Feature request #3521371 on SF, but reimplemented.
+
+* Added contrib/XML_for_JUnit.xsl from feature request #3521371 on SF.
+
+* Added support for setting log files via environment variables.
+  Patch #3576713 on SF.
+
+* Added better pkg-config and subunit support, patch #3417041 on SF.
+
+* Make tests/test_vars.in bourne shell compatible, bug #3472578 on SF.
+
+* Added ck_ prefix to mutex_lock variable, to avoid name clash on Solaris.
+  Solves bug #3472574 on SF.
+
+* In autoconf, request system extensions to generate 64-bit safe code,
+  solution from patch #2803433 on SF.
+
+* Fix for mutex deadlock when killing threads, patch #3564640 on SF.
+
+* Make XML output well-formed, solution from patch #3575642 on SF.
+  Solves bug #3485651 also.
+
+* Fix buggy duration calculation, bug #3575451 on SF. 
+
+* A more complete CMake / MSVC patch for those interested in pursuing
+  Windows development with Check and Visual Studio.  See
+  patches/mloskot.windows.patch.
+
+* Added instructions for improving the speed and output of `make
+  check' when using Automake.  See contrib/improved_make_check/.
+
+* Added a chapter in the documentation for selective running of tests.
+
+* Changed how the message pipe is read. Before, the whole file was copied to
+  RAM with realloc, giving problems with huge allocations for repetetive
+  tests, the problem was visible for a specific GStreamer test case.
+
+* Improvements to the new Check API: documentation, macros that allow
+  multiple evaluation, unit tests, and new
+  ck_assert_(str|int)_(lt|le|gt|ge) comparison functions.
+
+* Made the new Check API primary and use it to define macros from old Check API
+
+* Added checkmk, a tool for reducing "boilerplate coding" when writing
+  unit tests with check.
+
+* Added xslt link to xml output, added display of iteration field into xslt
+  stylesheet and moved it to directory accessible from web page root
+
+* Added longjmp to fail function to ensure that no code will be executed in test
+  function after failed assertion
+
+* Fix dead assignments and several possible NULL pointer dereferences
+
 Tue, Sep 22, 2009: Released Check 0.9.8
   based on r559 (2009-09-23 21:00).
 
diff --git a/README b/README
index 919444c..6affb0d 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,6 @@
-About Check
------------
+# About Check
+
+
 
 Check is a unit testing framework for C. It features a simple interface
 for defining unit tests, putting little in the way of the
@@ -8,27 +9,29 @@ catch both assertion failures and code errors that cause segmentation
 faults or other signals. The output from unit tests can be used within
 source code editors and IDEs.
 
-See http://check.sourceforge.net/ for more information, including a
-tutorial.  The tutorial is also available as `info check'.
+See https://libcheck.github.io/check for more information, including a
+tutorial.  The tutorial is also available as `info check`.
 
-Installation
-------------
+# Installation
 
 Check has the following dependencies:
 
-  automake-1.9.6
-  autoconf-2.59
-  libtool-1.5.22
-  pkg-config-0.20
-  texinfo-4.7 (for documentation)
-  tetex-bin (or any texinfo-compatible TeX installation, for documentation)
-  POSIX sed
+* [automake](https://www.gnu.org/software/automake/)-1.9.6 (1.11.3 on OS X if you are using /usr/bin/ar)
+* [autoconf](https://www.gnu.org/software/autoconf/)-2.59
+* [libtool](https://www.gnu.org/software/libtool/)-1.5.22
+* [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)-0.20
+* [texinfo](https://www.gnu.org/software/texinfo/)-4.7 (for documentation)
+* tetex-bin (or any texinfo-compatible TeX installation, for documentation)
+* POSIX [sed](https://en.wikipedia.org/wiki/Sed)
 
 The versions specified may be higher than those actually needed.
 
-First, do
+## autoconf
 
-$ autoreconf --install
+    $ autoreconf --install
+    $ ./configure
+    $ make
+    $ make check
 
 in this directory to set everything up.  autoreconf calls all of the
 necessary tools for you, like autoconf, automake, autoheader, etc.  If
@@ -36,39 +39,17 @@ you ever change something during development, run autoreconf again
 (without --install), and it will perform the minimum set of actions
 necessary.
 
-Then, read the directions in INSTALL if you need more information.
+## cmake
+
+    $ mkdir build
+    $ cd build
+    $ cmake ../
+    $ make
+    $ CTEST_OUTPUT_ON_FAILURE=1 make test
 
-Linking against Check
----------------------
+# Linking against Check
 
 Check uses variadic macros in check.h, and the strict C90 options for
 gcc will complain about this.  In gcc 4.0 and above you can turn this
-off explicitly with -Wno-variadic-macros.  In a future API it would be
+off explicitly with `-Wno-variadic-macros`.  In a future API it would be
 nice to eliminate these macros.
-
-Debian rationale for not having upstream build packages (.deb files)
---------------------------------------------------------------------
-
-For debian, it is highly undesirable if the upstream source contains a
-debian directory as this one will never be the same as the "official"
-Debian one, and patching is easier if it's not around.
-
-Sometimes upstream insists on having the possibility to build Debian
-packages themselves, in which case it is best to have a debian
-directory in the CVS, but not ship it when doing "make dist".
-
-Sometimes upstream insists on shipping the debian directory to their
-users so these can easily build a .deb, which is really bad because
-they usually don't remmeber to change the Debian changelog and version
-accordingly, and generally don't know enough about Debian policy to
-make conforming packages.
-
-So in the end you will have different broken packages compiled on
-various systems floating around which all have the same version number
-and look like offical packages.
-
-  -- Robert Lemmen, 2006
-
-The same holds for .rpm packages.  The Check maintainer for Fedora
-Extras, Tom 'spot' Callaway, confirmed that they do not depend on an
-upstream rpm target in Check.
diff --git a/SVNChangeLog b/SVNChangeLog
deleted file mode 100644 (file)
index f91b1a6..0000000
+++ /dev/null
@@ -1,5074 +0,0 @@
-------------------------------------------------------------------------
-r563 | rbcollins | 2009-09-23 20:43:13 +1000 (Wed, 23 Sep 2009) | 1 line
-Changed paths:
-   A /tags/check-0.9.8 (from /trunk:562)
-
-Release check-0.9.8
-------------------------------------------------------------------------
-r562 | rbcollins | 2009-09-23 20:35:45 +1000 (Wed, 23 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-
-Supply a commit message for the tag operation.
-------------------------------------------------------------------------
-r561 | rbcollins | 2009-09-23 20:25:22 +1000 (Wed, 23 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-
-Fix another 'check log for stuff' action.
-------------------------------------------------------------------------
-r560 | rbcollins | 2009-09-23 20:22:51 +1000 (Wed, 23 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/NEWS
-
-Add NEWS for the macro fix, and remove SVNChangelog step from release process.
-------------------------------------------------------------------------
-r559 | rbcollins | 2009-09-23 17:59:17 +1000 (Wed, 23 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/configure.ac
-
-Put all version numbers of check in configure.ac at the same place.
-------------------------------------------------------------------------
-r558 | rbcollins | 2009-09-22 10:39:57 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/HACKING
-
-Document needed permissions to do releases.
-------------------------------------------------------------------------
-r557 | rbcollins | 2009-09-22 10:07:21 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/NEWS
-   M /trunk/configure.ac
-
-Merge back release 0.9.7
-------------------------------------------------------------------------
-r556 | rbcollins | 2009-09-22 09:52:45 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/HACKING
-   M /trunk/Makefile.am
-
-More release automation tweaks.
-------------------------------------------------------------------------
-r552 | rbcollins | 2009-09-22 09:10:37 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/HACKING
-   M /trunk/Makefile.am
-
-Escaping in shell commands - more Makefile.am release tweaking.
-------------------------------------------------------------------------
-r551 | rbcollins | 2009-09-22 09:00:51 +1000 (Tue, 22 Sep 2009) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-
-Deal with automake wanting POSIX make only rules.
-
-------------------------------------------------------------------------
-r550 | rbcollins | 2009-09-22 08:34:26 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-
-Polish.
-------------------------------------------------------------------------
-r549 | rbcollins | 2009-09-22 08:31:14 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-
-Typo in prereleasecheck.
-------------------------------------------------------------------------
-r548 | rbcollins | 2009-09-22 08:29:47 +1000 (Tue, 22 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/HACKING
-   M /trunk/Makefile.am
-   M /trunk/NEWS
-
-Hopefully automake releases.
-------------------------------------------------------------------------
-r547 | rbcollins | 2009-09-21 22:33:46 +1000 (Mon, 21 Sep 2009) | 1 line
-Changed paths:
-   M /trunk/configure.ac
-
-Note that we need tex to build docs.
-------------------------------------------------------------------------
-r546 | cpickett | 2009-09-21 14:40:43 +1000 (Mon, 21 Sep 2009) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* fix autotools link
-
-------------------------------------------------------------------------
-r545 | cpickett | 2009-05-12 12:05:54 +1000 (Tue, 12 May 2009) | 2 lines
-Changed paths:
-   M /trunk/tests/check_stress.c
-
-* add comment about uselessness
-
-------------------------------------------------------------------------
-r544 | cpickett | 2009-05-12 11:34:55 +1000 (Tue, 12 May 2009) | 2 lines
-Changed paths:
-   M /trunk/tests/Makefile.am
-
-* comment out check_thread_stress from build per rob's request
-
-------------------------------------------------------------------------
-r543 | rbcollins | 2009-05-09 11:53:33 +1000 (Sat, 09 May 2009) | 1 line
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/NEWS
-   M /trunk/configure.ac
-   M /trunk/doc/check.texi
-   M /trunk/src/check.h.in
-   M /trunk/src/check_impl.h
-   M /trunk/src/check_log.c
-   M /trunk/src/check_log.h
-   M /trunk/src/check_print.c
-   M /trunk/src/check_run.c
-   M /trunk/src/check_str.c
-   M /trunk/src/check_str.h
-   M /trunk/tests/Makefile.am
-   M /trunk/tests/check_check.h
-   A /trunk/tests/check_check_log_internal.c
-   M /trunk/tests/check_check_main.c
-   M /trunk/tests/ex_output.c
-   M /trunk/tests/test_output.sh
-   A /trunk/tests/test_vars.in
-
-Add CK_SUBUNIT support for outputting subunit test activity. (Needs libsubunit).
-------------------------------------------------------------------------
-r542 | rbcollins | 2009-05-09 11:19:25 +1000 (Sat, 09 May 2009) | 1 line
-Changed paths:
-   M /trunk/doc/Makefile.am
-
-Fix target path failure for VPATH builds on check.texi.
-------------------------------------------------------------------------
-r541 | rbcollins | 2009-05-09 09:58:40 +1000 (Sat, 09 May 2009) | 1 line
-Changed paths:
-   M /trunk/tests/Makefile.am
-
-Set an include path for tests that includes builddir/src, for VPATH builds.
-------------------------------------------------------------------------
-r540 | hugo303 | 2009-03-18 09:33:18 +1100 (Wed, 18 Mar 2009) | 1 line
-Changed paths:
-   M /trunk/index.html
-
- * Updated maintaining text on home page
-------------------------------------------------------------------------
-r539 | hugo303 | 2009-03-13 09:05:05 +1100 (Fri, 13 Mar 2009) | 1 line
-Changed paths:
-   M /trunk/doc/check.texi
-
- * Added documentation for timeout scaling
-------------------------------------------------------------------------
-r538 | hugo303 | 2009-03-07 10:29:20 +1100 (Sat, 07 Mar 2009) | 5 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
- * Added code and tests for timeout scaling via environment variable.
-   Feature requested in tracker item #1549835 on sourceforge. Docs
-   coming later.
-
-
-------------------------------------------------------------------------
-r537 | hugo303 | 2009-03-05 09:26:56 +1100 (Thu, 05 Mar 2009) | 3 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
- * Added documentation for testing exit values with tcase_add_exit_test().
-
-
-------------------------------------------------------------------------
-r536 | cpickett | 2009-02-23 14:32:58 +1100 (Mon, 23 Feb 2009) | 2 lines
-Changed paths:
-   A /trunk/contrib/make_macros
-
-* add make_macros perl script from somebody (who?)
-
-------------------------------------------------------------------------
-r535 | cpickett | 2009-02-19 09:46:18 +1100 (Thu, 19 Feb 2009) | 2 lines
-Changed paths:
-   M /trunk/src/check_pack.c
-
-* add type to check_type error message
-
-------------------------------------------------------------------------
-r534 | cpickett | 2009-02-10 03:30:26 +1100 (Tue, 10 Feb 2009) | 2 lines
-Changed paths:
-   D /trunk/inbox
-   A /trunk/patches (from /trunk/inbox:524)
-
-* rename inbox to patches
-
-------------------------------------------------------------------------
-r533 | cpickett | 2009-02-10 03:26:59 +1100 (Tue, 10 Feb 2009) | 2 lines
-Changed paths:
-   A /trunk/contrib
-   A /trunk/contrib/check_unittest.txt
-   A /trunk/contrib/check_unittest.xslt
-
-* add contrib dir with xslt thingy for now
-
-------------------------------------------------------------------------
-r532 | hugo303 | 2009-02-04 10:47:36 +1100 (Wed, 04 Feb 2009) | 2 lines
-Changed paths:
-   M /trunk/HACKING
-
- * Added generation of web manual to release process.
-
-------------------------------------------------------------------------
-r531 | hugo303 | 2009-02-04 04:03:08 +1100 (Wed, 04 Feb 2009) | 2 lines
-Changed paths:
-   A /trunk/tests/check_check_exit.c
-
- * New file for exit tests, forgot in previous checkin.
-
-------------------------------------------------------------------------
-r530 | hugo303 | 2009-02-04 00:38:12 +1100 (Wed, 04 Feb 2009) | 2 lines
-Changed paths:
-   M /trunk/AUTHORS
-
- * Added Roy Merkel for exit test patch.
-
-------------------------------------------------------------------------
-r529 | hugo303 | 2009-02-04 00:36:16 +1100 (Wed, 04 Feb 2009) | 5 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check.h.in
-   M /trunk/src/check_impl.h
-   M /trunk/src/check_run.c
-   M /trunk/tests/Makefile.am
-   M /trunk/tests/check_check.h
-   M /trunk/tests/check_check_main.c
-
- * Applied patch #1726574, with some modifications.
-   The idea is to create a mechanism to verify that functions exit
-   early with specific exit values, analogous to the existing signal
-   test mechanism.
-
-------------------------------------------------------------------------
-r528 | cpickett | 2009-02-03 05:55:58 +1100 (Tue, 03 Feb 2009) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* use Date property for index.html
-
-------------------------------------------------------------------------
-r527 | hugo303 | 2009-02-02 23:45:08 +1100 (Mon, 02 Feb 2009) | 6 lines
-Changed paths:
-   M /trunk/tests/check_check.h
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
- * Fixed the irritating line number issue in the sub test suite. Using
-   preprocessor stuff the expected line numbers in the failure messages
-   are now autogenerated. It's not the most beautiful solution, but it
-   works lightyears better than the hardcoded code that was.
-
-------------------------------------------------------------------------
-r526 | cpickett | 2009-02-02 07:40:55 +1100 (Mon, 02 Feb 2009) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* add GNUpdf to list of projects using Check
-
-------------------------------------------------------------------------
-r525 | hugo303 | 2009-01-30 22:46:36 +1100 (Fri, 30 Jan 2009) | 4 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
- * Removed unnecessary setting of fork status from
-   srunner_run_unchecked_teardown(). Folded common logic for both
-   teardown functions into a common function.
-
-------------------------------------------------------------------------
-r524 | cpickett | 2009-01-27 18:17:33 +1100 (Tue, 27 Jan 2009) | 2 lines
-Changed paths:
-   A /trunk/inbox
-   A /trunk/inbox/check_windows.patch
-
-* add inbox dir with remaining msvc patch
-
-------------------------------------------------------------------------
-r523 | cpickett | 2009-01-25 06:43:02 +1100 (Sun, 25 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* add Enlightenment Eet and Eina libs to list of projects using Check
-
-------------------------------------------------------------------------
-r522 | cpickett | 2009-01-13 18:53:31 +1100 (Tue, 13 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/tests
-
-* ignore check_thread_stress
-
-------------------------------------------------------------------------
-r521 | cpickett | 2009-01-01 13:52:11 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/lib/fileno.c
-   M /trunk/lib/libcompat.c
-   M /trunk/lib/putenv.c
-   M /trunk/lib/strdup.c
-
-* add more assert (0)'s to broken implementations
-
-------------------------------------------------------------------------
-r520 | cpickett | 2009-01-01 13:38:44 +1100 (Thu, 01 Jan 2009) | 5 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* rearrange definitions and declarations in check_run.c so that all of
-  the forking stuff is grouped together, all the static functions are
-  grouped together, and all the non-static functions are grouped
-  together.
-
-------------------------------------------------------------------------
-r519 | cpickett | 2009-01-01 13:14:35 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* protect all unused declarations & definitions with _POSIX_VERSION
-
-------------------------------------------------------------------------
-r518 | cpickett | 2009-01-01 12:23:31 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* try to detect CK_FORK problem on non-POSIX right after getenv() call
-
-------------------------------------------------------------------------
-r517 | cpickett | 2009-01-01 12:13:21 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* align src/ more closely with Friedrich Beckmann's windows patch
-
-------------------------------------------------------------------------
-r516 | cpickett | 2009-01-01 11:33:24 +1100 (Thu, 01 Jan 2009) | 3 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/tests/check_check_main.c
-   M /trunk/tests/check_check_pack.c
-   M /trunk/tests/check_check_sub.c
-
-* protect files in tests/ per Friedrich Beckmann, using _POSIX_VERSION
-  instead of HAVE_FORK
-
-------------------------------------------------------------------------
-r515 | cpickett | 2009-01-01 11:06:54 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check_run.c
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
-* protect all calls to exit with _POSIX_VERSION, except in eprintf
-
-------------------------------------------------------------------------
-r514 | cpickett | 2009-01-01 10:45:29 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/tests/check_check_sub.c
-
-* introduce HAVE_WORKING_SETENV to protect tc_timeout_env usage
-
-------------------------------------------------------------------------
-r513 | cpickett | 2009-01-01 10:14:25 +1100 (Thu, 01 Jan 2009) | 3 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/lib/pipe.c
-   M /trunk/lib/setenv.c
-   M /trunk/lib/sleep.c
-   M /trunk/lib/unsetenv.c
-
-* add `assert (0)' to unimplemented functions to make them fail
-  with filename and hence function information
-
-------------------------------------------------------------------------
-r512 | cpickett | 2009-01-01 09:56:53 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* define sendinfo() conditionally to silence warning
-
-------------------------------------------------------------------------
-r511 | cpickett | 2009-01-01 09:53:50 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/lib/localtime_r.c
-
-* implement localtime_r
-
-------------------------------------------------------------------------
-r510 | cpickett | 2009-01-01 09:41:27 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/src/check_log.c
-   M /trunk/tests/check_stress.c
-   M /trunk/tests/check_thread_stress.c
-
-* move #include <sys/time.h> and <time.h> to libcompat.h
-
-------------------------------------------------------------------------
-r509 | cpickett | 2009-01-01 09:33:45 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/src/check_run.c
-   M /trunk/tests/check_check_sub.c
-
-* move #include <sys/wait.h> to libcompat.h
-
-------------------------------------------------------------------------
-r508 | cpickett | 2009-01-01 08:39:41 +1100 (Thu, 01 Jan 2009) | 2 lines
-Changed paths:
-   M /trunk/lib
-   M /trunk/m4
-   M /trunk/tests
-
-* set svn:ignore to include more generated stuff
-
-------------------------------------------------------------------------
-r507 | cpickett | 2008-12-31 15:41:02 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* ensure XFAIL without _POSIX_VERSION
-
-------------------------------------------------------------------------
-r506 | cpickett | 2008-12-31 15:38:16 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/Makefile.am
-
-* add check_thread_stress to tests and XFAIL_TESTS
-
-------------------------------------------------------------------------
-r505 | cpickett | 2008-12-31 15:37:35 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_check_sub.c
-
-* add blank line to fix line numbers
-
-------------------------------------------------------------------------
-r504 | cpickett | 2008-12-31 15:28:11 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* fix indenting again
-
-------------------------------------------------------------------------
-r503 | cpickett | 2008-12-31 15:14:15 +1100 (Wed, 31 Dec 2008) | 5 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* use CK_VERBOSE instead of CK_SILENT (for now)
-* protect pthread test with HAVE_PTHREAD
-* protect fork test with _POSIX_VERSION
-* call exit() in fork test child
-
-------------------------------------------------------------------------
-r502 | cpickett | 2008-12-31 14:05:58 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check_error.c
-   M /trunk/src/check_list.c
-   M /trunk/src/check_log.c
-   M /trunk/src/check_msg.c
-   M /trunk/src/check_pack.c
-   M /trunk/src/check_print.c
-   M /trunk/src/check_run.c
-   M /trunk/src/check_str.c
-   M /trunk/tests/check_thread_stress.c
-
-* depend exclusively on #include "../lib/libcompat.h" to provide config.h
-
-------------------------------------------------------------------------
-r501 | cpickett | 2008-12-31 14:01:37 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/src/check_msg.c
-   M /trunk/src/check_pack.c
-   M /trunk/src/check_run.c
-   M /trunk/tests/check_check_fork.c
-   M /trunk/tests/check_check_pack.c
-   M /trunk/tests/check_check_sub.c
-   M /trunk/tests/check_thread_stress.c
-
-* move #include <unistd.h> and <pthread.h> to libcompat.h
-
-------------------------------------------------------------------------
-r500 | cpickett | 2008-12-31 13:54:03 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* run GNU indent on check_thread_stress.c, and then adjust whitespace
-
-------------------------------------------------------------------------
-r499 | cpickett | 2008-12-31 13:51:26 +1100 (Wed, 31 Dec 2008) | 3 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* convert check_thread_stress to run actual fork and pthread tests
-  - implementation again due to Daniel Gollub
-
-------------------------------------------------------------------------
-r498 | cpickett | 2008-12-31 13:23:58 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* include config.h and ../lib/libcompat.h
-
-------------------------------------------------------------------------
-r497 | cpickett | 2008-12-31 13:23:32 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* set CC outside of ACX_PTHREAD
-
-------------------------------------------------------------------------
-r496 | cpickett | 2008-12-31 09:12:20 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_thread_stress.c
-
-* silence check_thread_stress warnings
-
-------------------------------------------------------------------------
-r495 | cpickett | 2008-12-31 08:45:26 +1100 (Wed, 31 Dec 2008) | 7 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/configure.ac
-   M /trunk/src/Makefile.am
-   M /trunk/src/check_pack.c
-   M /trunk/tests/Makefile.am
-   A /trunk/tests/check_thread_stress.c
-
-* support running tests with multiple pthreads
-  - protect write in ppack() using a pthread mutex
-  - use ACX_PTHREAD for portability
-  - tests/check_thread_stress will test this for now
-  - fix due to Daniel Gollub
-  - closes 1391527 
-
-------------------------------------------------------------------------
-r494 | cpickett | 2008-12-31 08:20:48 +1100 (Wed, 31 Dec 2008) | 2 lines
-Changed paths:
-   A /trunk/m4/acx_pthread.html
-   A /trunk/m4/acx_pthread.m4
-
-* add ACX_PTHREAD files
-
-------------------------------------------------------------------------
-r493 | cpickett | 2008-12-30 20:15:08 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* add todo
-
-------------------------------------------------------------------------
-r492 | cpickett | 2008-12-30 18:14:50 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_check_fixture.c
-
-* adjust line numbers to make all tests pass again
-
-------------------------------------------------------------------------
-r491 | cpickett | 2008-12-30 17:47:35 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/test_log_output.sh
-   M /trunk/tests/test_output.sh
-   M /trunk/tests/test_xml_output.sh
-
-* adjust line numbers of expected output
-
-------------------------------------------------------------------------
-r490 | cpickett | 2008-12-30 17:21:44 +1100 (Tue, 30 Dec 2008) | 3 lines
-Changed paths:
-   M /trunk/configure.ac
-   M /trunk/lib/libcompat.h
-   A /trunk/lib/pipe.c
-
-* add pipe(2) stub
-  - now both src/ and tests/ compile and link properly on MSYS/MinGW!
-
-------------------------------------------------------------------------
-r489 | cpickett | 2008-12-30 16:31:43 +1100 (Tue, 30 Dec 2008) | 7 lines
-Changed paths:
-   M /trunk/lib/Makefile.am
-   M /trunk/src/Makefile.am
-   M /trunk/tests/Makefile.am
-
-* Various fixes towards building shared libraries on mingw:
-  - add -no-undefined flag to <lib>_LDFLAGS for mingw library creation
-  - add libcheckinternal_la_LIBADD
-  - don't use LIBADD by itself for src/Makefile.am since
-    libcheck_la_LIBADD clobbers it
-  - add libcompat.la to *_LDADD and *_LIBADD
-
-------------------------------------------------------------------------
-r488 | cpickett | 2008-12-30 13:50:52 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-   M /trunk/lib/libcompat.h
-   A /trunk/lib/putenv.c
-
-* check for putenv as well
-
-------------------------------------------------------------------------
-r487 | cpickett | 2008-12-30 13:45:58 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-
-* copy CK_ATTRIBUTE_UNUSED definition to libcompat.h (evil)
-
-------------------------------------------------------------------------
-r486 | cpickett | 2008-12-30 13:40:50 +1100 (Tue, 30 Dec 2008) | 3 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/tests/check_check_export_main.c
-   M /trunk/tests/check_check_fixture.c
-   M /trunk/tests/check_check_fork.c
-   M /trunk/tests/check_check_limit.c
-   M /trunk/tests/check_check_log.c
-   M /trunk/tests/check_check_main.c
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_msg.c
-   M /trunk/tests/check_check_pack.c
-   M /trunk/tests/check_check_sub.c
-   M /trunk/tests/check_list.c
-   M /trunk/tests/check_stress.c
-   M /trunk/tests/ex_log_output.c
-   M /trunk/tests/ex_output.c
-   M /trunk/tests/ex_xml_output.c
-
-* #include "../lib/libcompat.h" in tests/*.c
-* don't include check.h in libcompat.h
-
-------------------------------------------------------------------------
-r485 | cpickett | 2008-12-30 13:26:56 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check_error.c
-   M /trunk/src/check_list.c
-   M /trunk/src/check_log.c
-   M /trunk/src/check_msg.c
-   M /trunk/src/check_pack.c
-   M /trunk/src/check_print.c
-   M /trunk/src/check_run.c
-   M /trunk/src/check_str.c
-
-* #include "../lib/libcompat.h" everywhere
-
-------------------------------------------------------------------------
-r484 | cpickett | 2008-12-30 13:25:44 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-
-* use #ifndef LIBCOMPAT_H ... #endif idiom
-
-------------------------------------------------------------------------
-r483 | cpickett | 2008-12-30 13:24:48 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* take malloc and realloc out of AC_CHECK_DECLS (they are always declared)
-
-------------------------------------------------------------------------
-r482 | cpickett | 2008-12-30 13:17:15 +1100 (Tue, 30 Dec 2008) | 4 lines
-Changed paths:
-   M /trunk/lib/fileno.c
-   M /trunk/lib/libcompat.h
-   M /trunk/lib/localtime_r.c
-   M /trunk/lib/malloc.c
-   M /trunk/lib/realloc.c
-   M /trunk/lib/setenv.c
-   M /trunk/lib/sleep.c
-   M /trunk/lib/strdup.c
-   M /trunk/lib/strsignal.c
-   M /trunk/lib/unsetenv.c
-
-* use HAVE_DECL_FUNCTION instead of HAVE_FUNCTION
-* add bodies for all lib/ .c files
-* rely on libcompat.h to provide common #includes
-
-------------------------------------------------------------------------
-r481 | cpickett | 2008-12-30 12:37:21 +1100 (Tue, 30 Dec 2008) | 5 lines
-Changed paths:
-   M /trunk/configure.ac
-   A /trunk/lib/fileno.c
-   M /trunk/lib/libcompat.h
-   A /trunk/lib/localtime_r.c
-   A /trunk/lib/setenv.c
-   A /trunk/lib/unsetenv.c
-
-* only check for those functions that we currently need to check for
-  to solve portability problems, and avoid checking for things where
-  we don't currently use the result generated in config.h
-* add stubs for setenv, unsetenv, localtime_r, and fileno
-
-------------------------------------------------------------------------
-r480 | cpickett | 2008-12-30 09:28:42 +1100 (Tue, 30 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* list OpenSync as client
-
-------------------------------------------------------------------------
-r479 | hugo303 | 2008-12-30 02:46:39 +1100 (Tue, 30 Dec 2008) | 4 lines
-Changed paths:
-   M /trunk
-   M /trunk/NEWS
-   M /trunk/TODO
-   M /trunk/configure.ac
-   M /trunk/lib/malloc.c
-   M /trunk/lib/realloc.c
-   M /trunk/lib/strsignal.c
-
- * Merged release branch 0.9.6
-    svn merge -r476:477 ../tags/check-0.9.6
-
-
-------------------------------------------------------------------------
-r478 | hugo303 | 2008-12-30 02:34:22 +1100 (Tue, 30 Dec 2008) | 3 lines
-Changed paths:
-   M /trunk/HACKING
-
- * Updated with more info on releases.
-
-
-------------------------------------------------------------------------
-r475 | cpickett | 2008-12-29 10:38:12 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-   M /trunk/lib/libcompat.h
-   A /trunk/lib/strdup.c
-
-* add strdup.c to lib/ (there are problems on mingw with strdup)
-
-------------------------------------------------------------------------
-r474 | cpickett | 2008-12-29 10:24:25 +1100 (Mon, 29 Dec 2008) | 5 lines
-Changed paths:
-   M /trunk/configure.ac
-   A /trunk/m4/ax_cflags_warn_all_ansi.html
-   A /trunk/m4/ax_cflags_warn_all_ansi.m4
-   M /trunk/src/Makefile.am
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
-* use AX_CFLAGS_WARN_ALL_ANSI
-* remove tests that support fail() and friends without NULL 
-  - otherwise GCC complains about this not being ISO C99
-* remove setting -ansi and -pedantic in src/Makefile.am
-
-------------------------------------------------------------------------
-r473 | cpickett | 2008-12-29 10:00:21 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/lib/libcompat.c
-   M /trunk/lib/libcompat.h
-
-* silence warning when nothing is included in libcompat
-
-------------------------------------------------------------------------
-r472 | cpickett | 2008-12-29 09:51:20 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/ex_xml_output.c
-
-* add more CK_ATTRIBUTE_UNUSED's
-
-------------------------------------------------------------------------
-r471 | cpickett | 2008-12-29 09:16:00 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check_log.c
-   M /trunk/src/check_print.c
-   M /trunk/tests/check_check_sub.c
-
-* silence some more unused parameter warnings
-
-------------------------------------------------------------------------
-r470 | cpickett | 2008-12-29 09:09:48 +1100 (Mon, 29 Dec 2008) | 4 lines
-Changed paths:
-   M /trunk/lib/sleep.c
-   M /trunk/src/check.c
-   M /trunk/src/check.h.in
-
-* move CK_ATTRIBUTE_UNUSED attribute after parameter name in sleep()
-  and __testname()
-* add CK_ATTRIBUTE_UNUSED to fname parameter in tcase_fn_start
-
-------------------------------------------------------------------------
-r469 | cpickett | 2008-12-29 08:30:16 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* mark print_mode parameter as unused in two cases
-
-------------------------------------------------------------------------
-r468 | cpickett | 2008-12-29 08:26:01 +1100 (Mon, 29 Dec 2008) | 5 lines
-Changed paths:
-   M /trunk/lib/libcompat.h
-   M /trunk/lib/malloc.c
-   M /trunk/lib/realloc.c
-   M /trunk/lib/sleep.c
-   M /trunk/lib/strsignal.c
-
-* include libcompat.h in each lib .c file and reduce boilerplate
-* mark sleep seconds parameter unused
-* make strsignal() non-static
-* include ../src/check.h in libcompat.h
-
-------------------------------------------------------------------------
-r467 | cpickett | 2008-12-29 08:05:31 +1100 (Mon, 29 Dec 2008) | 4 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-   M /trunk/src/check_run.c
-   M /trunk/tests/Makefile.am
-   M /trunk/tests/check_check_sub.c
-
-* #include "../lib/libcompat.h" in two places
-* change .. in LDADD and LIBADD to $(top_builddir)
-
-
-------------------------------------------------------------------------
-r466 | cpickett | 2008-12-29 07:47:06 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/lib/Makefile.am
-   A /trunk/lib/libcompat.h
-   M /trunk/lib/malloc.c
-   M /trunk/lib/realloc.c
-   M /trunk/lib/sleep.c
-   M /trunk/lib/strsignal.c
-   M /trunk/src/check_run.c
-
-* add libcompat.h with prototypes for libcompat functions
-
-------------------------------------------------------------------------
-r465 | cpickett | 2008-12-29 06:58:42 +1100 (Mon, 29 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-   M /trunk/src/check_run.c
-   M /trunk/tests/check_check_master.c
-
-* use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCE
-
-------------------------------------------------------------------------
-r464 | cpickett | 2008-12-28 18:39:38 +1100 (Sun, 28 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-   A /trunk/lib/sleep.c
-
-* replace sleep() as well
-
-------------------------------------------------------------------------
-r463 | cpickett | 2008-12-28 18:19:25 +1100 (Sun, 28 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/Makefile.am
-
-* add libcompat.la to LDADD
-
-------------------------------------------------------------------------
-r462 | cpickett | 2008-12-28 18:16:08 +1100 (Sun, 28 Dec 2008) | 4 lines
-Changed paths:
-   M /trunk/tests/check_check_sub.c
-
-* msys/gcc portability:
-  - protect calls to fork/sleep/kill with _POSIX_VERSION
-  - protect inclusion of sys/wait.h with #if HAVE_SYS_WAIT_H
-
-------------------------------------------------------------------------
-r461 | cpickett | 2008-12-28 17:55:42 +1100 (Sun, 28 Dec 2008) | 2 lines
-Changed paths:
-   A /trunk/lib/libcompat.c
-
-* add missing libcompat.c
-
-------------------------------------------------------------------------
-r460 | cpickett | 2008-12-28 17:53:08 +1100 (Sun, 28 Dec 2008) | 2 lines
-Changed paths:
-   A /trunk/lib/Makefile.am
-
-* add missing lib/Makefile.am
-
-------------------------------------------------------------------------
-r459 | cpickett | 2008-12-28 17:51:34 +1100 (Sun, 28 Dec 2008) | 3 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/configure.ac
-   A /trunk/lib/malloc.c (from /trunk/src/malloc.c:457)
-   A /trunk/lib/realloc.c (from /trunk/src/realloc.c:457)
-   A /trunk/lib/strsignal.c (from /trunk/src/strsignal.c:457)
-   M /trunk/src/Makefile.am
-   D /trunk/src/malloc.c
-   D /trunk/src/realloc.c
-   D /trunk/src/strsignal.c
-
-* move strsignal, malloc, and realloc to lib/ subdir, as recommended
-  by Automake manual
-
-------------------------------------------------------------------------
-r458 | cpickett | 2008-12-28 17:37:59 +1100 (Sun, 28 Dec 2008) | 2 lines
-Changed paths:
-   A /trunk/lib
-
-* add lib dir for libcompat
-
-------------------------------------------------------------------------
-r457 | cpickett | 2008-12-28 17:24:38 +1100 (Sun, 28 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-
-* add missing @LTLIBOJBS@ to libcheck_la_DEPENDENCIES
-
-------------------------------------------------------------------------
-r456 | cpickett | 2008-12-24 11:03:12 +1100 (Wed, 24 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-
-* use LTLIBOBJS instead of LIBOJBS since we're building a library
-
-------------------------------------------------------------------------
-r455 | cpickett | 2008-12-23 16:04:01 +1100 (Tue, 23 Dec 2008) | 6 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-   M /trunk/src/check.c
-   A /trunk/src/malloc.c
-   A /trunk/src/realloc.c
-   A /trunk/src/strsignal.c
-
-* Fix problems with the use of AC_FUNC_MALLOC, AC_FUNC_REALLOC, and
-  AC_REPLACE_FUNCS([strsignal]):
-  - add @LIBOBJS@ to libcheck_la_LIBADD and libcheckinternal_la_LIBADD
-  - create separate malloc.c, realloc.c, and strsignal.c files
-  - move function definitions from check.c into these files  
-
-------------------------------------------------------------------------
-r454 | cpickett | 2008-12-23 12:40:31 +1100 (Tue, 23 Dec 2008) | 4 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* Changes to make the src/ directory compile with gcc/MSYS:
-  - protect inclusion of sys/wait.h with HAVE_SYS_WAIT_H
-  - protect POSIX-only calls with _POSIX_VERSION
-
-------------------------------------------------------------------------
-r453 | cpickett | 2008-12-02 08:14:15 +1100 (Tue, 02 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* add note about CFLAGS and ax_cflags_gcc_option to TODO
-
-------------------------------------------------------------------------
-r452 | cpickett | 2008-12-02 08:10:44 +1100 (Tue, 02 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/src
-
-* add exported.sym to ignored files
-
-------------------------------------------------------------------------
-r451 | cpickett | 2008-12-01 07:00:40 +1100 (Mon, 01 Dec 2008) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* update TODO
-
-------------------------------------------------------------------------
-r450 | cpickett | 2008-11-30 19:49:41 +1100 (Sun, 30 Nov 2008) | 2 lines
-Changed paths:
-   M /trunk/tests
-
-* set some svn:ignore properties so svn status works better
-
-------------------------------------------------------------------------
-r449 | cpickett | 2008-11-30 18:11:42 +1100 (Sun, 30 Nov 2008) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* add Cygwin, MinGW, MSVC to TODO
-
-------------------------------------------------------------------------
-r448 | cpickett | 2008-11-30 18:03:49 +1100 (Sun, 30 Nov 2008) | 5 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/configure.ac
-   M /trunk/src/check.c
-
-* add call to AC_REPLACE_FUNCS([strsignal])
-* add new rpl_strsignal following rpl_(re)malloc template, body
-  of function due to Roland Illig
-  -- hopefully closes 1629755
-
-------------------------------------------------------------------------
-r447 | cpickett | 2008-11-30 16:30:49 +1100 (Sun, 30 Nov 2008) | 4 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
-* add missing NULL argument to fail* varargs macro calls
-* define incorrect tests for __GNUC__ only
-   -- both per Roland Illig in bug 1677391
-
-------------------------------------------------------------------------
-r446 | cpickett | 2008-11-30 14:38:06 +1100 (Sun, 30 Nov 2008) | 3 lines
-Changed paths:
-   M /trunk/src/check.h.in
-
-* define CK_ATTRIBUTE_UNUSED for GCC >= 2.95, closing:
-  [ 1674626 ] compile error with non defined __attribute__ compiler
-
-------------------------------------------------------------------------
-r445 | cpickett | 2008-11-30 14:30:21 +1100 (Sun, 30 Nov 2008) | 3 lines
-Changed paths:
-   M /trunk/README
-
-* mention that texinfo is for documentation, and that any TeX
-  installation will do in dependencies section
-
-------------------------------------------------------------------------
-r443 | cpickett | 2008-11-16 05:23:14 +1100 (Sun, 16 Nov 2008) | 2 lines
-Changed paths:
-   M /trunk
-   M /trunk/doc
-
-* set svn:ignore for generated files so svn status is useful
-
-------------------------------------------------------------------------
-r442 | hugo303 | 2008-11-13 06:03:48 +1100 (Thu, 13 Nov 2008) | 1 line
-Changed paths:
-   M /trunk/doc/example/tests/Makefile.am
-
-* Fixed error in documentation example Makefile.am, bug #1888237
-------------------------------------------------------------------------
-r441 | hugo303 | 2008-11-11 09:05:13 +1100 (Tue, 11 Nov 2008) | 1 line
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Fixed spelling (patch #1652630)
-------------------------------------------------------------------------
-r440 | hugo303 | 2008-11-11 08:44:52 +1100 (Tue, 11 Nov 2008) | 1 line
-Changed paths:
-   M /trunk/src/check.c
-
-* Handle NULL in srunner_add_suite(). Fixes #1624887
-------------------------------------------------------------------------
-r439 | hugo303 | 2008-11-11 08:25:27 +1100 (Tue, 11 Nov 2008) | 1 line
-Changed paths:
-   M /trunk/index.html
-
-* Fixed faulty link to Daimonin
-------------------------------------------------------------------------
-r438 | hugo303 | 2008-11-11 08:23:10 +1100 (Tue, 11 Nov 2008) | 1 line
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Updated chapter 3.3 (bug #2053018)
-------------------------------------------------------------------------
-r437 | cpickett | 2008-08-29 06:49:06 +1000 (Fri, 29 Aug 2008) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* add scew
-
-------------------------------------------------------------------------
-r435 | cpickett | 2008-03-22 09:16:13 +1100 (Sat, 22 Mar 2008) | 3 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-
-* use @top_srcdir@/src/check.h.in instead of check.h.in
-  -- fixes broken make distcheck
-
-------------------------------------------------------------------------
-r434 | cpickett | 2008-03-22 09:04:41 +1100 (Sat, 22 Mar 2008) | 3 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-
-* add '|| test $$? -eq 1;' after each diff command per 
-  OpenBSD 4.2 problems Torok Edwin was having.
-
-------------------------------------------------------------------------
-r433 | cpickett | 2008-03-22 08:45:37 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check.h.in
-   M /trunk/src/check_impl.h
-   M /trunk/src/check_run.c
-
-* add CK_FORK_GETENV to enum fork_status and delete CK_FORK_UNSPECIFIED
-
-------------------------------------------------------------------------
-r432 | cpickett | 2008-03-22 08:10:16 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/tests/check_check_master.c
-
-* add comment about strsignal overwriting string returned by previous call
-
-------------------------------------------------------------------------
-r431 | cpickett | 2008-03-22 07:44:52 +1100 (Sat, 22 Mar 2008) | 3 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/tests/check_check_master.c
-
-* call strdup on result from strsignal to avoid clobbering it
-* add Torok Edwin to AUTHORS
-
-------------------------------------------------------------------------
-r430 | cpickett | 2008-03-22 05:54:36 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check.h.in
-   M /trunk/src/check_print.c
-
-* add CK_TEST_RESULT_INVALID to enum test_result
-
-------------------------------------------------------------------------
-r429 | cpickett | 2008-03-22 05:26:50 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check.h.in
-   M /trunk/src/check_pack.c
-
-* add CK_CTX_INVALID to ck_result_ctx and don't use -1 anymore
-
-------------------------------------------------------------------------
-r428 | cpickett | 2008-03-22 04:54:42 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-   A /trunk/m4/ax_c_check_flag.html
-   A /trunk/m4/ax_c_check_flag.m4
-   D /trunk/m4/ax_cflags_gcc_option.html
-   D /trunk/m4/ax_cflags_gcc_option.m4
-
-* favour ax_c_check_flag over ax_cflags_gcc_option
-
-------------------------------------------------------------------------
-r427 | cpickett | 2008-03-22 04:22:43 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/configure.ac
-
-* add options using AX_CFLAGS_GCC_OPTION
-
-------------------------------------------------------------------------
-r426 | cpickett | 2008-03-22 02:39:00 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   A /trunk/m4
-   A /trunk/m4/ax_cflags_gcc_option.html
-   A /trunk/m4/ax_cflags_gcc_option.m4
-
-* add m4 directory and ax_cflags_gcc_option macro
-
-------------------------------------------------------------------------
-r425 | cpickett | 2008-03-22 02:06:24 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-
-* replace $< with check.h.in for non-gmake (patch due to Torok Edwin)
-
-------------------------------------------------------------------------
-r424 | cpickett | 2008-03-22 02:00:21 +1100 (Sat, 22 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* call AM_PROG_CC_C_O
-
-------------------------------------------------------------------------
-r423 | cpickett | 2008-03-21 10:19:16 +1100 (Fri, 21 Mar 2008) | 4 lines
-Changed paths:
-   M /trunk/src/check.c
-
-* add prototypes for rpl_malloc and rpl_realloc
-* fix prototypes for malloc and realloc
-* document AC_FUNC_MALLOC / AC_FUNC_REALLOC madness
-
-------------------------------------------------------------------------
-r422 | cpickett | 2008-03-07 03:59:38 +1100 (Fri, 07 Mar 2008) | 5 lines
-Changed paths:
-   M /trunk/src/check_error.c
-   M /trunk/src/check_log.c
-   M /trunk/src/check_msg.c
-   M /trunk/src/check_pack.c
-   M /trunk/src/check_run.c
-
-* Pass an adjusted line number to eprintf when the error
-  being reported is based on the result of another function.
-* Name the function that failed in these cases.
-* Add FIXME re: colons at the end of system error messages
-
-------------------------------------------------------------------------
-r421 | cpickett | 2008-03-04 01:13:27 +1100 (Tue, 04 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-   M /trunk/index.html
-
-* add daimonin, embunit, and aceunit
-
-------------------------------------------------------------------------
-r420 | cpickett | 2008-03-04 00:48:38 +1100 (Tue, 04 Mar 2008) | 2 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/src/check_run.c
-   M /trunk/tests/check_check_fixture.c
-
-* count checks in setup() as well; patch due to Roland Stigge
-
-------------------------------------------------------------------------
-r419 | cpickett | 2008-02-09 01:09:41 +1100 (Sat, 09 Feb 2008) | 4 lines
-Changed paths:
-   M /trunk/src/check.h.in
-
-* use int __attribute__((unused)) _i instead of
-      int _i __attribute__((unused))
-  per gcc-3.3.5 request from Sebastian Trahm
-
-------------------------------------------------------------------------
-r418 | cpickett | 2008-01-23 09:54:46 +1100 (Wed, 23 Jan 2008) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* fix cppunit link
-
-------------------------------------------------------------------------
-r417 | cpickett | 2008-01-18 06:03:32 +1100 (Fri, 18 Jan 2008) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* add XCB to list of projects using Check
-
-------------------------------------------------------------------------
-r416 | cpickett | 2007-12-12 12:17:42 +1100 (Wed, 12 Dec 2007) | 3 lines
-Changed paths:
-   M /trunk/src/check.c
-   M /trunk/src/check.h.in
-
-* rename signal to _signal in _tcase_add_test to avoid a
-  symbol clash with /usr/include/sys/signal.h on OS X.
-
-------------------------------------------------------------------------
-r415 | cpickett | 2007-10-29 03:38:34 +1100 (Mon, 29 Oct 2007) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* add Pigment to list of projects using Check
-
-------------------------------------------------------------------------
-r414 | hugo303 | 2007-08-27 23:13:11 +1000 (Mon, 27 Aug 2007) | 3 lines
-Changed paths:
-   M /trunk/src/check_msg.c
-
- * Made send_file1 and send_file2 static.
-
-
-------------------------------------------------------------------------
-r413 | hugo303 | 2007-08-27 19:50:07 +1000 (Mon, 27 Aug 2007) | 3 lines
-Changed paths:
-   M /trunk/index.html
-
-* Add BitlBee and ctrlproxy to list of Check-using projects.
-
-
-------------------------------------------------------------------------
-r412 | cpickett | 2007-06-20 13:50:45 +1000 (Wed, 20 Jun 2007) | 3 lines
-Changed paths:
-   M /trunk/tests/check_check_sub.c
-
-* test fail(NULL) instead of fail() because there is
-  no way to fix fail() to work with the XL C compiler.
-
-------------------------------------------------------------------------
-r411 | cpickett | 2007-06-20 09:36:39 +1000 (Wed, 20 Jun 2007) | 4 lines
-Changed paths:
-   M /trunk/src/check.c
-
-* define rpl_malloc and rpl_realloc for platforms where
-  !malloc(0) and !realloc(0,0), such as AIX, because configure
-  goes and redefines malloc/realloc in this case...
-
-------------------------------------------------------------------------
-r410 | cpickett | 2007-04-21 11:41:34 +1000 (Sat, 21 Apr 2007) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-
-* SVNChangeLog patch from Robert Collins
-
-------------------------------------------------------------------------
-r409 | hugo303 | 2007-03-13 03:05:53 +1100 (Tue, 13 Mar 2007) | 3 lines
-Changed paths:
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
- * Added some simple testing of srunner_create() and srunner_add_suite().
-
-
-------------------------------------------------------------------------
-r408 | cpickett | 2007-01-29 08:03:53 +1100 (Mon, 29 Jan 2007) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* Add Iodine to list of Check-using projects.
-
-------------------------------------------------------------------------
-r407 | cpickett | 2007-01-17 08:57:52 +1100 (Wed, 17 Jan 2007) | 2 lines
-Changed paths:
-   M /trunk/README
-   M /trunk/TODO
-   M /trunk/doc/check.texi
-   M /trunk/index.html
-
-* s/unit test/unit testing/ when used as a verb.
-
-------------------------------------------------------------------------
-r406 | cpickett | 2006-12-21 11:46:08 +1100 (Thu, 21 Dec 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Fix broken example of loop test usage.
-
-------------------------------------------------------------------------
-r405 | cpickett | 2006-12-13 06:11:09 +1100 (Wed, 13 Dec 2006) | 3 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/HACKING
-   M /trunk/THANKS
-   M /trunk/TODO
-   M /trunk/configure.ac
-
-* Obfuscate email addresses a little bit more.
-* Update Arien Malec's email address.
-
-------------------------------------------------------------------------
-r404 | cpickett | 2006-12-12 18:10:20 +1100 (Tue, 12 Dec 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* Add pkg-config documentation TODO.
-
-------------------------------------------------------------------------
-r403 | cpickett | 2006-12-11 04:19:43 +1100 (Mon, 11 Dec 2006) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* Add Tinymail link.
-
-------------------------------------------------------------------------
-r402 | cpickett | 2006-12-09 04:47:49 +1100 (Sat, 09 Dec 2006) | 2 lines
-Changed paths:
-   M /trunk/src/check.h.in
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
-* Add ck_abort and ck_abort_msg implementation with tests.
-
-------------------------------------------------------------------------
-r401 | hugo303 | 2006-12-06 19:54:01 +1100 (Wed, 06 Dec 2006) | 3 lines
-Changed paths:
-   M /trunk/check.m4
-
- * Incorporated patch from Debian for debian bug #395466. This fixes
-    'AM_PATH_CHECK causes "possibly undefined macro" errors'.
-
-------------------------------------------------------------------------
-r400 | hugo303 | 2006-11-28 22:51:29 +1100 (Tue, 28 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/tests/check_check_master.c
-
- * Fixed line number typo in timeout test.
-------------------------------------------------------------------------
-r399 | hugo303 | 2006-11-28 21:47:35 +1100 (Tue, 28 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
- * Added tests for new Check fail API.
-
-------------------------------------------------------------------------
-r398 | hugo303 | 2006-11-28 21:46:12 +1100 (Tue, 28 Nov 2006) | 4 lines
-Changed paths:
-   M /trunk/src/check.h.in
-
- * Added new Check fail API. Implemented on top of fail_unless. Future
-   versions will reverse this so fail_unless is implemented on top of the
-   ck_assert API.
-
-------------------------------------------------------------------------
-r397 | cpickett | 2006-11-24 05:20:44 +1100 (Fri, 24 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/README
-
-* Relax sed dependency from GNU to POSIX.
-
-------------------------------------------------------------------------
-r396 | cpickett | 2006-11-24 05:18:11 +1100 (Fri, 24 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/HACKING
-   M /trunk/THANKS
-   M /trunk/TODO
-   M /trunk/configure.ac
-   M /trunk/doc/check.texi
-   M /trunk/doc/example/README
-   M /trunk/doc/example/configure.ac
-   M /trunk/index.html
-
-* Update AUTHORS to reflect current maintainers.
-* Perform basic email address obfuscation, replacing @ with AT.
-
-------------------------------------------------------------------------
-r395 | hugo303 | 2006-11-24 00:35:24 +1100 (Fri, 24 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/configure.ac
-
- * Reverted change in r377. genhtml is used in src/Makefile.am.
-------------------------------------------------------------------------
-r394 | hugo303 | 2006-11-23 19:18:10 +1100 (Thu, 23 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/src/Makefile.am
-
- * Modified sed exported symbols regexp to work on OS X.
-------------------------------------------------------------------------
-r393 | cpickett | 2006-11-23 16:27:00 +1100 (Thu, 23 Nov 2006) | 5 lines
-Changed paths:
-   M /trunk/TODO
-   M /trunk/doc/check.texi
-   M /trunk/src/check.c
-
-* Change DEFAULT_TIMEOUT from 3 seconds to 4 seconds.  Document in
-  TODO that this should ultimately be fixed properly.  This fixes
-  build errors with timeout tests on a Mac Pro, and possibly other 
-  systems and/or architectures.
-
-------------------------------------------------------------------------
-r392 | cpickett | 2006-11-23 15:25:13 +1100 (Thu, 23 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/README
-
-* Document dependency on GNU sed 4.0.5.
-
-------------------------------------------------------------------------
-r391 | hugo303 | 2006-11-22 21:13:51 +1100 (Wed, 22 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
- * Reverted back to r378, undoing the -ansi and -pedantic fixes.
-   Now the tests shall work again.
-
-------------------------------------------------------------------------
-r390 | hugo303 | 2006-11-22 21:11:49 +1100 (Wed, 22 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/configure.ac
-   M /trunk/src/Makefile.am
-
- * Moved -ansi and -pedantic CFLAGS to src/Makefile.am from configure.ac.
-   Without these flags in the tests, they will be able to work again.
-
-------------------------------------------------------------------------
-r389 | cpickett | 2006-11-22 18:33:47 +1100 (Wed, 22 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Clarified checked and unchecked fixtures according to discussion
-  between Hugo and Greger Ohlson in the Help forum.
-
-------------------------------------------------------------------------
-r388 | cpickett | 2006-11-22 18:22:38 +1100 (Wed, 22 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/TODO
-
-* Update TODO with Hugo's idea from Help forum about forking
-  test cases as well as forking unit tests.
-
-------------------------------------------------------------------------
-r387 | cpickett | 2006-11-22 16:13:35 +1100 (Wed, 22 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/HACKING
-
-* Changed release email project files link to direct download link.
-
-------------------------------------------------------------------------
-r386 | cpickett | 2006-11-22 12:26:56 +1100 (Wed, 22 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/HACKING
-
-* Document release process.
-
-------------------------------------------------------------------------
-r385 | cpickett | 2006-11-22 10:56:21 +1100 (Wed, 22 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/NEWS
-   M /trunk/TODO
-   M /trunk/configure.ac
-
-* svn merge -r383:384 ../tags/check-0.9.5/ .
-  -- Updated version to 0.9.5, along with NEWS and TODO to match.
-
-------------------------------------------------------------------------
-r382 | hugo303 | 2006-11-21 20:36:01 +1100 (Tue, 21 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/TODO
-
- * Clarified patch submission in TODO list.
-------------------------------------------------------------------------
-r381 | cpickett | 2006-11-21 14:41:37 +1100 (Tue, 21 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/Makefile.am
-
-* svn merge -r375:374 .
-  -- This removes the `.PHONY: SVNChangeLog' target.
-
-------------------------------------------------------------------------
-r380 | cpickett | 2006-11-18 12:02:13 +1100 (Sat, 18 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/src/check_run.c
-
-* Eliminate comparison of enum print_mode with 0, since the enum type
-  is unsigned int.
-
-------------------------------------------------------------------------
-r379 | cpickett | 2006-11-18 11:47:21 +1100 (Sat, 18 Nov 2006) | 5 lines
-Changed paths:
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/check_check_sub.c
-
-* Always pass NULL to fail_if and fail_unless if there is no
-  message, as required by C99.
-* Delete test_fail_no_msg and test_fail_if_no_msg since they test
-  support for non-ISO behaviour.
-
-------------------------------------------------------------------------
-r378 | cpickett | 2006-11-18 11:44:33 +1100 (Sat, 18 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* Add some strictness to CFLAGS.
-
-------------------------------------------------------------------------
-r377 | cpickett | 2006-11-18 10:53:54 +1100 (Sat, 18 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* Remove check for genhtml, since it isn't used anywhere.
-
-------------------------------------------------------------------------
-r376 | cpickett | 2006-11-18 10:45:08 +1100 (Sat, 18 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* Tick off make html (0.9.4) and loop test clarification (0.9.5).
-
-------------------------------------------------------------------------
-r375 | hugo303 | 2006-11-18 00:17:38 +1100 (Sat, 18 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/Makefile.am
-
- * Made SVNChangeLog target PHONY so it is always regenerated.
-------------------------------------------------------------------------
-r374 | hugo303 | 2006-11-17 22:57:41 +1100 (Fri, 17 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/TODO
-
- * Added future AC_PROG_CC_C99 stuff. Ticked off distcheck failure.
-------------------------------------------------------------------------
-r373 | hugo303 | 2006-11-17 19:56:43 +1100 (Fri, 17 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/src/Makefile.am
-   M /trunk/tests/Makefile.am
-
- * Added use of libtool functionality for hiding non-exported symbols.
-   Sourceforge feature request #1165405 and bug #1597963.
-
-------------------------------------------------------------------------
-r372 | hugo303 | 2006-11-17 19:54:29 +1100 (Fri, 17 Nov 2006) | 3 lines
-Changed paths:
-   A /trunk/tests/check_check_export_main.c
-
- * New file used for testing the exported lib with hidden symbols. The
-   old main now tests an internal lib were all symbols are still visible.
-
-------------------------------------------------------------------------
-r371 | hugo303 | 2006-11-17 19:45:29 +1100 (Fri, 17 Nov 2006) | 1 line
-Changed paths:
-   M /trunk/src/check.h.in
-
- * Added marker on exported symbols to facilitate hiding of lib-local symbols.
-------------------------------------------------------------------------
-r370 | cpickett | 2006-11-16 09:40:50 +1100 (Thu, 16 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/NEWS
-
-* Update NEWS.
-
-------------------------------------------------------------------------
-r369 | cpickett | 2006-11-16 09:36:31 +1100 (Thu, 16 Nov 2006) | 5 lines
-Changed paths:
-   M /trunk/doc/check.texi
-   M /trunk/src/check.h.in
-   M /trunk/tests/check_check_master.c
-   M /trunk/tests/ex_xml_output.c
-
-* Rename loop test iteration variable from i to _i.  This avoids
-  confusing the user due to warnings issued when using a local
-  variable i in a normal, non-looping test.
-* Add example of loop test usage to documentation.
-
-------------------------------------------------------------------------
-r368 | hugo303 | 2006-11-16 00:50:15 +1100 (Thu, 16 Nov 2006) | 3 lines
-Changed paths:
-   M /trunk/configure.ac
-   M /trunk/src/Makefile.am
-
- * Fixed coverage support to work with gcc4 and buggy libtool.
-
-
-------------------------------------------------------------------------
-r367 | hugo303 | 2006-11-16 00:41:39 +1100 (Thu, 16 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/README
-
- * Added texinfo dependencies.
-
-------------------------------------------------------------------------
-r366 | cpickett | 2006-11-15 20:20:47 +1100 (Wed, 15 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* Clarify meaning of "sporadically maintained".
-
-------------------------------------------------------------------------
-r365 | hugo303 | 2006-11-15 02:51:33 +1100 (Wed, 15 Nov 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-
- * Fixed distcheck target. SVNChangeLog added to EXTRA_DIST.
-
-------------------------------------------------------------------------
-r364 | hugo303 | 2006-11-04 00:03:55 +1100 (Sat, 04 Nov 2006) | 4 lines
-Changed paths:
-   M /trunk/tests/check_check_main.c
-   M /trunk/tests/check_check_master.c
-
- * Fixed signal string problem in tests. Strings differed between
-   OSes. Fixes Sourceforge bug #1539828. 
-
-
-------------------------------------------------------------------------
-r363 | hugo303 | 2006-10-26 23:48:54 +1000 (Thu, 26 Oct 2006) | 1 line
-Changed paths:
-   M /trunk/src/check_run.c
-
-Fixed problem with process group ID, especially visible on Solaris and LynxOS. Sourceforge bugs #1407360 and #1539828
-------------------------------------------------------------------------
-r362 | cpickett | 2006-10-14 05:25:25 +1000 (Sat, 14 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* s/yes/no/ in --enable-gcov help message.
-
-------------------------------------------------------------------------
-r359 | cpickett | 2006-10-14 04:40:38 +1000 (Sat, 14 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/NEWS
-   M /trunk/index.html
-
-* Update NEWS.
-
-------------------------------------------------------------------------
-r358 | cpickett | 2006-10-14 04:23:09 +1000 (Sat, 14 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* Oops, s/>:/:>/
-
-------------------------------------------------------------------------
-r357 | cpickett | 2006-10-14 04:20:07 +1000 (Sat, 14 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* Fixed help strings for --enable-gcov and --enable-timeout-tests
-
-------------------------------------------------------------------------
-r356 | cpickett | 2006-10-13 17:51:23 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* Update links to projects using Check.
-
-------------------------------------------------------------------------
-r355 | cpickett | 2006-10-13 17:23:13 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* Update TODO.
-
-------------------------------------------------------------------------
-r354 | cpickett | 2006-10-13 17:12:57 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* Clean up webpage a little bit more.
-
-------------------------------------------------------------------------
-r353 | cpickett | 2006-10-13 17:08:35 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/index.html
-
-* Update webpage.
-
-------------------------------------------------------------------------
-r352 | cpickett | 2006-10-13 16:33:37 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   D /trunk/htdocs
-   A /trunk/index.html (from /trunk/htdocs/index.html:351)
-
-* Move website index.html into root directory.
-
-------------------------------------------------------------------------
-r351 | cpickett | 2006-10-13 16:12:16 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/htdocs (from /trunk/website:350)
-   D /trunk/website
-
-* Rename website/ to htdocs/
-
-------------------------------------------------------------------------
-r350 | cpickett | 2006-10-13 16:02:34 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/website/index.html
-
-* Updated website.
-
-------------------------------------------------------------------------
-r346 | cpickett | 2006-10-13 14:15:58 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/src/check.h.in
-
-* Add FIXME documenting broken fail_if and fail_unless macros.
-
-------------------------------------------------------------------------
-r345 | cpickett | 2006-10-13 14:15:28 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/README
-
-* Mention dependencies better in README.
-
-------------------------------------------------------------------------
-r344 | cpickett | 2006-10-13 14:14:36 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/website
-   A /trunk/website/doc
-   A /trunk/website/index.html
-
-* Create website directory with existing index.html.
-
-------------------------------------------------------------------------
-r343 | cpickett | 2006-10-13 14:13:07 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* Update TODO.
-
-------------------------------------------------------------------------
-r342 | cpickett | 2006-10-13 14:12:41 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/src/check.h.in
-
-* Indicate that the loop index `i' of a test might be unused
-  with __attribute__((unused)). 
-
-------------------------------------------------------------------------
-r341 | cpickett | 2006-10-13 14:12:08 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/src/check.h.in
-
-* Added tcase_add_loop_test_raise_signal()
-
-------------------------------------------------------------------------
-r340 | cpickett | 2006-10-13 14:11:22 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/TODO
-
-* Update TODO, tiny Makefile.am fixes
-
-------------------------------------------------------------------------
-r339 | cpickett | 2006-10-13 14:10:50 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/src/check_log.c
-
-* Fixed printing of newlines in output.
-
-------------------------------------------------------------------------
-r338 | cpickett | 2006-10-13 14:09:56 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/HACKING
-   M /trunk/README
-   M /trunk/TODO
-   M /trunk/configure.ac
-   M /trunk/doc/Makefile.am
-   D /trunk/doc/tutorial.sgml
-
-* Removed SGML / DocBook tutorial; Texinfo version supersedes it.
-
-------------------------------------------------------------------------
-r337 | cpickett | 2006-10-13 14:08:49 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/doc/Makefile.am
-
-* Fixed doc building for make distcheck.
-* Cleaned up SVNChangeLog generation a little
-
-------------------------------------------------------------------------
-r336 | cpickett | 2006-10-13 14:08:19 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-   M /trunk/doc/check.texi
-
-* Cleaner building of diffs for check.texi
-
-------------------------------------------------------------------------
-r335 | cpickett | 2006-10-13 14:07:44 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/tests/Makefile.am
-
-* s/check_money_INCLUDES/check_money_CFLAGS/ in tests/Makefile.am
-
-------------------------------------------------------------------------
-r334 | cpickett | 2006-10-13 14:06:57 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-
-* Update TODO
-
-------------------------------------------------------------------------
-r333 | cpickett | 2006-10-13 14:05:59 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/Makefile.am
-   M /trunk/check.m4
-   A /trunk/check.pc.in
-   M /trunk/configure.ac
-
-* Added check.pc.in for pkg-config support
-
-------------------------------------------------------------------------
-r332 | cpickett | 2006-10-13 14:05:10 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/TODO
-   M /trunk/tests/check_check_fixture.c
-   M /trunk/tests/check_check_fork.c
-   M /trunk/tests/check_check_limit.c
-   M /trunk/tests/check_check_main.c
-   M /trunk/tests/check_check_master.c
-
-* Updated TODO, pulled in check.sourceforge.net TODO
-* Made tests run with CK_VERBOSE instead of CK_SILENT
-
-------------------------------------------------------------------------
-r331 | cpickett | 2006-10-13 14:03:41 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/HACKING
-   M /trunk/Makefile.am
-
-* Add SVNChangeLog generation, brief HACKING file
-
-------------------------------------------------------------------------
-r330 | cpickett | 2006-10-13 14:00:54 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-
-* Create money example diffs in tutorial Makefile.am
-
-------------------------------------------------------------------------
-r329 | cpickett | 2006-10-13 14:00:11 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Finished converting tutorial to Texinfo!
-
-------------------------------------------------------------------------
-r328 | cpickett | 2006-10-13 13:59:30 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Converted next section of Chapter 4 to Texinfo.
-
-------------------------------------------------------------------------
-r327 | cpickett | 2006-10-13 13:59:06 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/tests/check_money.c
-
-* Break another line for money_suite()
-
-------------------------------------------------------------------------
-r326 | cpickett | 2006-10-13 13:58:41 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/tests/check_money.3.c
-   M /trunk/doc/example/tests/check_money.6.c
-   M /trunk/doc/example/tests/check_money.7.c
-
-* Insert line break between type and name of money_suite()
-
-------------------------------------------------------------------------
-r325 | cpickett | 2006-10-13 13:58:04 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/tests/check_money.2.c
-   M /trunk/doc/example/tests/check_money.3.c
-   M /trunk/doc/example/tests/check_money.6.c
-   A /trunk/doc/example/tests/check_money.7.c
-   M /trunk/doc/example/tests/check_money.c
-
-* Added revision 7 of money example.
-
-------------------------------------------------------------------------
-r324 | cpickett | 2006-10-13 13:56:57 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Converted "No Fork Mode" section of Chapter 4 to Texinfo.
-
-------------------------------------------------------------------------
-r323 | cpickett | 2006-10-13 13:56:23 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Convert first section of tutorial Chapter 4 to Texinfo.
-
-------------------------------------------------------------------------
-r322 | cpickett | 2006-10-13 13:55:47 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   A /trunk/doc/example/src/money.6.c
-   M /trunk/doc/example/src/money.c
-   M /trunk/doc/example/tests/check_money.2.c
-   M /trunk/doc/example/tests/check_money.3.c
-   A /trunk/doc/example/tests/check_money.6.c
-
-* Added revision 6 of money example.
-* Fixed some whitespace errors in other revisions.
-
-------------------------------------------------------------------------
-r321 | cpickett | 2006-10-13 13:54:47 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Finally converted all of tutorial chapter 3 to Texinfo.
-
-------------------------------------------------------------------------
-r320 | cpickett | 2006-10-13 13:54:20 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example/src/money.5.c
-
-* Added revision 5 of money example.
-
-------------------------------------------------------------------------
-r319 | cpickett | 2006-10-13 13:53:41 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example/src/money.4.c
-
-* Added revision 4 of money example.
-
-------------------------------------------------------------------------
-r318 | cpickett | 2006-10-13 13:52:59 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Added next section of Chapter 3.
-
-------------------------------------------------------------------------
-r317 | cpickett | 2006-10-13 13:52:28 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example/src/money.3.c
-   A /trunk/doc/example/tests/check_money.3.c
-
-* Added revision 3 of money example.
-
-------------------------------------------------------------------------
-r316 | cpickett | 2006-10-13 13:51:41 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example/src/money.2.h
-   A /trunk/doc/example/tests/check_money.2.c
-
-* Added revision 2 of money example
-
-------------------------------------------------------------------------
-r315 | cpickett | 2006-10-13 13:50:38 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example/src/money.1.c
-   A /trunk/doc/example/src/money.1.h
-   A /trunk/doc/example/tests/check_money.1.c
-
-* Added revision 1 of money example
-
-------------------------------------------------------------------------
-r314 | cpickett | 2006-10-13 13:49:07 +1000 (Fri, 13 Oct 2006) | 4 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Converted the next section of chapter 3 to Texinfo.
-* And actually, below, chapter 3 wasn't completed.  The previous
-  section _in_ chapter 3 was completed.
-
-------------------------------------------------------------------------
-r313 | cpickett | 2006-10-13 13:48:36 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-
-* include example/ dir in AM_MAKEINFOFLAGS
-
-------------------------------------------------------------------------
-r312 | cpickett | 2006-10-13 13:47:54 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Converted chapter 3 of manual to Texinfo.
-
-------------------------------------------------------------------------
-r311 | cpickett | 2006-10-13 13:47:07 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/tests/Makefile.am
-
-* small example Makefile.am fixes
-
-------------------------------------------------------------------------
-r310 | cpickett | 2006-10-13 13:46:43 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/tests/Makefile.am
-
-* add spaces to example Makefile.am
-
-------------------------------------------------------------------------
-r309 | cpickett | 2006-10-13 13:46:16 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/THANKS
-
-* Add Robert Lemmen to AUTHORS
-
-------------------------------------------------------------------------
-r308 | cpickett | 2006-10-13 13:45:52 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/doc/tutorial.sgml
-
-* Applied patch from Robert Lemmen, adding test coverage description
-  to the (Docbook) manual.
-
-------------------------------------------------------------------------
-r307 | cpickett | 2006-10-13 13:45:09 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Partway through Chapter 3.
-
-------------------------------------------------------------------------
-r306 | cpickett | 2006-10-13 13:44:39 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Converted chapter 2 of manual to Texinfo.
-
-------------------------------------------------------------------------
-r305 | cpickett | 2006-10-13 13:44:12 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Converted first chapter to Texinfo.
-
-------------------------------------------------------------------------
-r304 | cpickett | 2006-10-13 13:43:41 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/check.texi
-
-* Update manual structure a little.
-
-------------------------------------------------------------------------
-r303 | cpickett | 2006-10-13 13:43:12 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-   M /trunk/doc/check.texi
-   A /trunk/doc/fdl.texi
-
-* add hooks to Makefile.am, include copy of FDL
-
-------------------------------------------------------------------------
-r302 | cpickett | 2006-10-13 13:41:40 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/check.texi (from /trunk/doc/tutorial.texi:301)
-   D /trunk/doc/tutorial.texi
-
-* rename tutorial.texi to check.texi
-
-------------------------------------------------------------------------
-r301 | cpickett | 2006-10-13 13:41:09 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/tutorial.texi
-
-* create Texinfo boilerplate for Check manual / tutorial
-
-------------------------------------------------------------------------
-r300 | cpickett | 2006-10-13 13:40:25 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/check.m4
-
-* Applied patch from Loic Minier to fix check.m4.
-  From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342864
-
-------------------------------------------------------------------------
-r299 | cpickett | 2006-10-13 13:39:41 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/TODO
-   M /trunk/configure.ac
-   M /trunk/doc/example/configure.ac
-   M /trunk/src/Makefile.am
-   M /trunk/tests/Makefile.am
-
-* update check to use libtool, now both static and shared
-  libraries are created.
-
-------------------------------------------------------------------------
-r298 | cpickett | 2006-10-13 13:38:33 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-
-* include money src, tests in doc EXTRA_DIST
-
-------------------------------------------------------------------------
-r297 | cpickett | 2006-10-13 13:38:07 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-   M /trunk/doc/Makefile.am
-
-* fix installation of tutorial and example docs
-
-------------------------------------------------------------------------
-r296 | cpickett | 2006-10-13 13:37:39 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-
-* include example README in distribution
-
-------------------------------------------------------------------------
-r295 | cpickett | 2006-10-13 13:37:00 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example/README
-
-* add README to money example
-
-------------------------------------------------------------------------
-r294 | cpickett | 2006-10-13 13:34:16 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/tutorial.sgml
-
-* add a missing quote to tutorial
-
-------------------------------------------------------------------------
-r293 | cpickett | 2006-10-13 13:33:25 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/configure.ac
-   M /trunk/doc/example/src/Makefile.am
-   M /trunk/doc/example/src/money.c
-   M /trunk/doc/example/tests/Makefile.am
-   M /trunk/doc/example/tests/check_money.c
-
-* fix money example somewhat
-
-------------------------------------------------------------------------
-r292 | cpickett | 2006-10-13 13:32:46 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* change unique file in AC_CONFIG_SRCDIR
-
-------------------------------------------------------------------------
-r291 | cpickett | 2006-10-13 13:32:02 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/configure.ac
-   M /trunk/doc/Makefile.am
-
-* Use $(datadir) in Makefile.am's
-
-------------------------------------------------------------------------
-r290 | cpickett | 2006-10-13 13:31:33 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/Makefile.am
-
-* Adjusted doc Makefile.am to use example, tutorial subdirs better
-
-------------------------------------------------------------------------
-r289 | cpickett | 2006-10-13 13:30:47 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/doc/example/Makefile.am
-   M /trunk/doc/example/configure.ac
-   A /trunk/doc/example/src/Makefile.am
-   A /trunk/doc/example/src/main.c
-   M /trunk/doc/example/src/money.c
-   M /trunk/doc/example/src/money.h
-   A /trunk/doc/example/tests/Makefile.am
-   M /trunk/doc/example/tests/check_money.c
-
-* Rewrite Makefiles to accomodate new example structure
-
-------------------------------------------------------------------------
-r288 | cpickett | 2006-10-13 13:28:43 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   D /trunk/doc/example/check_money.c
-   D /trunk/doc/example/money.c
-   D /trunk/doc/example/money.h
-   A /trunk/doc/example/src
-   A /trunk/doc/example/src/money.c (from /trunk/doc/example/money.c:285)
-   A /trunk/doc/example/src/money.h (from /trunk/doc/example/money.h:285)
-   A /trunk/doc/example/tests
-   A /trunk/doc/example/tests/check_money.c (from /trunk/doc/example/check_money.c:285)
-
-* Move money example source into src/ and tests/
-
-------------------------------------------------------------------------
-r287 | cpickett | 2006-10-13 13:26:35 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   A /trunk/doc/example/Makefile.am (from /trunk/doc/example/Makefile.am.money:285)
-   D /trunk/doc/example/Makefile.am.money
-   A /trunk/doc/example/configure.ac (from /trunk/doc/example/configure.in.money:285)
-   D /trunk/doc/example/configure.in.money
-
-* Renamed Makefile.am.money to Makefile.am
-* Renamed configure.in.money to configure.ac
-
-------------------------------------------------------------------------
-r286 | cpickett | 2006-10-13 13:24:34 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   D /trunk/doc/example/Makefile.am
-
-* delete old Makefile.am
-
-------------------------------------------------------------------------
-r285 | cpickett | 2006-10-13 13:23:36 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/doc/example (from /trunk/doc/money:284)
-   D /trunk/doc/money
-
-* Rename money to example
-
-------------------------------------------------------------------------
-r284 | cpickett | 2006-10-13 13:19:55 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/TODO
-   D /trunk/doc/money/aclocal.m4
-
-* Update TODO, remove generated aclocal.m4 from money example
-
-------------------------------------------------------------------------
-r283 | cpickett | 2006-10-13 13:18:54 +1000 (Fri, 13 Oct 2006) | 5 lines
-Changed paths:
-   D /trunk/INSTALL
-   M /trunk/README
-   M /trunk/THANKS
-   M /trunk/TODO
-   M /trunk/configure.ac
-   D /trunk/rpm
-
-* Remove installation instructions
-* Remove rpm target altogether
-* Update README with comments from downstream Fedora Extras
-  and Debian maintainers
-
-------------------------------------------------------------------------
-r282 | cpickett | 2006-10-13 13:18:04 +1000 (Fri, 13 Oct 2006) | 4 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/tests/Makefile.am
-
-* Removed $(MAKE) compilation of libcheck.a in tests/Makefile.am
-* Removed core from CLEANFILES in tests/Makefile.am
-* Put tests at the end of top-level SUBDIRS
-
-------------------------------------------------------------------------
-r281 | cpickett | 2006-10-13 13:17:18 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   D /trunk/Doxyfile
-
-* delete obsolete Doxyfile
-
-------------------------------------------------------------------------
-r280 | cpickett | 2006-10-13 13:16:36 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/TODO
-
-* simple TODO file, just build issues for now
-
-------------------------------------------------------------------------
-r279 | cpickett | 2006-10-13 13:15:57 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/configure.ac
-   M /trunk/doc/Makefile.am
-   M /trunk/doc/money/Makefile.am
-
-* various fixes to doc building and installation
-
-------------------------------------------------------------------------
-r278 | cpickett | 2006-10-13 13:15:21 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/configure.ac
-
-* Remove debian from top-level Makefile.am and configure.ac
-
-------------------------------------------------------------------------
-r277 | cpickett | 2006-10-13 13:14:20 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/NEWS
-   M /trunk/configure.ac
-   M /trunk/doc/Makefile.am
-   M /trunk/doc/money/Makefile.am
-
-* Got rid of --enable-plain-docdir : just let packagers take care
-  of this if they want to.
-
-------------------------------------------------------------------------
-r276 | cpickett | 2006-10-13 13:13:37 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   D /trunk/debian
-
-* Delete debian/ per Debian maintainer's suggestion
-  -- it's better not for upstream to manage packaging for distributions
-
-------------------------------------------------------------------------
-r275 | cpickett | 2006-10-13 13:12:50 +1000 (Fri, 13 Oct 2006) | 8 lines
-Changed paths:
-   M /trunk/NEWS
-   M /trunk/configure.ac
-   M /trunk/doc/Makefile.am
-   M /trunk/src/Makefile.am
-   M /trunk/tests/Makefile.am
-
-* Replaced .. usage in Makefile.am's with $(top_builddir) or 
-  $(top_srcdir) where appropriate
-  -- make distcheck now works, make distcleancheck and
-     make distuninstallcheck do not
-* Added core to CLEANFILES in tests/Makefile.am
-* Bumped version to 0.9.4, added notice to top of NEWS 
-  -- should bump version in CVS right after release
-
-------------------------------------------------------------------------
-r274 | cpickett | 2006-10-13 13:11:12 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-   M /trunk/debian/Makefile.am
-   M /trunk/doc/Makefile.am
-   M /trunk/doc/money/Makefile.am
-   M /trunk/doc/money/Makefile.am.money
-   M /trunk/rpm/Makefile.am
-   M /trunk/src/Makefile.am
-   M /trunk/tests/Makefile.am
-
-* Comments in Makefile.am's
-
-------------------------------------------------------------------------
-r273 | cpickett | 2006-10-13 13:10:08 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/AUTHORS
-   M /trunk/NEWS
-
-* Add change notice to AUTHORS, NEWS
-
-------------------------------------------------------------------------
-r272 | cpickett | 2006-10-13 13:09:21 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/README
-
-* Updated README to mention docbook2html
-
-------------------------------------------------------------------------
-r271 | cpickett | 2006-10-13 13:08:27 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-
-* Remove autogen.sh from EXTRA_DIST
-
-------------------------------------------------------------------------
-r270 | cpickett | 2006-10-13 13:07:50 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/Makefile.am
-
-* Change COPYING to COPYING.LESSER in Makefile.am
-
-------------------------------------------------------------------------
-r269 | cpickett | 2006-10-13 13:06:36 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* remove accidental junk line from configure.ac
-
-------------------------------------------------------------------------
-r268 | cpickett | 2006-10-13 13:05:55 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   D /trunk/acinclude.m4
-   D /trunk/stamp-h.in
-
-* Removed acinclude.m4 because it was empty
-* Removed stamp-h.in because it is automatically generated
-
-------------------------------------------------------------------------
-r267 | cpickett | 2006-10-13 13:05:06 +1000 (Fri, 13 Oct 2006) | 6 lines
-Changed paths:
-   D /trunk/COPYING
-   A /trunk/COPYING.LESSER
-
-* Removed COPYING, replaced with COPYING.LESSER
-  The LGPL-2.1 in COPYING had some problems:
-    -- out of date, FSF address has changed
-    -- formatting (linebreaks and such) has changed or is unofficial
-    -- COPYING is actually for GPL, so use COPYING.LESSER instead
-
-------------------------------------------------------------------------
-r266 | cpickett | 2006-10-13 13:02:53 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   M /trunk/tests/Makefile.am
-
-* change INCLUDES to AM_CPPFLAGS to stop Automake from complaining
-
-------------------------------------------------------------------------
-r265 | cpickett | 2006-10-13 13:01:50 +1000 (Fri, 13 Oct 2006) | 3 lines
-Changed paths:
-   M /trunk/AUTHORS
-   A /trunk/THANKS
-
-* moved design suggestions out of AUTHORS and into THANKS
-  -- AUTHORS is for people with copyright over some piece of Check
-
-------------------------------------------------------------------------
-r264 | cpickett | 2006-10-13 12:58:52 +1000 (Fri, 13 Oct 2006) | 4 lines
-Changed paths:
-   M /trunk/configure.ac
-
-* Updated configure.ac to use 2.59 macro syntax
-* Ran autoscan, merged generated configure.scan with configure.ac
-  -- this resolves autoscan warnings
-
-------------------------------------------------------------------------
-r263 | cpickett | 2006-10-13 12:57:19 +1000 (Fri, 13 Oct 2006) | 17 lines
-Changed paths:
-   M /trunk/README
-   D /trunk/autogen.sh
-   D /trunk/config.h.in
-
-* Removed config.h.in -- generated automatically by autoheader
-
-* Removed autogen.sh.  Unnecessary features inside included:
-    1) checking version of autoconf, automake (twice each)
-    2) checking for being in the top-level project dir
-    3) running configure automatically
-    4) specifying --include-deps to automake (obsolete)
-    5) some autoheader line I don't understand:
-       (autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
-    6) calling configure --enable-maintainer-mode, which is no
-       longer recognized by configure
-
-* Updated README to specify latest autoconf and automake,
-  and usage of autoreconf --install instead of ./autogen.sh
-
-* Note: this build is still broken
-
-------------------------------------------------------------------------
-r262 | cpickett | 2006-10-13 12:09:26 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/configure.ac (from /trunk/configure.in:261)
-   D /trunk/configure.in
-
-* svn mv configure.in configure.ac
-
-------------------------------------------------------------------------
-r261 | cpickett | 2006-10-13 10:29:39 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   D /trunk/check
-
-* Remove old trunk/check directory.
-
-------------------------------------------------------------------------
-r260 | cpickett | 2006-10-13 10:24:56 +1000 (Fri, 13 Oct 2006) | 2 lines
-Changed paths:
-   A /trunk/.cvsignore (from /trunk/check/.cvsignore:259)
-   A /trunk/AUTHORS (from /trunk/check/AUTHORS:259)
-   A /trunk/COPYING (from /trunk/check/COPYING:259)
-   A /trunk/ChangeLog (from /trunk/check/ChangeLog:259)
-   A /trunk/ChangeLogOld (from /trunk/check/ChangeLogOld:259)
-   A /trunk/Doxyfile (from /trunk/check/Doxyfile:259)
-   A /trunk/INSTALL (from /trunk/check/INSTALL:259)
-   A /trunk/Makefile.am (from /trunk/check/Makefile.am:259)
-   A /trunk/NEWS (from /trunk/check/NEWS:259)
-   A /trunk/README (from /trunk/check/README:259)
-   A /trunk/acinclude.m4 (from /trunk/check/acinclude.m4:259)
-   A /trunk/autogen.sh (from /trunk/check/autogen.sh:259)
-   D /trunk/check/.cvsignore
-   D /trunk/check/AUTHORS
-   D /trunk/check/COPYING
-   D /trunk/check/ChangeLog
-   D /trunk/check/ChangeLogOld
-   D /trunk/check/Doxyfile
-   D /trunk/check/INSTALL
-   D /trunk/check/Makefile.am
-   D /trunk/check/NEWS
-   D /trunk/check/README
-   D /trunk/check/acinclude.m4
-   D /trunk/check/autogen.sh
-   D /trunk/check/check.m4
-   D /trunk/check/config.h.in
-   D /trunk/check/configure.in
-   D /trunk/check/debian
-   D /trunk/check/doc
-   D /trunk/check/rpm
-   D /trunk/check/src
-   D /trunk/check/stamp-h.in
-   D /trunk/check/tests
-   A /trunk/check.m4 (from /trunk/check/check.m4:259)
-   A /trunk/config.h.in (from /trunk/check/config.h.in:259)
-   A /trunk/configure.in (from /trunk/check/configure.in:259)
-   A /trunk/debian (from /trunk/check/debian:259)
-   A /trunk/doc (from /trunk/check/doc:259)
-   A /trunk/rpm (from /trunk/check/rpm:259)
-   A /trunk/src (from /trunk/check/src:259)
-   A /trunk/stamp-h.in (from /trunk/check/stamp-h.in:259)
-   A /trunk/tests (from /trunk/check/tests:259)
-
-* Move trunk/check/* to trunk/.
-
-------------------------------------------------------------------------
-r259 | hugo303 | 2005-12-17 02:19:16 +1100 (Sat, 17 Dec 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Fixed eprintf arguments
-
-------------------------------------------------------------------------
-r258 | hugo303 | 2005-12-17 02:07:01 +1100 (Sat, 17 Dec 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_pack.c
-
-Fixed eprintf string
-
-------------------------------------------------------------------------
-r257 | hugo303 | 2005-10-31 23:35:18 +1100 (Mon, 31 Oct 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/NEWS
-
-Fixed sourceforge bug #1327225, Two teardown checked fixtures segfaults
-
-------------------------------------------------------------------------
-r256 | hugo303 | 2005-10-31 23:29:12 +1100 (Mon, 31 Oct 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_fixture.c
-
-Added tests for several setup and teardown functions.
-
-------------------------------------------------------------------------
-r255 | hugo303 | 2005-10-31 23:25:59 +1100 (Mon, 31 Oct 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_list.c
-
-Added tests for list_add_front.
-
-------------------------------------------------------------------------
-r254 | hugo303 | 2005-10-31 23:25:12 +1100 (Mon, 31 Oct 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_list.c
-
-Fixed memove bug in list_add_front. Pointer arithmetics bites again.
-
-------------------------------------------------------------------------
-r253 | hugo303 | 2005-09-30 22:19:44 +1000 (Fri, 30 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/doc/tutorial.sgml
-
-Updated documentation with a section about looping tests
-
-------------------------------------------------------------------------
-r252 | hugo303 | 2005-09-30 21:43:03 +1000 (Fri, 30 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/NEWS
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/ex_xml_output.c
-   M /trunk/check/tests/test_log_output.sh
-   M /trunk/check/tests/test_output.sh
-   M /trunk/check/tests/test_xml_output.sh
-
-Looping tests added
-
-------------------------------------------------------------------------
-r251 | hugo303 | 2005-09-22 00:42:10 +1000 (Thu, 22 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_sub.c
-
-Fixed line number error introduced when adding configure option --enable-timeout-tests=no
-
-------------------------------------------------------------------------
-r250 | hugo303 | 2005-09-15 23:04:17 +1000 (Thu, 15 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/configure.in
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/check_check.h
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Added possibility to turn off timeout tests through configure option --enable-timeout-tests=no
-
-------------------------------------------------------------------------
-r249 | hugo303 | 2005-09-15 19:55:21 +1000 (Thu, 15 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Coverage improvements
-
-------------------------------------------------------------------------
-r248 | hugo303 | 2005-09-15 19:52:26 +1000 (Thu, 15 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-
-Improved coverage analysis by running all tests before compiling result. Added gcc3.3 coverage bug workaround.
-
-------------------------------------------------------------------------
-r247 | hugo303 | 2005-09-15 19:49:11 +1000 (Thu, 15 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Added testing of timeout set through environment variable
-
-------------------------------------------------------------------------
-r246 | hugo303 | 2005-09-15 00:24:14 +1000 (Thu, 15 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Added gcov/lcov support
-
-------------------------------------------------------------------------
-r245 | hugo303 | 2005-09-08 01:10:17 +1000 (Thu, 08 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/configure.in
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/tests/Makefile.am
-
-Added gcov/lcov support
-
-------------------------------------------------------------------------
-r244 | hugo303 | 2005-09-08 00:35:18 +1000 (Thu, 08 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/Makefile.am
-
-Clean emacs temp files
-
-------------------------------------------------------------------------
-r243 | hugo303 | 2005-09-08 00:24:57 +1000 (Thu, 08 Sep 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_list.c
-
-Added a test to get 100% coverage
-
-------------------------------------------------------------------------
-r241 | hugo303 | 2005-08-30 19:12:23 +1000 (Tue, 30 Aug 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Post 0.9.3 fixes
-
-------------------------------------------------------------------------
-r240 | hugo303 | 2005-08-30 19:05:22 +1000 (Tue, 30 Aug 2005) | 2 lines
-Changed paths:
-   A /trunk/check/debian/README.Debian
-   A /trunk/check/debian/compat
-   M /trunk/check/debian/copyright
-   A /trunk/check/debian/docs
-   A /trunk/check/debian/example_makefile
-   A /trunk/check/debian/examples
-   A /trunk/check/debian/watch
-
-Added new debian files, missed in the checkin of the debian patch
-
-------------------------------------------------------------------------
-r239 | hugo303 | 2005-08-30 18:40:11 +1000 (Tue, 30 Aug 2005) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-
-Added missed NEWS update for 0.9.3
-
-------------------------------------------------------------------------
-r237 | hugo303 | 2005-08-23 23:28:00 +1000 (Tue, 23 Aug 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Added debian fixes
-
-------------------------------------------------------------------------
-r236 | hugo303 | 2005-08-22 23:46:48 +1000 (Mon, 22 Aug 2005) | 2 lines
-Changed paths:
-   M /trunk/check/debian/changelog
-   M /trunk/check/debian/check.doc-base.tut
-   M /trunk/check/debian/check.docs
-   M /trunk/check/debian/check.postinst.debhelper
-   M /trunk/check/debian/check.prerm.debhelper
-   M /trunk/check/debian/control
-   M /trunk/check/debian/copyright
-   M /trunk/check/debian/dirs
-   M /trunk/check/debian/rules
-
-Applied patch for debian files received from check debian maintainer Robert Lemmen
-
-------------------------------------------------------------------------
-r235 | hugo303 | 2005-08-22 23:42:53 +1000 (Mon, 22 Aug 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.h.in
-
-Added include of stddef.h for NULL definition
-
-------------------------------------------------------------------------
-r234 | hugo303 | 2005-08-22 23:36:43 +1000 (Mon, 22 Aug 2005) | 2 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.sgml
-
-Fixed sourceforge bug #1216502
-
-------------------------------------------------------------------------
-r233 | hugo303 | 2005-07-19 23:53:37 +1000 (Tue, 19 Jul 2005) | 2 lines
-Changed paths:
-   M /trunk/check/configure.in
-
-Updated for 0.9.3 release
-
-------------------------------------------------------------------------
-r232 | hugo303 | 2005-07-19 23:02:43 +1000 (Tue, 19 Jul 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Refactored messaging
-
-------------------------------------------------------------------------
-r231 | hugo303 | 2005-07-19 22:54:45 +1000 (Tue, 19 Jul 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_sub.c
-
-Refactored messaging to use the new tmpfile() method all the way, removing the message keys, pipes, pipe entries and pipe list. This makes the messaging work with forking tests, and also with threading tests on linux 2.4 (on 2.6 it already worked). Added check_fork and check_waitpid_and_exit to be used for forking tests.
-
-------------------------------------------------------------------------
-r230 | hugo303 | 2005-07-18 21:05:00 +1000 (Mon, 18 Jul 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_main.c
-
-Use correct variable for number of tests
-
-------------------------------------------------------------------------
-r229 | hugo303 | 2005-05-27 06:12:31 +1000 (Fri, 27 May 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/debian/Makefile.am
-
-Removed 'files' file from DIST
-
-------------------------------------------------------------------------
-r228 | hugo303 | 2005-03-30 00:30:06 +1000 (Wed, 30 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.h.in
-
-Fixed gcc 2.95.3 compatibility for VA_ARGS in fail_if
-
-------------------------------------------------------------------------
-r227 | hugo303 | 2005-03-30 00:25:56 +1000 (Wed, 30 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-
-Removed warning introduced by 2005-03-01 test timeout fix
-
-------------------------------------------------------------------------
-r226 | hugo303 | 2005-03-03 00:07:07 +1100 (Thu, 03 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.h.in
-
-Added define for NULL if needed
-
-------------------------------------------------------------------------
-r225 | hugo303 | 2005-03-01 20:46:47 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check_run.c
-
-Changed timeout error message
-
-------------------------------------------------------------------------
-r224 | hugo303 | 2005-03-01 20:41:31 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_master.c
-
-Updated tests for timeout message change
-
-------------------------------------------------------------------------
-r223 | hugo303 | 2005-03-01 01:46:46 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   D /trunk/check/debian/files
-
-Removed auto generated debian file
-
-------------------------------------------------------------------------
-r222 | hugo303 | 2005-03-01 01:06:23 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/rpm/check.spec.in
-
-Added patch for x86_64 arch (fc3)
-
-------------------------------------------------------------------------
-r221 | hugo303 | 2005-03-01 00:42:53 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Fixed mem leaks
-
-------------------------------------------------------------------------
-r220 | hugo303 | 2005-03-01 00:35:19 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/ex_output.c
-
-Added free of srunner
-
-------------------------------------------------------------------------
-r219 | hugo303 | 2005-03-01 00:28:06 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_log.c
-
-Fixed memory leaks in xml log
-
-------------------------------------------------------------------------
-r218 | hugo303 | 2005-03-01 00:26:59 +1100 (Tue, 01 Mar 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/ex_log_output.c
-   M /trunk/check/tests/ex_xml_output.c
-
-Added free of srunner
-
-------------------------------------------------------------------------
-r216 | hugo303 | 2005-01-04 20:42:35 +1100 (Tue, 04 Jan 2005) | 2 lines
-Changed paths:
-   M /trunk/check/debian/files
-
-Fixed for 0.9.2
-
-------------------------------------------------------------------------
-r215 | hugo303 | 2005-01-04 19:57:00 +1100 (Tue, 04 Jan 2005) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated with latest changes
-
-------------------------------------------------------------------------
-r214 | hugo303 | 2005-01-04 19:56:03 +1100 (Tue, 04 Jan 2005) | 2 lines
-Changed paths:
-   M /trunk/check/check.m4
-   M /trunk/check/config.h.in
-   M /trunk/check/configure.in
-   M /trunk/check/src/check_pack.c
-
-Fixed quoting and added configure test for stdint.h.
-
-------------------------------------------------------------------------
-r213 | hugo303 | 2005-01-04 19:47:04 +1100 (Tue, 04 Jan 2005) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_master.c
-
-Made fail strings more helpful
-
-------------------------------------------------------------------------
-r212 | hugo303 | 2004-11-12 22:00:49 +1100 (Fri, 12 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Debian fixes
-
-------------------------------------------------------------------------
-r211 | hugo303 | 2004-11-12 21:56:36 +1100 (Fri, 12 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/debian/changelog
-   M /trunk/check/debian/check.dirs
-   M /trunk/check/debian/control
-   M /trunk/check/debian/rules
-
-Fixed building with gcc3. Removed empty money dir from docs
-
-------------------------------------------------------------------------
-r210 | hugo303 | 2004-11-11 22:19:24 +1100 (Thu, 11 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/debian/control
-   M /trunk/check/rpm/check.spec.in
-
-Fixed mail address
-
-------------------------------------------------------------------------
-r209 | hugo303 | 2004-11-10 23:49:49 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/rpm/Makefile.am
-
-Added autogenerated check.spec to CLEANFILES
-
-------------------------------------------------------------------------
-r208 | hugo303 | 2004-11-10 23:26:29 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/NEWS
-
-Preparations for 0.9.2 release
-
-------------------------------------------------------------------------
-r207 | hugo303 | 2004-11-10 23:16:57 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Use strsignal to print describing text for signals.
-
-------------------------------------------------------------------------
-r206 | hugo303 | 2004-11-10 23:12:35 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.am
-
-Added debian target
-
-------------------------------------------------------------------------
-r205 | hugo303 | 2004-11-10 23:06:38 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/rpm/Makefile.am
-
-Added variable for RPM release number
-
-------------------------------------------------------------------------
-r204 | hugo303 | 2004-11-10 22:55:20 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/configure.in
-   M /trunk/check/debian/changelog
-   M /trunk/check/rpm/check.spec.in
-
-Updated for 0.9.2 release
-
-------------------------------------------------------------------------
-r203 | hugo303 | 2004-11-10 22:03:41 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/debian/control
-
-Changed maintainer
-
-------------------------------------------------------------------------
-r202 | hugo303 | 2004-11-10 21:56:31 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/AUTHORS
-
-Added more names
-
-------------------------------------------------------------------------
-r201 | hugo303 | 2004-11-10 02:42:26 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_master.c
-
-Use strsignal to print describing text for signals.
-
-------------------------------------------------------------------------
-r200 | hugo303 | 2004-11-10 02:29:55 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_list.c
-
-Fixed warning
-
-------------------------------------------------------------------------
-r199 | hugo303 | 2004-11-10 01:51:15 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/doc/tutorial.sgml
-
-Documented signals handling and timeouts
-
-------------------------------------------------------------------------
-r198 | hugo303 | 2004-11-10 00:38:47 +1100 (Wed, 10 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.h.in
-   M /trunk/check/tests/check_check_master.c
-
-Changed failure message for fail_if
-
-------------------------------------------------------------------------
-r197 | hugo303 | 2004-11-09 23:49:41 +1100 (Tue, 09 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Added support for timeouts on tests, enabling detection of eternal loops as errors.
-
-------------------------------------------------------------------------
-r196 | hugo303 | 2004-11-09 01:40:05 +1100 (Tue, 09 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_run.c
-
-Added support for testing on expected signals.
-
-------------------------------------------------------------------------
-r195 | hugo303 | 2004-11-09 01:31:49 +1100 (Tue, 09 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_master.c
-
-Added tests for signals patch and cleaned up the verification functions
-
-------------------------------------------------------------------------
-r194 | hugo303 | 2004-11-09 01:31:01 +1100 (Tue, 09 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_sub.c
-
-Added tests for signals patch
-
-------------------------------------------------------------------------
-r193 | hugo303 | 2004-11-05 00:51:03 +1100 (Fri, 05 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_list.c
-   M /trunk/check/src/check_list.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/tests/check_list.c
-
-Changed name on function list_create to check_list_create to avoid name clash
-
-------------------------------------------------------------------------
-r192 | hugo303 | 2004-11-05 00:03:42 +1100 (Fri, 05 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.sgml
-
-Fixed stale link to gnu autounit
-
-------------------------------------------------------------------------
-r191 | hugo303 | 2004-11-04 23:52:10 +1100 (Thu, 04 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/check.m4
-
-Fixed underquoted definition of AM_PATH_CHECK
-
-------------------------------------------------------------------------
-r190 | hugo303 | 2004-11-04 23:42:51 +1100 (Thu, 04 Nov 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Applied ANSI C99 patch (#1047014)
-
-------------------------------------------------------------------------
-r188 | hugo303 | 2004-09-03 21:50:51 +1000 (Fri, 03 Sep 2004) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/configure.in
-
-Updated for 0.9.1 release
-
-------------------------------------------------------------------------
-r187 | hugo303 | 2004-08-20 21:21:39 +1000 (Fri, 20 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/doc/tutorial.sgml
-
-Updated documentation with new features
-
-------------------------------------------------------------------------
-r186 | hugo303 | 2004-08-18 22:52:09 +1000 (Wed, 18 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check_print.c
-   M /trunk/check/tests/test_xml_output.sh
-
-Fixed distcheck problem
-
-------------------------------------------------------------------------
-r185 | hugo303 | 2004-08-18 22:08:09 +1000 (Wed, 18 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/tests/Makefile.am
-
-Added test_xml_output.sh to EXTRA_DIST
-
-------------------------------------------------------------------------
-r184 | hugo303 | 2004-08-18 22:02:02 +1000 (Wed, 18 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_log.h
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_print.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/check_check_log.c
-   A /trunk/check/tests/ex_xml_output.c
-   A /trunk/check/tests/test_xml_output.sh
-
-Added support for XML output of the test results.
-
-------------------------------------------------------------------------
-r183 | hugo303 | 2004-08-18 19:23:02 +1000 (Wed, 18 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/tests/check_check_fixture.c
-
-Fixed setup bug from forum, failure in setup did not abort test in nofork mode. Added test cases for bug.
-
-------------------------------------------------------------------------
-r182 | hugo303 | 2004-08-18 19:19:37 +1000 (Wed, 18 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-
-Fixed setup bug from forum, failure in setup did not abort test in nofork mode.
-
-------------------------------------------------------------------------
-r181 | hugo303 | 2004-08-18 00:39:30 +1000 (Wed, 18 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check_pack.c
-
-Use stdint.h for specific sized type
-
-------------------------------------------------------------------------
-r180 | hugo303 | 2004-08-17 19:50:36 +1000 (Tue, 17 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Applied varargs patch (#933411) and added test cases.
-
-------------------------------------------------------------------------
-r179 | hugo303 | 2004-08-17 18:39:12 +1000 (Tue, 17 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/src/check.h.in
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Applied fail_if (#709167) patch
-
-------------------------------------------------------------------------
-r178 | hugo303 | 2004-08-17 00:40:35 +1000 (Tue, 17 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated with latest changes
-
-------------------------------------------------------------------------
-r177 | hugo303 | 2004-08-17 00:11:31 +1000 (Tue, 17 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/rpm/check.spec.in
-
-Applied doc patch from Bill Barnard
-
-------------------------------------------------------------------------
-r176 | hugo303 | 2004-08-17 00:01:27 +1000 (Tue, 17 Aug 2004) | 2 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.sgml
-
-Applied 'newbies' patch for autoconf doc.
-
-------------------------------------------------------------------------
-r175 | hugo303 | 2004-06-05 00:52:40 +1000 (Sat, 05 Jun 2004) | 2 lines
-Changed paths:
-   M /trunk/check/tests/test_log_output.sh
-   M /trunk/check/tests/test_output.sh
-
-Fixed portability problem by changing == to =.
-
-------------------------------------------------------------------------
-r174 | hugo303 | 2004-05-26 19:55:37 +1000 (Wed, 26 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/rpm/check.spec.in
-
-Changed copyright
-
-------------------------------------------------------------------------
-r173 | hugo303 | 2004-05-25 17:46:03 +1000 (Tue, 25 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-
-Applied patch 796705. Replacing _exit with exit
-
-------------------------------------------------------------------------
-r172 | hugo303 | 2004-05-25 17:38:36 +1000 (Tue, 25 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Applied patch for bug 793671
-
-------------------------------------------------------------------------
-r170 | hugo303 | 2004-05-25 17:05:15 +1000 (Tue, 25 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/NEWS
-   M /trunk/check/configure.in
-
-Released 0.9.0
-
-------------------------------------------------------------------------
-r169 | hugo303 | 2004-05-17 18:46:53 +1000 (Mon, 17 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/NEWS
-
-Released 0.8.5
-
-------------------------------------------------------------------------
-r168 | hugo303 | 2004-05-17 18:42:08 +1000 (Mon, 17 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/AUTHORS
-
-Updated with new maintainer
-
-------------------------------------------------------------------------
-r167 | hugo303 | 2004-05-17 17:30:56 +1000 (Mon, 17 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_list.c
-   M /trunk/check/src/check_list.h
-
-Run fixture teardowns in reverse order to setup
-
-------------------------------------------------------------------------
-r166 | hugo303 | 2004-05-15 01:26:45 +1000 (Sat, 15 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.sgml
-
-Updated doc to show test name when printing
-
-------------------------------------------------------------------------
-r165 | hugo303 | 2004-05-15 00:41:20 +1000 (Sat, 15 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/configure.in
-
-Replaced lyx stuff with docbook. Bumped minor version. Removed autoconf warnings
-
-------------------------------------------------------------------------
-r164 | hugo303 | 2004-05-15 00:39:37 +1000 (Sat, 15 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/acinclude.m4
-
-Removed lyx stuff
-
-------------------------------------------------------------------------
-r163 | hugo303 | 2004-05-15 00:35:18 +1000 (Sat, 15 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/doc/Makefile.am
-   D /trunk/check/doc/index.html
-   D /trunk/check/doc/tutorial.lyx
-   A /trunk/check/doc/tutorial.sgml
-
-Updated documentation according to changes. Changed to docbook format
-
-------------------------------------------------------------------------
-r162 | hugo303 | 2004-05-15 00:33:35 +1000 (Sat, 15 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/doc/money/check_money.c
-
-Removed suite_free()
-
-------------------------------------------------------------------------
-r161 | hugo303 | 2004-05-15 00:09:46 +1000 (Sat, 15 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_fork.c
-   M /trunk/check/tests/check_check_log.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_sub.c
-   M /trunk/check/tests/check_stress.c
-   M /trunk/check/tests/ex_log_output.c
-   M /trunk/check/tests/ex_output.c
-   M /trunk/check/tests/test_log_output.sh
-   M /trunk/check/tests/test_output.sh
-
-Updated according to implementation changes. Applied distcheck patch (802160).
-
-------------------------------------------------------------------------
-r160 | hugo303 | 2004-05-14 23:54:49 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-
-Added name of test to result.
-
-------------------------------------------------------------------------
-r159 | hugo303 | 2004-05-14 23:53:02 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-
-Fixed message for nofork failures.
-
-------------------------------------------------------------------------
-r158 | hugo303 | 2004-05-14 22:11:16 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-
-Fixed message for nofork failures.
-
-------------------------------------------------------------------------
-r157 | hugo303 | 2004-05-14 22:08:11 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_print.h
-
-Added new print mode that reads the mode from environment variable.
-
-------------------------------------------------------------------------
-r156 | hugo303 | 2004-05-14 22:05:49 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_list.c
-
-Fixed bug in NULL check
-
-------------------------------------------------------------------------
-r155 | hugo303 | 2004-05-14 22:04:31 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_impl.h
-
-Added name of test to result.
-
-------------------------------------------------------------------------
-r154 | hugo303 | 2004-05-14 22:02:51 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.h.in
-
-Made suite_free and tcase_free static. Added new print mode that reads the mode from environment variable.
-
-------------------------------------------------------------------------
-r153 | hugo303 | 2004-05-14 22:00:53 +1000 (Fri, 14 May 2004) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-
-Added free of suites when freeing srunner. Made suite_free and tcase_free static. Added name of test to result.
-
-------------------------------------------------------------------------
-r152 | neo23 | 2002-10-21 21:29:53 +1000 (Mon, 21 Oct 2002) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/NEWS
-
-Made 0.8.4 release.
-
-------------------------------------------------------------------------
-r151 | neo23 | 2002-10-16 21:47:44 +1000 (Wed, 16 Oct 2002) | 2 lines
-Changed paths:
-   M /trunk/check/AUTHORS
-   M /trunk/check/ChangeLog
-   M /trunk/check/configure.in
-
-Bumped version number to 0.8.4. Updated AUTHORS and ChangeLog.
-
-------------------------------------------------------------------------
-r150 | neo23 | 2002-10-16 21:39:48 +1000 (Wed, 16 Oct 2002) | 5 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/tests/check_check_msg.c
-
-Applied a patch from Rick Poyner that changes the pipe used for IPC
-to use a temporary file instead of stdin/stdout. This fixes the
-long-standing problem that the pipe used to fill up when too many
-fail_unless() were used. (#482012).
-
-------------------------------------------------------------------------
-r149 | neo23 | 2002-10-10 02:57:36 +1000 (Thu, 10 Oct 2002) | 3 lines
-Changed paths:
-   M /trunk/check/src/check.h.in
-
-Applied a patch from Rick Poyner that fixes a typo which broke check
-for C++ compilers (bug #601397).
-
-------------------------------------------------------------------------
-r148 | neo23 | 2002-08-17 03:41:04 +1000 (Sat, 17 Aug 2002) | 3 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-
-Applied a patch from Dietmar Petras <dpetras@gmx.de> that plugs some
-memory leaks.
-
-------------------------------------------------------------------------
-r147 | neo23 | 2002-07-10 12:37:19 +1000 (Wed, 10 Jul 2002) | 2 lines
-Changed paths:
-   M /trunk/check
-   M /trunk/check/.cvsignore
-   M /trunk/check/autogen.sh
-
-Call aclocal from autogen.sh.
-
-------------------------------------------------------------------------
-r146 | neo23 | 2002-07-10 12:32:55 +1000 (Wed, 10 Jul 2002) | 2 lines
-Changed paths:
-   D /trunk/check/aclocal.m4
-   D /trunk/check/depcomp
-   D /trunk/check/install-sh
-   D /trunk/check/missing
-   D /trunk/check/mkinstalldirs
-
-Removed files generated by automake.
-
-------------------------------------------------------------------------
-r145 | neo23 | 2002-06-16 22:25:04 +1000 (Sun, 16 Jun 2002) | 2 lines
-Changed paths:
-   M /trunk/check/debian/changelog
-
-applied patch from Arien Malec to fix build of Debian packages
-
-------------------------------------------------------------------------
-r144 | neo23 | 2002-05-25 01:04:38 +1000 (Sat, 25 May 2002) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Made 0.8.3 Release.
-
-------------------------------------------------------------------------
-r143 | neo23 | 2002-05-25 01:00:49 +1000 (Sat, 25 May 2002) | 3 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/doc/tutorial.lyx
-   M /trunk/check/rpm/check.spec.in
-
-Added check.m4 to the spec file. Updated NEWS. Updated the date of the
-tutorial.
-
-------------------------------------------------------------------------
-r142 | neo23 | 2002-05-25 00:35:10 +1000 (Sat, 25 May 2002) | 2 lines
-Changed paths:
-   M /trunk/check/debian/check.dirs
-   M /trunk/check/debian/check.files
-   M /trunk/check/debian/control
-
-Added check.m4 to debian rules. Changed the maintainer entry.
-
-------------------------------------------------------------------------
-r141 | neo23 | 2002-05-24 01:08:32 +1000 (Fri, 24 May 2002) | 3 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.lyx
-
-Mention that EXIT_SUCCESS and EXIT_FAILURE are defined in stdlib.h.
-Suggested by Russell Reed in bug #547129.
-
-------------------------------------------------------------------------
-r140 | neo23 | 2002-05-10 22:01:44 +1000 (Fri, 10 May 2002) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-
-Declared local functions static (based on a patch from Gilgamesh Nootebos).
-
-------------------------------------------------------------------------
-r139 | neo23 | 2002-05-03 21:58:02 +1000 (Fri, 03 May 2002) | 3 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_error.c
-   A /trunk/check/src/check_list.c
-   A /trunk/check/src/check_list.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   D /trunk/check/src/list.c
-   D /trunk/check/src/list.h
-   M /trunk/check/tests/check_list.c
-
-Renamed list.[ch] to check_list.[ch] for consistency.
-Include config.h from all over the place, cleaned up includes.
-
-------------------------------------------------------------------------
-r138 | neo23 | 2002-05-02 18:34:57 +1000 (Thu, 02 May 2002) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/tests/check_check_log.c
-
-Removed compiler warnings mentioned in bug #547126.
-
-------------------------------------------------------------------------
-r137 | neo23 | 2002-05-02 18:27:25 +1000 (Thu, 02 May 2002) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_print.c
-   M /trunk/check/tests/check_check_msg.c
-
-Don't include "error.h" (bug #546175 small cygwin portability problem).
-
-------------------------------------------------------------------------
-r136 | neo23 | 2002-04-17 03:33:49 +1000 (Wed, 17 Apr 2002) | 4 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.lyx
-
-Changed date to that of the latest release.
-Added a name to an internal reference so that we get a working link in
-the generated HTML.
-
-------------------------------------------------------------------------
-r135 | neo23 | 2002-04-16 02:47:44 +1000 (Tue, 16 Apr 2002) | 3 lines
-Changed paths:
-   M /trunk/check/check.m4
-   M /trunk/check/configure.in
-
-Fixed check.m4 so that --without-check is a valid option to disable check.
-Bumped version number to 0.8.3.
-
-------------------------------------------------------------------------
-r134 | neo23 | 2002-04-15 20:58:10 +1000 (Mon, 15 Apr 2002) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog.
-
-------------------------------------------------------------------------
-r133 | neo23 | 2002-04-15 20:57:35 +1000 (Mon, 15 Apr 2002) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/README
-
-Made 0.8.2 Release.
-
-------------------------------------------------------------------------
-r132 | neo23 | 2002-04-15 02:59:08 +1000 (Mon, 15 Apr 2002) | 4 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-
-Applied a patch from Arien that makes the pipe nonblocking. This doesn't
-solve #482012 but makes it more obvious what is going wrong if the pipe
-fills up.
-
-------------------------------------------------------------------------
-r131 | neo23 | 2002-04-12 20:50:04 +1000 (Fri, 12 Apr 2002) | 2 lines
-Changed paths:
-   M /trunk/check/doc/tutorial.lyx
-
-Use #include rather than #import (bug #484564).
-
-------------------------------------------------------------------------
-r130 | neo23 | 2002-04-12 20:34:04 +1000 (Fri, 12 Apr 2002) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog.
-
-------------------------------------------------------------------------
-r129 | neo23 | 2002-04-12 20:33:06 +1000 (Fri, 12 Apr 2002) | 3 lines
-Changed paths:
-   M /trunk/check/AUTHORS
-   M /trunk/check/doc/tutorial.lyx
-
-Document the fact that you can now use NULL as msg argument for
-fail_unless().
-
-------------------------------------------------------------------------
-r128 | neo23 | 2002-04-12 19:54:17 +1000 (Fri, 12 Apr 2002) | 10 lines
-Changed paths:
-   M /trunk/check/config.h.in
-   M /trunk/check/configure.in
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_impl.h
-   D /trunk/check/src/check_magic.h
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   M /trunk/check/src/check_str.h
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_pack.c
-
-Removed limitations on line number, message and buffer sizes
-(bug #478233) by changing the way we send integers over the
-pipe. Instead of strings, integers are now send as 4 bytes.
-This allows the pack routine to easily calculate the message
-size so that we can allocate the needed buffer there.
-Made a union out of the different Msg structs to clean up the
-internal API. Also introduced the internal function
-ck_strdup_printf(), a simple wrapper around sprintf() that
-allocates enough space to hold the resulting string.
-
-------------------------------------------------------------------------
-r127 | neo23 | 2002-04-10 21:11:48 +1000 (Wed, 10 Apr 2002) | 7 lines
-Changed paths:
-   M /trunk/check/AUTHORS
-   M /trunk/check/NEWS
-   M /trunk/check/configure.in
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/src/check_error.c
-   M /trunk/check/src/check_error.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   M /trunk/check/src/list.c
-   M /trunk/check/src/list.h
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_fork.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_pack.c
-   M /trunk/check/tests/check_list.c
-
-Applied a slightly modified version of a patch from
-Neil Spring <nspring@cs.washington.edu> that declares strings as
-const where applicable. It also changes our CFLAGS to be much
-stricter and removes the warnings introduced by -Wwrite-strings.
-This allows building other check tests with -Wwrite-strings
-without heaping gobs of compiler warnings.
-
-------------------------------------------------------------------------
-r126 | neo23 | 2002-03-29 06:12:30 +1100 (Fri, 29 Mar 2002) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog.
-
-------------------------------------------------------------------------
-r125 | neo23 | 2002-03-29 05:37:07 +1100 (Fri, 29 Mar 2002) | 6 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h.in
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-
-Allow fail_unless() to be called with a NULL msg and substitute a reasonable
-error message in that case. Bail out if NULL is passed to _fail_unless() to
-avoid possible confusion.
-
-Added a test case that calls fail_unless() with msg=NULL.
-
-------------------------------------------------------------------------
-r124 | neo23 | 2002-03-29 05:22:09 +1100 (Fri, 29 Mar 2002) | 21 lines
-Changed paths:
-   M /trunk/check/Makefile.am
-   M /trunk/check/README
-   M /trunk/check/autogen.sh
-   A /trunk/check/check.m4
-   M /trunk/check/configure.in
-   M /trunk/check/doc/money
-   A /trunk/check/doc/money/.cvsignore
-   M /trunk/check/doc/money/Makefile.am.money
-   M /trunk/check/doc/money/aclocal.m4
-   M /trunk/check/doc/money/configure.in.money
-   M /trunk/check/doc/tutorial.lyx
-   M /trunk/check/rpm
-   M /trunk/check/rpm/.cvsignore
-   M /trunk/check/rpm/Makefile.am
-   D /trunk/check/rpm/check.spec
-   A /trunk/check/rpm/check.spec.in
-   M /trunk/check/src
-   M /trunk/check/src/.cvsignore
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/check.c
-   D /trunk/check/src/check.h
-   A /trunk/check/src/check.h.in
-   M /trunk/check/tests
-   M /trunk/check/tests/.cvsignore
-
-Changed autogen.sh to bail out if necessary tools can't be found
-instead of proceeding to the version checks.
-
-Document use of autogen.sh in README.
-
-Generate check.spec from check.spec.in to it automatically gets the
-correct version number.
-
-Generate check.h from chech.h.in and include Check version information.
-
-Compile Check version number into the library to allow for runtime
-version checks.
-
-Added the m4 script check.m4 that allows to easily integrate Check
-into projects using autoconf/automake. It does version checking and
-also assures that header and library versions match.
-
-Document the use of check.m4 and the AM_PATH_CHECK() macro in the
-tutorial. Adapted example Makefile.am and configure.in and added a
-missing .cvsignore file.
-
-------------------------------------------------------------------------
-r123 | amalec | 2002-03-27 12:21:12 +1100 (Wed, 27 Mar 2002) | 2 lines
-Changed paths:
-   D /trunk/check/src/Makefile.in
-   D /trunk/check/tests/Makefile.in
-
-Complete CVS cleanup
-
-------------------------------------------------------------------------
-r122 | amalec | 2002-03-27 12:18:55 +1100 (Wed, 27 Mar 2002) | 2 lines
-Changed paths:
-   M /trunk/check
-   A /trunk/check/.cvsignore
-   M /trunk/check/Makefile.am
-   D /trunk/check/Makefile.in
-   A /trunk/check/autogen.sh
-   D /trunk/check/configure
-   M /trunk/check/debian
-   A /trunk/check/debian/.cvsignore
-   D /trunk/check/debian/Makefile.in
-   M /trunk/check/doc
-   A /trunk/check/doc/.cvsignore
-   D /trunk/check/doc/Makefile.in
-   D /trunk/check/doc/money/Makefile.in
-   M /trunk/check/rpm
-   A /trunk/check/rpm/.cvsignore
-   D /trunk/check/rpm/Makefile.in
-   M /trunk/check/src
-   A /trunk/check/src/.cvsignore
-   M /trunk/check/tests
-   A /trunk/check/tests/.cvsignore
-
-Cleaned up CVS to remove all autofoo generated files, included an autogen.sh bootstrap file. Changes at the suggestion of Sven Neumann
-
-------------------------------------------------------------------------
-r121 | amalec | 2002-03-02 12:42:48 +1100 (Sat, 02 Mar 2002) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r120 | amalec | 2002-03-02 12:42:20 +1100 (Sat, 02 Mar 2002) | 2 lines
-Changed paths:
-   M /trunk/check/debian/changelog
-   M /trunk/check/debian/files
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.c
-   A /trunk/check/src/check_error.c
-   A /trunk/check/src/check_error.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   D /trunk/check/src/error.c
-   D /trunk/check/src/error.h
-   M /trunk/check/src/list.c
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_pack.c
-
-Moved error.[hc] to check_error.[hc], and fixed bug in running checked setup in nofork mode.
-
-------------------------------------------------------------------------
-r119 | amalec | 2002-02-28 13:02:09 +1100 (Thu, 28 Feb 2002) | 2 lines
-Changed paths:
-   M /trunk/check/COPYING
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_log.h
-   M /trunk/check/src/check_magic.h
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_print.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   M /trunk/check/src/check_str.h
-   M /trunk/check/src/error.c
-   M /trunk/check/src/error.h
-   M /trunk/check/src/list.c
-   M /trunk/check/src/list.h
-
-Changed license to LGPL
-
-------------------------------------------------------------------------
-r117 | amalec | 2001-10-26 09:19:28 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r116 | amalec | 2001-10-26 09:18:42 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/AUTHORS
-
-Update AUTHORS to give credit to key contributors
-
-------------------------------------------------------------------------
-r115 | amalec | 2001-10-26 09:12:35 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-
-Clarified configuration warning on doc building
-
-------------------------------------------------------------------------
-r114 | amalec | 2001-10-26 08:51:35 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updating ChangeLog prior to release
-
-------------------------------------------------------------------------
-r113 | amalec | 2001-10-26 08:45:31 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_pack.c
-
-Fixed some missing header includes
-
-------------------------------------------------------------------------
-r112 | amalec | 2001-10-26 08:25:11 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_pack.c
-
-Fix packing of NULL strings (causing problems under Solaris)
-
-------------------------------------------------------------------------
-r111 | amalec | 2001-10-26 08:17:03 +1000 (Fri, 26 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check_pack.c
-
-Minor change to pack tests to ensure that tests don't pass accidentally
-
-------------------------------------------------------------------------
-r110 | amalec | 2001-10-25 10:45:23 +1000 (Thu, 25 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog
-
-------------------------------------------------------------------------
-r109 | amalec | 2001-10-25 10:44:13 +1000 (Thu, 25 Oct 2001) | 2 lines
-Changed paths:
-   A /trunk/check/depcomp
-
-Added new automake file
-
-------------------------------------------------------------------------
-r108 | amalec | 2001-10-25 10:43:37 +1000 (Thu, 25 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/doc/index.html
-   M /trunk/check/doc/money/check_money.c
-   M /trunk/check/tests/check_check_sub.c
-
-Added comments on string functions to NEWS, cleaned up money example, and fixed a signal unit test so that it will pass under cygwin
-
-------------------------------------------------------------------------
-r107 | amalec | 2001-10-25 03:25:47 +1000 (Thu, 25 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.in
-   M /trunk/check/NEWS
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/debian/Makefile.in
-   M /trunk/check/debian/changelog
-   M /trunk/check/debian/files
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/Makefile.in
-   M /trunk/check/doc/money/Makefile.in
-   M /trunk/check/doc/tutorial.lyx
-   M /trunk/check/rpm/Makefile.in
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_fork.c
-   M /trunk/check/tests/check_check_limit.c
-   M /trunk/check/tests/check_check_main.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_stress.c
-   M /trunk/check/tests/ex_log_output.c
-   M /trunk/check/tests/ex_output.c
-   M /trunk/check/tests/test_log_output.sh
-   M /trunk/check/tests/test_output.sh
-
-Documentation updates
-
-------------------------------------------------------------------------
-r106 | amalec | 2001-10-23 09:57:18 +1000 (Tue, 23 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-   M /trunk/check/tests/check_check_pack.c
-
-Removed old ppunpack, renamed new_*, and updated callers
-
-------------------------------------------------------------------------
-r105 | amalec | 2001-10-23 09:26:48 +1000 (Tue, 23 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_pack.c
-
-Moved Check to use new internal ppack routine, and fixed a nasty bug
-
-------------------------------------------------------------------------
-r104 | amalec | 2001-10-20 09:27:33 +1000 (Sat, 20 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_pack.c
-
-New version of receive_test_result passes unit tests
-
-------------------------------------------------------------------------
-r103 | amalec | 2001-10-20 04:44:39 +1000 (Sat, 20 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_pack.c
-
-Changed punpack to return test and fixture locs to preserve test information when teardown messages are sent
-
-------------------------------------------------------------------------
-r102 | amalec | 2001-10-17 11:15:16 +1000 (Wed, 17 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_fixture.c
-
-Checked setup passes unit tests
-
-------------------------------------------------------------------------
-r101 | amalec | 2001-10-14 02:13:52 +1000 (Sun, 14 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_msg.c
-
-Replace previous messaging implementation files with new module
-
-------------------------------------------------------------------------
-r100 | amalec | 2001-10-13 16:05:11 +1000 (Sat, 13 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   M /trunk/check/src/error.c
-   M /trunk/check/src/error.h
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/test_log_output.sh
-   M /trunk/check/tests/test_output.sh
-
-Fully implemented new messaging back-end based on pipes
-
-------------------------------------------------------------------------
-r99 | amalec | 2001-10-11 04:01:17 +1000 (Thu, 11 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.in
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/debian/Makefile.in
-   M /trunk/check/doc/Makefile.in
-   M /trunk/check/doc/money/Makefile.in
-   M /trunk/check/rpm/Makefile.in
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_pack.c
-
-Updated messaging tests to use new infrastructure
-
-------------------------------------------------------------------------
-r98 | amalec | 2001-10-05 07:55:29 +1000 (Fri, 05 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_pack.c
-   M /trunk/check/src/check_pack.h
-   M /trunk/check/tests/check_check_pack.c
-
-Completed implementation of check_pack
-
-------------------------------------------------------------------------
-r97 | amalec | 2001-10-03 01:38:48 +1000 (Wed, 03 Oct 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/index.html
-   M /trunk/check/doc/tutorial.lyx
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_magic.h
-   M /trunk/check/src/check_msg.h
-   A /trunk/check/src/check_pack.c
-   A /trunk/check/src/check_pack.h
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check.h
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_fork.c
-   M /trunk/check/tests/check_check_limit.c
-   M /trunk/check/tests/check_check_main.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   A /trunk/check/tests/check_check_pack.c
-
-First generation packing code as the infrastructure to revising message passing between processes, to accomodate context messages
-
-------------------------------------------------------------------------
-r96 | amalec | 2001-09-28 10:20:37 +1000 (Fri, 28 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/list.c
-   M /trunk/check/src/list.h
-   M /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_fork.c
-   M /trunk/check/tests/check_check_limit.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-
-Added framework for support of checked fixture functions
-
-------------------------------------------------------------------------
-r95 | amalec | 2001-09-28 02:08:48 +1000 (Fri, 28 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_run.c
-
-Refactored failure info functions
-
-------------------------------------------------------------------------
-r94 | amalec | 2001-09-19 10:14:03 +1000 (Wed, 19 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_magic.h
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/check_str.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check.h
-   A /trunk/check/tests/check_check_fixture.c
-   M /trunk/check/tests/check_check_main.c
-   M /trunk/check/tests/check_check_master.c
-
-Setup failure is working and partially tested
-
-------------------------------------------------------------------------
-r93 | amalec | 2001-09-15 09:15:28 +1000 (Sat, 15 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/tests/check_check.h
-   A /trunk/check/tests/check_check_fork.c
-   M /trunk/check/tests/check_check_main.c
-
-Completed implementation of CK_NOFORK
-
-------------------------------------------------------------------------
-r92 | amalec | 2001-09-08 08:12:54 +1000 (Sat, 08 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-
-Implemented nofork mode
-
-------------------------------------------------------------------------
-r91 | amalec | 2001-09-07 04:10:22 +1000 (Fri, 07 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Doxyfile
-   M /trunk/check/configure.in
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_log.h
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_print.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check.h
-   M /trunk/check/tests/check_check_main.c
-
-Added initial control functions to control forking
-
-------------------------------------------------------------------------
-r90 | amalec | 2001-09-06 02:48:45 +1000 (Thu, 06 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_msg.c
-
-Completely abstracted the details of messaging behind check_msg.c
-
-------------------------------------------------------------------------
-r89 | amalec | 2001-09-01 10:12:51 +1000 (Sat, 01 Sep 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-
-Ensure that each subprocesses alloc the correct msg queue
-
-------------------------------------------------------------------------
-r88 | amalec | 2001-08-30 11:00:45 +1000 (Thu, 30 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_msg.c
-
-Eliminated passing of msqid in unit tests
-
-------------------------------------------------------------------------
-r87 | amalec | 2001-08-29 10:49:07 +1000 (Wed, 29 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_str.c
-   A /trunk/check/tests/check_check_limit.c
-
-Added test checking running empty suites
-
-------------------------------------------------------------------------
-r86 | amalec | 2001-08-29 03:06:05 +1000 (Wed, 29 Aug 2001) | 2 lines
-Changed paths:
-   A /trunk/check/src/check_magic.h
-
-Moved magic values to separate header
-
-------------------------------------------------------------------------
-r85 | amalec | 2001-08-29 03:04:27 +1000 (Wed, 29 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_print.c
-   A /trunk/check/src/check_str.c
-   A /trunk/check/src/check_str.h
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-
-Separated printing from string formating functions to allow better testing.
-
-------------------------------------------------------------------------
-r84 | amalec | 2001-08-28 10:18:00 +1000 (Tue, 28 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check.h
-   M /trunk/check/tests/check_check_main.c
-   M /trunk/check/tests/check_check_msg.c
-
-Use pid/ppid as message queue key, preliminary to removing _msqid from unit test functions
-
-------------------------------------------------------------------------
-r82 | amalec | 2001-08-24 07:26:16 +1000 (Fri, 24 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Final ChangeLog for 0.7.3 release
-
-------------------------------------------------------------------------
-r81 | amalec | 2001-08-24 07:25:03 +1000 (Fri, 24 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-
-Document 0.7.3 in NEWS
-
-------------------------------------------------------------------------
-r80 | amalec | 2001-08-24 07:13:58 +1000 (Fri, 24 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/debian/changelog
-
-This time, fix debian changelog correctly
-
-------------------------------------------------------------------------
-r79 | amalec | 2001-08-24 07:10:48 +1000 (Fri, 24 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/debian/changelog
-
-Fixed maintainer email in debian changelog
-
-------------------------------------------------------------------------
-r78 | amalec | 2001-08-23 09:08:21 +1000 (Thu, 23 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/acinclude.m4
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/debian/changelog
-   M /trunk/check/debian/check.doc-base.tut
-   M /trunk/check/debian/files
-   M /trunk/check/rpm/check.spec
-
-Updated acinclude.m4 to increase portability; fixed a minor packaging bug in debian doc-base files
-
-------------------------------------------------------------------------
-r76 | amalec | 2001-08-18 15:28:01 +1000 (Sat, 18 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/doc/index.html
-
-index.html changes
-
-------------------------------------------------------------------------
-r75 | amalec | 2001-08-18 15:24:32 +1000 (Sat, 18 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/INSTALL
-   M /trunk/check/NEWS
-
-NEWS and INSTALL changes
-
-------------------------------------------------------------------------
-r74 | amalec | 2001-08-18 15:15:48 +1000 (Sat, 18 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Doxyfile
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/debian/check.postinst.debhelper
-   M /trunk/check/debian/check.prerm.debhelper
-   M /trunk/check/debian/files
-   M /trunk/check/doc/Makefile.in
-   M /trunk/check/doc/tutorial.lyx
-   M /trunk/check/rpm/Makefile.am
-   M /trunk/check/rpm/Makefile.in
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_log.c
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_print.c
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_log.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_list.c
-   M /trunk/check/tests/check_stress.c
-   M /trunk/check/tests/ex_log_output.c
-   M /trunk/check/tests/ex_output.c
-
-Bug fixes and assorted cleanup prior to release
-
-------------------------------------------------------------------------
-r73 | amalec | 2001-08-18 09:16:57 +1000 (Sat, 18 Aug 2001) | 2 lines
-Changed paths:
-   A /trunk/check/doc/money/Makefile.am
-   A /trunk/check/doc/money/Makefile.in
-
-Added money example Makefiles to CVS
-
-------------------------------------------------------------------------
-r72 | amalec | 2001-08-18 09:13:21 +1000 (Sat, 18 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/Makefile.am
-   D /trunk/check/doc/example.lyx
-   A /trunk/check/doc/tutorial.lyx
-
-Moved example.lyx to tutorial.lyx
-
-------------------------------------------------------------------------
-r71 | amalec | 2001-08-16 10:47:35 +1000 (Thu, 16 Aug 2001) | 2 lines
-Changed paths:
-   A /trunk/check/acinclude.m4
-   A /trunk/check/debian/Makefile.am
-   A /trunk/check/debian/Makefile.in
-   A /trunk/check/debian/check.docs
-
-Added leftover stuff in debian directory, acinclude.m4
-
-------------------------------------------------------------------------
-r70 | amalec | 2001-08-16 10:45:54 +1000 (Thu, 16 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.am
-   M /trunk/check/Makefile.in
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   A /trunk/check/debian/check.doc-base.tut
-   M /trunk/check/debian/control
-   D /trunk/check/debian/docs
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/Makefile.in
-   D /trunk/check/doc/money/AUTHORS
-   D /trunk/check/doc/money/COPYING
-   D /trunk/check/doc/money/ChangeLog
-   D /trunk/check/doc/money/INSTALL
-   D /trunk/check/doc/money/Makefile.am
-   A /trunk/check/doc/money/Makefile.am.money
-   D /trunk/check/doc/money/Makefile.in
-   D /trunk/check/doc/money/NEWS
-   D /trunk/check/doc/money/README
-   D /trunk/check/doc/money/config.h.in
-   D /trunk/check/doc/money/configure
-   D /trunk/check/doc/money/configure.in
-   A /trunk/check/doc/money/configure.in.money
-   D /trunk/check/doc/money/stamp-h.in
-   M /trunk/check/rpm/Makefile.in
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/tests/Makefile.in
-
-Added configure check for Lyx with Linuxdoc
-
-------------------------------------------------------------------------
-r69 | amalec | 2001-08-07 06:45:30 +1000 (Tue, 07 Aug 2001) | 2 lines
-Changed paths:
-   A /trunk/check/rpm/Makefile.in
-
-Added rpm/Makefile.in
-
-------------------------------------------------------------------------
-r68 | amalec | 2001-08-07 06:44:28 +1000 (Tue, 07 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.am
-   M /trunk/check/Makefile.in
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/debian/changelog
-   M /trunk/check/debian/check.dirs
-   M /trunk/check/debian/check.files
-   M /trunk/check/debian/rules
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/Makefile.in
-   M /trunk/check/doc/index.html
-   M /trunk/check/doc/money/AUTHORS
-   M /trunk/check/doc/money/COPYING
-   M /trunk/check/doc/money/ChangeLog
-   M /trunk/check/doc/money/NEWS
-   M /trunk/check/doc/money/README
-   M /trunk/check/rpm/check.spec
-
-Can now build complete debs
-
-------------------------------------------------------------------------
-r67 | amalec | 2001-08-04 15:40:15 +1000 (Sat, 04 Aug 2001) | 2 lines
-Changed paths:
-   D /trunk/check/debian/README.Debian
-
-Don't need README.Debian
-
-------------------------------------------------------------------------
-r66 | amalec | 2001-08-04 15:26:40 +1000 (Sat, 04 Aug 2001) | 2 lines
-Changed paths:
-   A /trunk/check/debian
-   A /trunk/check/debian/README.Debian
-   A /trunk/check/debian/changelog
-   A /trunk/check/debian/check.dirs
-   A /trunk/check/debian/check.files
-   A /trunk/check/debian/check.postinst.debhelper
-   A /trunk/check/debian/check.prerm.debhelper
-   A /trunk/check/debian/control
-   A /trunk/check/debian/copyright
-   A /trunk/check/debian/dirs
-   A /trunk/check/debian/docs
-   A /trunk/check/debian/files
-   A /trunk/check/debian/rules
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/index.html
-
-Added preliminary debian packaging files
-
-------------------------------------------------------------------------
-r65 | amalec | 2001-08-03 11:05:18 +1000 (Fri, 03 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.am
-   M /trunk/check/Makefile.in
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/doc/index.html
-   A /trunk/check/rpm/Makefile.am
-   D /trunk/check/rpm/buildrpm.sh
-
-Added automatic building of RPMs
-
-------------------------------------------------------------------------
-r63 | amalec | 2001-08-01 02:51:40 +1000 (Wed, 01 Aug 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/index.html
-
-Update index.html for final release to main Check website.
-
-------------------------------------------------------------------------
-r62 | amalec | 2001-07-31 11:08:59 +1000 (Tue, 31 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r61 | amalec | 2001-07-31 11:08:17 +1000 (Tue, 31 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/doc/example.lyx
-   A /trunk/check/rpm/buildrpm.sh
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/ex_log_output.c
-   M /trunk/check/tests/test_log_output.sh
-
-Update NEWS, docs, and rpm building
-
-------------------------------------------------------------------------
-r60 | amalec | 2001-07-31 06:10:32 +1000 (Tue, 31 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r59 | amalec | 2001-07-31 06:10:10 +1000 (Tue, 31 Jul 2001) | 2 lines
-Changed paths:
-   A /trunk/check/doc/Makefile.in
-   A /trunk/check/tests/ex_log_output.c
-
-Add neglected files
-
-------------------------------------------------------------------------
-r58 | amalec | 2001-07-31 06:08:57 +1000 (Tue, 31 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_log.c
-   A /trunk/check/src/check_log.h
-   A /trunk/check/src/check_print.c
-   A /trunk/check/src/check_print.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/test_log_output.sh
-
-Reorganized printing and logging functions and implemented more sophisticated logging
-
-------------------------------------------------------------------------
-r57 | amalec | 2001-07-26 07:26:51 +1000 (Thu, 26 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.in
-   M /trunk/check/aclocal.m4
-   M /trunk/check/config.h.in
-   M /trunk/check/configure
-   M /trunk/check/doc/money/aclocal.m4
-   M /trunk/check/doc/money/config.h.in
-   M /trunk/check/doc/money/configure
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/tests/Makefile.in
-   A /trunk/check/tests/test_log_output.sh
-
-Added log tests
-
-------------------------------------------------------------------------
-r55 | amalec | 2001-07-12 06:46:08 +1000 (Thu, 12 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/README
-   M /trunk/check/doc/example.lyx
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/src/check.h
-   M /trunk/check/tests/check_check_log.c
-   M /trunk/check/tests/check_check_main.c
-
-Updated docs
-
-------------------------------------------------------------------------
-r54 | amalec | 2001-07-11 09:29:27 +1000 (Wed, 11 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r53 | amalec | 2001-07-11 09:28:57 +1000 (Wed, 11 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check_log.c
-   M /trunk/check/tests/check_check.h
-   M /trunk/check/tests/check_check_log.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_sub.c
-   M /trunk/check/tests/test_output.sh
-
-Completed testing for multiple suite running, and reorganized files
-
-------------------------------------------------------------------------
-r52 | amalec | 2001-07-11 09:26:28 +1000 (Wed, 11 Jul 2001) | 2 lines
-Changed paths:
-   A /trunk/check/src/check_log.c
-   D /trunk/check/src/check_log.h
-
-Commit file changes
-
-------------------------------------------------------------------------
-r51 | amalec | 2001-07-11 09:25:53 +1000 (Wed, 11 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_run.c
-
-Moved check_log.h functions into check.h
-
-------------------------------------------------------------------------
-r50 | amalec | 2001-07-10 10:10:06 +1000 (Tue, 10 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Commit ChangeLog
-
-------------------------------------------------------------------------
-r49 | amalec | 2001-07-10 10:09:41 +1000 (Tue, 10 Jul 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/list.h
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check.h
-   M /trunk/check/tests/check_check_log.c
-   M /trunk/check/tests/check_check_main.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_check_sub.c
-   M /trunk/check/tests/check_list.c
-
-Completed test for initial logging feature, and added feature to run multiple suites through an SRunner
-
-------------------------------------------------------------------------
-r48 | amalec | 2001-06-30 11:27:02 +1000 (Sat, 30 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_log.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_log.c
-   M /trunk/check/tests/test_output.sh
-
-Restructured printing to allow for logging function
-
-------------------------------------------------------------------------
-r47 | amalec | 2001-06-29 10:40:03 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/Makefile.am
-   M /trunk/check/src/Makefile.in
-
-Add check_log.c to Makefile.am
-
-------------------------------------------------------------------------
-r46 | amalec | 2001-06-29 10:33:07 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-
-Complete move of check_check_log.c -- this time for real...
-
-------------------------------------------------------------------------
-r45 | amalec | 2001-06-29 10:31:39 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Doxyfile
-   M /trunk/check/src/check_log.h
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-
-Complete move of check_check_log.c
-
-------------------------------------------------------------------------
-r44 | amalec | 2001-06-29 10:30:29 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/tests/Makefile.am
-   A /trunk/check/tests/check_check_log.c
-   D /trunk/check/tests/check_log.c
-
-Moved check_log.c to check_check_log.c
-
-------------------------------------------------------------------------
-r43 | amalec | 2001-06-29 08:56:26 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   D /trunk/check/doc/money/stamp-h
-
-Removed stamp-h
-
-------------------------------------------------------------------------
-r42 | amalec | 2001-06-29 08:51:36 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   A /trunk/check/src/check_log.h
-   A /trunk/check/tests/check_log.c
-
-Added skeleton files for check logging
-
-------------------------------------------------------------------------
-r41 | amalec | 2001-06-29 08:33:50 +1000 (Fri, 29 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Doxyfile
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/src/check.h
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-
-Additional doxygenation of check.h
-
-------------------------------------------------------------------------
-r39 | amalec | 2001-06-28 04:27:35 +1000 (Thu, 28 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog
-
-------------------------------------------------------------------------
-r38 | amalec | 2001-06-28 04:25:54 +1000 (Thu, 28 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/configure
-   M /trunk/check/rpm/check.spec
-
-Updated check.spec
-
-------------------------------------------------------------------------
-r37 | amalec | 2001-06-28 04:21:32 +1000 (Thu, 28 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r36 | amalec | 2001-06-28 04:20:42 +1000 (Thu, 28 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/configure.in
-   M /trunk/check/doc/example.lyx
-   M /trunk/check/doc/money/check_money.c
-   M /trunk/check/doc/money/configure
-   M /trunk/check/doc/money/configure.in
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check_main.c
-   M /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   M /trunk/check/tests/check_list.c
-   M /trunk/check/tests/check_stress.c
-
-Completed srunner_results, and added unit tests; changed srunner_nfailed to srunner_ntests_failed and changed documentation.
-
-------------------------------------------------------------------------
-r35 | amalec | 2001-06-27 08:51:57 +1000 (Wed, 27 Jun 2001) | 2 lines
-Changed paths:
-   A /trunk/check/Doxyfile
-   M /trunk/check/doc/example.lyx
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   D /trunk/check/tests/check_check.c
-   A /trunk/check/tests/check_check.h
-   A /trunk/check/tests/check_check_main.c
-   A /trunk/check/tests/check_check_master.c
-   M /trunk/check/tests/check_check_msg.c
-   A /trunk/check/tests/check_check_sub.c
-   M /trunk/check/tests/check_list.c
-   M /trunk/check/tests/check_stress.c
-
-Fixed a bug in srunner_failures, fixed a typo in the tutorial documentation (thanks to Michael Tucker), and refactored check_check
-
-------------------------------------------------------------------------
-r34 | amalec | 2001-06-22 11:16:03 +1000 (Fri, 22 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r33 | amalec | 2001-06-22 11:15:23 +1000 (Fri, 22 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/NEWS
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/example.lyx
-   M /trunk/check/doc/index.html
-   M /trunk/check/rpm/check.spec
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-
-Specfile changes, updates to NEWS
-
-------------------------------------------------------------------------
-r32 | amalec | 2001-06-22 10:37:48 +1000 (Fri, 22 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r31 | amalec | 2001-06-22 10:36:49 +1000 (Fri, 22 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/Makefile.am
-   M /trunk/check/tests/Makefile.in
-   M /trunk/check/tests/check_check.c
-   A /trunk/check/tests/ex_output.c
-   A /trunk/check/tests/test_output.sh
-
-Changed test output, added end-to-end test, and removed redundant field from TestResult struct
-
-------------------------------------------------------------------------
-r30 | amalec | 2001-06-20 06:01:10 +1000 (Wed, 20 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update changelog
-
-------------------------------------------------------------------------
-r29 | amalec | 2001-06-20 05:59:48 +1000 (Wed, 20 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check.c
-
-Added accessors for TestResult and expanded unit test
-
-------------------------------------------------------------------------
-r28 | amalec | 2001-06-13 03:29:04 +1000 (Wed, 13 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog
-
-------------------------------------------------------------------------
-r27 | amalec | 2001-06-13 03:28:10 +1000 (Wed, 13 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/tests/check_check.c
-
-Added new tests for line number
-
-------------------------------------------------------------------------
-r26 | amalec | 2001-06-05 03:58:14 +1000 (Tue, 05 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   A /trunk/check/doc/index.html
-
-Added homepage file in doc directory, and updated change log
-
-------------------------------------------------------------------------
-r24 | amalec | 2001-06-05 03:08:54 +1000 (Tue, 05 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/example.lyx
-   M /trunk/check/rpm/check.spec
-
-Cleaned up spec file for RPM packaging
-
-------------------------------------------------------------------------
-r23 | amalec | 2001-06-04 09:50:40 +1000 (Mon, 04 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.am
-   M /trunk/check/Makefile.in
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/doc/Makefile.am
-   A /trunk/check/rpm
-   A /trunk/check/rpm/check.spec
-
-Added RPM spec file and added additional documentation files
-
-------------------------------------------------------------------------
-r22 | amalec | 2001-06-02 01:46:39 +1000 (Sat, 02 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Updated ChangeLog
-
-------------------------------------------------------------------------
-r21 | amalec | 2001-06-02 01:44:43 +1000 (Sat, 02 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.in
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/src/check.c
-   M /trunk/check/src/check.h
-   M /trunk/check/src/check_impl.h
-   M /trunk/check/src/check_msg.c
-   M /trunk/check/src/check_msg.h
-   M /trunk/check/src/check_run.c
-   M /trunk/check/src/error.c
-   M /trunk/check/src/error.h
-   M /trunk/check/src/list.c
-   M /trunk/check/src/list.h
-   M /trunk/check/tests/Makefile.in
-
-GNUified source files with copyright notice
-
-------------------------------------------------------------------------
-r20 | amalec | 2001-06-02 01:33:42 +1000 (Sat, 02 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   M /trunk/check/doc/Makefile.am
-   M /trunk/check/doc/example.lyx
-
-Made building docs conditional on presence of lyx and sgml2html
-
-------------------------------------------------------------------------
-r19 | amalec | 2001-06-01 08:35:20 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Update ChangeLog
-
-------------------------------------------------------------------------
-r18 | amalec | 2001-06-01 08:34:38 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/configure.in
-   M /trunk/check/doc/Makefile.am
-
-Modified Makefile.am to include docs in dist
-
-------------------------------------------------------------------------
-r17 | amalec | 2001-06-01 08:26:35 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/Makefile.am
-   M /trunk/check/Makefile.in
-   M /trunk/check/aclocal.m4
-   M /trunk/check/configure
-   M /trunk/check/configure.in
-   A /trunk/check/doc/Makefile.am
-   M /trunk/check/src/Makefile.in
-   M /trunk/check/tests/Makefile.in
-
-Added Automake support to create and install documentation
-
-------------------------------------------------------------------------
-r16 | amalec | 2001-06-01 07:30:36 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   D /trunk/check/doc/money/config.h
-   D /trunk/check/doc/money/config.log
-   D /trunk/check/doc/money/config.status
-
-Removed unneded files
-
-------------------------------------------------------------------------
-r15 | amalec | 2001-06-01 01:37:53 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-   M /trunk/check/ChangeLogOld
-
-Updated change logs
-
-------------------------------------------------------------------------
-r14 | amalec | 2001-06-01 01:35:28 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/example.lyx
-
-Commit changes to example, get things in synch
-
-------------------------------------------------------------------------
-r13 | amalec | 2001-06-01 01:32:22 +1000 (Fri, 01 Jun 2001) | 2 lines
-Changed paths:
-   A /trunk/check/doc/money/COPYING
-   A /trunk/check/doc/money/ChangeLog
-   A /trunk/check/doc/money/INSTALL
-   A /trunk/check/doc/money/Makefile.am
-   A /trunk/check/doc/money/Makefile.in
-   A /trunk/check/doc/money/NEWS
-   A /trunk/check/doc/money/README
-   A /trunk/check/doc/money/aclocal.m4
-   A /trunk/check/doc/money/check_money.c
-   A /trunk/check/doc/money/config.h
-   A /trunk/check/doc/money/config.h.in
-   A /trunk/check/doc/money/config.log
-   A /trunk/check/doc/money/config.status
-   A /trunk/check/doc/money/configure
-   A /trunk/check/doc/money/configure.in
-   A /trunk/check/doc/money/money.c
-   A /trunk/check/doc/money/money.h
-   A /trunk/check/doc/money/stamp-h
-   A /trunk/check/doc/money/stamp-h.in
-
-Hopefully finally solved CVS problems and commited changes to money example and example.lyx
-
-------------------------------------------------------------------------
-r12 | amalec | 2001-05-31 09:48:43 +1000 (Thu, 31 May 2001) | 2 lines
-Changed paths:
-   A /trunk/check/doc/money
-   A /trunk/check/doc/money/AUTHORS
-
-Trying to commit added files...
-
-------------------------------------------------------------------------
-r11 | amalec | 2001-05-31 09:45:07 +1000 (Thu, 31 May 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/example.lyx
-
-Cleaning up CVS..
-
-------------------------------------------------------------------------
-r10 | amalec | 2001-05-31 09:37:35 +1000 (Thu, 31 May 2001) | 2 lines
-Changed paths:
-   A /trunk/check/ChangeLogOld
-
-Trying to update documentation and change log, and statisfy CVS...
-
-------------------------------------------------------------------------
-r9 | amalec | 2001-05-31 09:34:29 +1000 (Thu, 31 May 2001) | 2 lines
-Changed paths:
-   M /trunk/check/ChangeLog
-
-Refined documentation, and moved old change log information to ChangeLogOld
-
-------------------------------------------------------------------------
-r8 | amalec | 2001-05-31 08:44:48 +1000 (Thu, 31 May 2001) | 2 lines
-Changed paths:
-   M /trunk/check/doc/example.lyx
-
-Added complete example to accompany documentation
-
-------------------------------------------------------------------------
-r7 | amalec | 2001-05-30 13:25:29 +1000 (Wed, 30 May 2001) | 2 lines
-Changed paths:
-   M /trunk/check/Makefile.in
-
-Added example and expanded documentation
-
-------------------------------------------------------------------------
-r3 | amalec | 2001-05-30 08:42:55 +1000 (Wed, 30 May 2001) | 2 lines
-Changed paths:
-   A /trunk/check
-   A /trunk/check/AUTHORS
-   A /trunk/check/COPYING
-   A /trunk/check/ChangeLog
-   A /trunk/check/INSTALL
-   A /trunk/check/Makefile.am
-   A /trunk/check/Makefile.in
-   A /trunk/check/NEWS
-   A /trunk/check/README
-   A /trunk/check/aclocal.m4
-   A /trunk/check/config.h.in
-   A /trunk/check/configure
-   A /trunk/check/configure.in
-   A /trunk/check/doc
-   A /trunk/check/doc/example.lyx
-   A /trunk/check/install-sh
-   A /trunk/check/missing
-   A /trunk/check/mkinstalldirs
-   A /trunk/check/src
-   A /trunk/check/src/Makefile.am
-   A /trunk/check/src/Makefile.in
-   A /trunk/check/src/check.c
-   A /trunk/check/src/check.h
-   A /trunk/check/src/check_impl.h
-   A /trunk/check/src/check_msg.c
-   A /trunk/check/src/check_msg.h
-   A /trunk/check/src/check_run.c
-   A /trunk/check/src/error.c
-   A /trunk/check/src/error.h
-   A /trunk/check/src/list.c
-   A /trunk/check/src/list.h
-   A /trunk/check/stamp-h.in
-   A /trunk/check/tests
-   A /trunk/check/tests/Makefile.am
-   A /trunk/check/tests/Makefile.in
-   A /trunk/check/tests/check_check.c
-   A /trunk/check/tests/check_check_msg.c
-   A /trunk/check/tests/check_list.c
-   A /trunk/check/tests/check_stress.c
-
-Initial revision
-
-------------------------------------------------------------------------
-r1 | (no author) | 2001-05-30 08:42:54 +1000 (Wed, 30 May 2001) | 1 line
-Changed paths:
-   A /branches
-   A /tags
-   A /trunk
-
-New repository initialized by cvs2svn.
-------------------------------------------------------------------------
diff --git a/TODO b/TODO
index 21f796d..3ecf60a 100644 (file)
--- a/TODO
+++ b/TODO
@@ -18,6 +18,8 @@ Documentation
 [0.9.4] * Update tutorial so that it works with modern tools.
 [0.9.5] * Clarify looping tests and give example of usage.
 [     ] * Document pkg-config usage, note that old macro usage is not recommended.
+[0.9.9] * Document selective running of tests with CK_RUN_SUITE and CK_RUN_CASE
+          environment variables.
 
 Interface
 =========
@@ -58,7 +60,7 @@ Check source code:
 ============
 
 [     ] * Eliminate abbreviations like nf for number_failed
-[     ] * Run indent on everything, make sure it works well.
+[0.9.13] * Run indent on everything, make sure it works well.
 [     ] * Fix START_TEST/END_TEST to look like valid C code.
 [     ] * Document things way more.
 [     ] * Create check.h automatically using makeheaders.c (not sure)
@@ -144,8 +146,8 @@ Check Internals
           under cygwin.
 [     ] * Abstract the forking and message passing implementation to
           allow Win32 compatibility.
-[     ] * Incorporate existing Win32 support as mentioned here:
+[0.9.12] * Incorporate existing Win32 support as mentioned here:
           http://opendarwin.org/pipermail/cvs-libfoundation-all/2005-March/000177.html
-[     ] * Get Cygwin to work, even without forking
-[     ] * Get MinGW to work, even without forking
-[     ] * Get MSVC to work, even without forking
+[0.9.11] * Get Cygwin to work, with forking
+[0.9.11] * Get MinGW to work, even without forking
+[0.9.12] * Get MSVC to work, even without forking
index c1c05f9..12915b0 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
-# 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.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
 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'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+     [ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+          dnl If cross compiling, assume the bug is not important, since
+          dnl nobody cross compiles for this platform as far as we know.
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[@%:@include <limits.h>
+                 @%:@ifndef LLONG_MAX
+                 @%:@ define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
+                 @%:@endif]],
+               [[long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;]])],
+            [],
+            [ac_cv_type_long_long_int=no],
+            [:])
+        fi
+      fi])
+  if test $ac_cv_type_long_long_int = yes; then
+    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type 'long long int'.])
+  fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for unsigned long long int],
+    [ac_cv_type_unsigned_long_long_int],
+    [ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       AC_LINK_IFELSE(
+         [_AC_TYPE_LONG_LONG_SNIPPET],
+         [],
+         [ac_cv_type_unsigned_long_long_int=no])
+     fi])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type 'unsigned long long int'.])
+  fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+  AC_LANG_PROGRAM(
+    [[/* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;]],
+    [[/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));]])
+])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29.1)
+dnl
+dnl Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright Â© 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.1])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes ],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+       AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+       AC_MSG_RESULT([no])
+       m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -31,10 +422,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
 # 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'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.2], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,22 +441,82 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.2])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# Copyright (C) 2011-2014 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_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [AC_LANG_PUSH([C])
+   am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  m4_default([$1],
+             [AC_MSG_ERROR([could not determine $AR interface])])
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
+
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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/../..'.
+# $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
@@ -84,7 +535,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # 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
+# 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,
@@ -102,34 +553,31 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 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_PREREQ([2.52])dnl
m4_if([$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
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -143,16 +591,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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
+# 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
@@ -162,7 +608,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # 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
@@ -175,12 +621,13 @@ 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=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" 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],
@@ -188,8 +635,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # 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'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -207,6 +655,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -218,35 +676,49 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > 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
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # 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} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -279,7 +751,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# 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
@@ -289,34 +761,39 @@ 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])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -329,7 +806,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # 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
+    # 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.
@@ -341,21 +818,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    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
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -373,7 +848,7 @@ AC_DEFUN([_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
+# 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],
@@ -383,18 +858,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # 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.
+# Copyright (C) 1996-2014 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.
 
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -407,7 +885,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -436,55 +914,125 @@ 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_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_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_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
   [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
+[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.
+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])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _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([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
+                 [_AM_DEPENDENCIES([CC])],
+                 [m4_define([AC_PROG_CC],
+                            m4_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
+                 [_AM_DEPENDENCIES([CXX])],
+                 [m4_define([AC_PROG_CXX],
+                            m4_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
+                 [_AM_DEPENDENCIES([OBJC])],
+                 [m4_define([AC_PROG_OBJC],
+                            m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+                 [_AM_DEPENDENCIES([OBJCXX])],
+                 [m4_define([AC_PROG_OBJCXX],
+                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -507,7 +1055,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -518,17 +1066,22 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # 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)])
+if test x"${install_sh+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 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],
@@ -544,14 +1097,12 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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.
@@ -559,7 +1110,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -569,24 +1120,24 @@ 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
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # 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
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -594,52 +1145,14 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 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 6
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
-          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 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],
@@ -647,73 +1160,51 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  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, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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_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)])
+[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],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -724,47 +1215,126 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+# Copyright (C) 1999-2014 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_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
 # AM_SANITY_CHECK
 # ---------------
 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
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# 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
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     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
+     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
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -774,9 +1344,85 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 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_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -784,27 +1430,27 @@ AC_MSG_RESULT(yes)])
 
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# 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
+# 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
+# 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'.
+# 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.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -816,20 +1462,23 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 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'.
+# 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
@@ -839,84 +1488,125 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-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.
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
 
-  # 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])
+    # 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 <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
 m4_include([m4/acx_pthread.m4])
 m4_include([m4/ax_c_check_flag.m4])
-m4_include([m4/ax_cflags_warn_all_ansi.m4])
+m4_include([m4/ax_create_stdint_h.m4])
+m4_include([m4/librt_timers.m4])
 m4_include([m4/libtool.m4])
 m4_include([m4/ltoptions.m4])
 m4_include([m4/ltsugar.m4])
 m4_include([m4/ltversion.m4])
 m4_include([m4/lt~obsolete.m4])
+m4_include([m4/snprintf.m4])
diff --git a/ar-lib b/ar-lib
new file mode 100755 (executable)
index 0000000..463b9ec
--- /dev/null
+++ b/ar-lib
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+  echo "$me: $1" 1>&2
+  exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv in
+       mingw)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+  operation=$2
+  archive=$3
+  at_file_contents=`cat "$1"`
+  eval set x "$at_file_contents"
+  shift
+
+  for member
+  do
+    $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+  done
+}
+
+case $1 in
+  '')
+     func_error "no command.  Try '$0 --help' for more information."
+     ;;
+  -h | --h*)
+    cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "$me, version $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test $# -lt 3; then
+  func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+  if test $# -lt 2; then
+    func_error "you must specify a program, an action and an archive"
+  fi
+  case $1 in
+    -lib | -LIB \
+    | -ltcg | -LTCG \
+    | -machine* | -MACHINE* \
+    | -subsystem* | -SUBSYSTEM* \
+    | -verbose | -VERBOSE \
+    | -wx* | -WX* )
+      AR="$AR $1"
+      shift
+      ;;
+    *)
+      action=$1
+      shift
+      break
+      ;;
+  esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+  case $action in
+    d*) delete=yes  ;;
+    x*) extract=yes ;;
+    t*) list=yes    ;;
+    q*) quick=yes   ;;
+    r*) replace=yes ;;
+    s*) index=yes   ;;
+    S*)             ;; # the index is always updated implicitly
+    c*) create=yes  ;;
+    u*)             ;; # TODO: don't ignore the update modifier
+    v*)             ;; # TODO: don't ignore the verbose modifier
+    *)
+      func_error "unknown action specified"
+      ;;
+  esac
+  action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+  yes,* | ,yes)
+    ;;
+  yesyes*)
+    func_error "more than one action specified"
+    ;;
+  *)
+    func_error "no action specified"
+    ;;
+esac
+
+if test -n "$delete"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  for member
+  do
+    case $1 in
+      @*)
+        func_at_file "${1#@}" -REMOVE "$archive"
+        ;;
+      *)
+        func_file_conv "$1"
+        $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+        ;;
+    esac
+  done
+
+elif test -n "$extract"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  if test $# -gt 0; then
+    for member
+    do
+      case $1 in
+        @*)
+          func_at_file "${1#@}" -EXTRACT "$archive"
+          ;;
+        *)
+          func_file_conv "$1"
+          $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+          ;;
+      esac
+    done
+  else
+    $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+    do
+      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+    done
+  fi
+
+elif test -n "$quick$replace"; then
+  if test ! -f "$orig_archive"; then
+    if test -z "$create"; then
+      echo "$me: creating $orig_archive"
+    fi
+    orig_archive=
+  else
+    orig_archive=$archive
+  fi
+
+  for member
+  do
+    case $1 in
+    @*)
+      func_file_conv "${1#@}"
+      set x "$@" "@$file"
+      ;;
+    *)
+      func_file_conv "$1"
+      set x "$@" "$file"
+      ;;
+    esac
+    shift
+    shift
+  done
+
+  if test -n "$orig_archive"; then
+    $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+  else
+    $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+  fi
+
+elif test -n "$list"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/build-aux/compile b/build-aux/compile
deleted file mode 100755 (executable)
index 1b1d232..0000000
+++ /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 <tromey@cygnus.com>.
-#
-# 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 <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-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 <bug-automake@gnu.org>.
-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/build-aux/depcomp b/build-aux/depcomp
deleted file mode 100755 (executable)
index e5f9736..0000000
+++ /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 <oliva@dcc.unicamp.br>.
-
-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 <bug-automake@gnu.org>.
-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/build-aux/ltmain.sh b/build-aux/ltmain.sh
deleted file mode 100755 (executable)
index b612e9a..0000000
+++ /dev/null
@@ -1,8412 +0,0 @@
-# Generated from ltmain.m4sh.
-
-# ltmain.sh (GNU libtool) 2.2.6
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-#     --config             show all configuration variables
-#     --debug              enable verbose shell tracing
-# -n, --dry-run            display commands without modifying any files
-#     --features           display basic configuration information and exit
-#     --mode=MODE          use operation mode MODE
-#     --preserve-dup-deps  don't remove duplicate dependency libraries
-#     --quiet, --silent    don't print informational messages
-#     --tag=TAG            use configuration variables from tag TAG
-# -v, --verbose            print informational messages (default)
-#     --version            print version information
-# -h, --help               print short or long help message
-#
-# MODE must be one of the following:
-#
-#       clean              remove files from the build directory
-#       compile            compile a source file into a libtool object
-#       execute            automatically set library path, then run a program
-#       finish             complete the installation of libtool libraries
-#       install            install libraries or executables
-#       link               create a library or an executable
-#       uninstall          remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-#       host-triplet:  $host
-#       shell:         $SHELL
-#       compiler:              $LTCC
-#       compiler flags:                $LTCFLAGS
-#       linker:                $LD (gnu? $with_gnu_ld)
-#       $progname:             (GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1
-#       automake:              $automake_version
-#       autoconf:              $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION="2.2.6 Debian-2.2.6a-1ubuntu1"
-TIMESTAMP=""
-package_revision=1.3012
-
-# Be 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
-
-# NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
-  eval "if test \"\${$lt_var+set}\" = set; then
-          save_$lt_var=\$$lt_var
-          $lt_var=C
-         export $lt_var
-         lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
-         lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
-       fi"
-done
-
-$lt_unset CDPATH
-
-
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/bin/sed"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS="  $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# Generated shell functions inserted here.
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
-  -*) progname=./$progname ;;
-esac
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
-  [\\/]*|[A-Za-z]:\\*) ;;
-  *[\\/]*)
-     progdir=$func_dirname_result
-     progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
-     ;;
-  *)
-     save_IFS="$IFS"
-     IFS=:
-     for progdir in $PATH; do
-       IFS="$save_IFS"
-       test -x "$progdir/$progname" && break
-     done
-     IFS="$save_IFS"
-     test -n "$progdir" || progdir=`pwd`
-     progpath="$progdir/$progname"
-     ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
-  s/$bs4/&\\
-/g
-  s/^$bs2$dollar/$bs&/
-  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
-  s/\n//g"
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-opt_warning=:
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
-    $ECHO "$progname${mode+: }$mode: $*"
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
-
-    # A bug in bash halts the script if the last line of a function
-    # fails when set -e is in force, so we need another command to
-    # work around that:
-    :
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
-    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
-
-    # bash bug again:
-    :
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
-    func_error ${1+"$@"}
-    func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information."  ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
-    $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
-    my_directory_path="$1"
-    my_dir_list=
-
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
-      esac
-
-      # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
-        # ...make a list in topmost first order.  Use a colon delimited
-       # list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
-
-        # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
-
-        # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
-      done
-      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
-
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-       IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
-        # try to create one of the directories concurrently.  Don't
-        # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
-      done
-      IFS="$save_mkdir_p_IFS"
-
-      # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
-    fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible.  If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
-
-    if test "$opt_dry_run" = ":"; then
-      # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
-    else
-
-      # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
-      if test ! -d "$my_tmpdir"; then
-        # Failing that, at least try and use $RANDOM to avoid a race
-        my_tmpdir="${my_template}-${RANDOM-0}$$"
-
-        save_mktempdir_umask=`umask`
-        umask 0077
-        $MKDIR "$my_tmpdir"
-        umask $save_mktempdir_umask
-      fi
-
-      # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || \
-        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
-    fi
-
-    $ECHO "X$my_tmpdir" | $Xsed
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
-    case $1 in
-      *[\\\`\"\$]*)
-       func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
-      *)
-        func_quote_for_eval_unquoted_result="$1" ;;
-    esac
-
-    case $func_quote_for_eval_unquoted_result in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting, command substitution and and variable
-      # expansion for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
-        ;;
-      *)
-        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
-    esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
-    case $1 in
-      *[\\\`\"]*)
-       my_arg=`$ECHO "X$1" | $Xsed \
-           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        my_arg="$1" ;;
-    esac
-
-    case $my_arg in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-        my_arg="\"$my_arg\""
-        ;;
-    esac
-
-    func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
-
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
-
-    if ${opt_dry_run-false}; then :; else
-      eval "$my_cmd"
-      my_status=$?
-      if test "$my_status" -eq 0; then :; else
-       eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
-
-
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.  Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
-
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
-
-    if ${opt_dry_run-false}; then :; else
-      eval "$lt_user_locale
-           $my_cmd"
-      my_status=$?
-      eval "$lt_safe_locale"
-      if test "$my_status" -eq 0; then :; else
-       eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
-
-
-
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //
-       s/^# *$//
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
-        p
-     }' < "$progpath"
-     exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
-    $SED -n '/^# Usage:/,/# -h/ {
-        s/^# //
-       s/^# *$//
-       s/\$progname/'$progname'/
-       p
-    }' < "$progpath"
-    $ECHO
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
-    $SED -n '/^# Usage:/,/# Report bugs to/ {
-        s/^# //
-       s/^# *$//
-       s*\$progname*'$progname'*
-       s*\$host*'"$host"'*
-       s*\$SHELL*'"$SHELL"'*
-       s*\$LTCC*'"$LTCC"'*
-       s*\$LTCFLAGS*'"$LTCFLAGS"'*
-       s*\$LD*'"$LD"'*
-       s/\$with_gnu_ld/'"$with_gnu_ld"'/
-       s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
-       s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
-       p
-     }' < "$progpath"
-    exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
-    func_error "missing argument for $1"
-    exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-
-
-
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
-  # Yippee, $ECHO works!
-  :
-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 <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
-    func_error ${1+"$@"}
-    func_error "See the $PACKAGE documentation for more information."
-    func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
-    re_begincf='^# ### BEGIN LIBTOOL'
-    re_endcf='^# ### END LIBTOOL'
-
-    # Default configuration.
-    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
-    # Now print the configurations for the tags.
-    for tagname in $taglist; do
-      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
-    done
-
-    exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_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 $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
-  # Global variable:
-  tagname="$1"
-
-  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
-  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
-  sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
-  # Validate tagname.
-  case $tagname in
-    *[!-_A-Za-z0-9,/]*)
-      func_fatal_error "invalid tag name: $tagname"
-      ;;
-  esac
-
-  # Don't test for the "default" C tag, as we know it's
-  # there but not specially marked.
-  case $tagname in
-    CC) ;;
-    *)
-      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
-       taglist="$taglist $tagname"
-
-       # Evaluate the configuration.  Be careful to quote the path
-       # and the sed script, to avoid splitting on whitespace, but
-       # also don't use non-portable quotes within backquotes within
-       # quotes we have to do it in 2 steps:
-       extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
-       eval "$extractedcf"
-      else
-       func_error "ignoring unknown tag $tagname"
-      fi
-      ;;
-  esac
-}
-
-# Parse options once, thoroughly.  This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
-
-  # Shorthand for --mode=foo, only valid as the first argument
-  case $1 in
-  clean|clea|cle|cl)
-    shift; set dummy --mode clean ${1+"$@"}; shift
-    ;;
-  compile|compil|compi|comp|com|co|c)
-    shift; set dummy --mode compile ${1+"$@"}; shift
-    ;;
-  execute|execut|execu|exec|exe|ex|e)
-    shift; set dummy --mode execute ${1+"$@"}; shift
-    ;;
-  finish|finis|fini|fin|fi|f)
-    shift; set dummy --mode finish ${1+"$@"}; shift
-    ;;
-  install|instal|insta|inst|ins|in|i)
-    shift; set dummy --mode install ${1+"$@"}; shift
-    ;;
-  link|lin|li|l)
-    shift; set dummy --mode link ${1+"$@"}; shift
-    ;;
-  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-    shift; set dummy --mode uninstall ${1+"$@"}; shift
-    ;;
-  esac
-
-  # Parse non-mode specific arguments:
-  while test "$#" -gt 0; do
-    opt="$1"
-    shift
-
-    case $opt in
-      --config)                func_config                                     ;;
-
-      --debug)         preserve_args="$preserve_args $opt"
-                       func_echo "enabling shell trace mode"
-                       opt_debug='set -x'
-                       $opt_debug
-                       ;;
-
-      -dlopen)         test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       execute_dlfiles="$execute_dlfiles $1"
-                       shift
-                       ;;
-
-      --dry-run | -n)  opt_dry_run=:                                   ;;
-      --features)       func_features                                  ;;
-      --finish)                mode="finish"                                   ;;
-
-      --mode)          test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       case $1 in
-                         # Valid mode arguments:
-                         clean)        ;;
-                         compile)      ;;
-                         execute)      ;;
-                         finish)       ;;
-                         install)      ;;
-                         link)         ;;
-                         relink)       ;;
-                         uninstall)    ;;
-
-                         # Catch anything else as an error
-                         *) func_error "invalid argument for $opt"
-                            exit_cmd=exit
-                            break
-                            ;;
-                       esac
-
-                       mode="$1"
-                       shift
-                       ;;
-
-      --preserve-dup-deps)
-                       opt_duplicate_deps=:                            ;;
-
-      --quiet|--silent)        preserve_args="$preserve_args $opt"
-                       opt_silent=:
-                       ;;
-
-      --verbose| -v)   preserve_args="$preserve_args $opt"
-                       opt_silent=false
-                       ;;
-
-      --tag)           test "$#" -eq 0 && func_missing_arg "$opt" && break
-                       preserve_args="$preserve_args $opt $1"
-                       func_enable_tag "$1"    # tagname is set here
-                       shift
-                       ;;
-
-      # Separate optargs to long options:
-      -dlopen=*|--mode=*|--tag=*)
-                       func_opt_split "$opt"
-                       set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
-                       shift
-                       ;;
-
-      -\?|-h)          func_usage                                      ;;
-      --help)          opt_help=:                                      ;;
-      --version)       func_version                                    ;;
-
-      -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
-
-      *)               nonopt="$opt"
-                       break
-                       ;;
-    esac
-  done
-
-
-  case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
-      # don't eliminate duplications in $postdeps and $predeps
-      opt_duplicate_compiler_generated_deps=:
-      ;;
-    *)
-      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
-      ;;
-  esac
-
-  # Having warned about all mis-specified options, bail out if
-  # anything was wrong.
-  $exit_cmd $EXIT_FAILURE
-}
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
-  if test "$package_revision" != "$macro_revision"; then
-    if test "$VERSION" != "$macro_version"; then
-      if test -z "$macro_version"; then
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      else
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      fi
-    else
-      cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
-    fi
-
-    exit $EXIT_MISMATCH
-  fi
-}
-
-
-## ----------- ##
-##    Main.    ##
-## ----------- ##
-
-$opt_help || {
-  # Sanity checks first:
-  func_check_version_match
-
-  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-    func_fatal_configuration "not configured to build any kind of library"
-  fi
-
-  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
-  # Darwin sucks
-  eval std_shrext=\"$shrext_cmds\"
-
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    func_error "unrecognized option \`-dlopen'"
-    $ECHO "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$progname --help --mode=$mode' for more information."
-}
-
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
-    test -f "$1" &&
-      $SED -e 4q "$1" 2>/dev/null \
-        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs.  To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway.  Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
-    lalib_p=no
-    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
-       for lalib_p_l in 1 2 3 4
-       do
-           read lalib_p_line
-           case "$lalib_p_line" in
-               \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
-           esac
-       done
-       exec 0<&5 5<&-
-    fi
-    test "$lalib_p" = yes
-}
-
-# func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_script_p ()
-{
-    func_lalib_p "$1"
-}
-
-# func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_executable_p ()
-{
-    func_ltwrapper_exec_suffix=
-    case $1 in
-    *.exe) ;;
-    *) func_ltwrapper_exec_suffix=.exe ;;
-    esac
-    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-}
-
-# func_ltwrapper_scriptname file
-# Assumes file is an ltwrapper_executable
-# uses $file to determine the appropriate filename for a
-# temporary ltwrapper_script.
-func_ltwrapper_scriptname ()
-{
-    func_ltwrapper_scriptname_result=""
-    if func_ltwrapper_executable_p "$1"; then
-       func_dirname_and_basename "$1" "" "."
-       func_stripname '' '.exe' "$func_basename_result"
-       func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-    fi
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
-    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
-    $opt_debug
-    save_ifs=$IFS; IFS='~'
-    for cmd in $1; do
-      IFS=$save_ifs
-      eval cmd=\"$cmd\"
-      func_show_eval "$cmd" "${2-:}"
-    done
-    IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)!  Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
-    $opt_debug
-    case $1 in
-    */* | *\\*)        . "$1" ;;
-    *)         . "./$1" ;;
-    esac
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# 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 ()
-{
-    $opt_debug
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-        func_quote_for_eval "$arg"
-       CC_quoted="$CC_quoted $func_quote_for_eval_result"
-      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.
-             func_quote_for_eval "$arg"
-             CC_quoted="$CC_quoted $func_quote_for_eval_result"
-           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
-         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
-         func_echo "unable to infer tagged configuration"
-         func_fatal_error "specify a tag with \`--tag'"
-#      else
-#        func_verbose "using $tagname tagged configuration"
-       fi
-       ;;
-      esac
-    fi
-}
-
-
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
-{
-    write_libobj=${1}
-    if test "$build_libtool_libs" = yes; then
-      write_lobj=\'${2}\'
-    else
-      write_lobj=none
-    fi
-
-    if test "$build_old_libs" = yes; then
-      write_oldobj=\'${3}\'
-    else
-      write_oldobj=none
-    fi
-
-    $opt_dry_run || {
-      cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
-      $MV "${write_libobj}T" "${write_libobj}"
-    }
-}
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
-    $opt_debug
-    # 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=
-    pie_flag=
-
-    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)
-         test -n "$libobj" && \
-           func_fatal_error "you cannot specify \`-o' more than once"
-         arg_mode=target
-         continue
-         ;;
-
-       -pie | -fpie | -fPIE)
-          pie_flag="$pie_flag $arg"
-         continue
-         ;;
-
-       -shared | -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,*)
-         func_stripname '-Wc,' '' "$arg"
-         args=$func_stripname_result
-         lastarg=
-         save_ifs="$IFS"; IFS=','
-         for arg in $args; do
-           IFS="$save_ifs"
-           func_quote_for_eval "$arg"
-           lastarg="$lastarg $func_quote_for_eval_result"
-         done
-         IFS="$save_ifs"
-         func_stripname ' ' '' "$lastarg"
-         lastarg=$func_stripname_result
-
-         # 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.
-      func_quote_for_eval "$lastarg"
-      base_compile="$base_compile $func_quote_for_eval_result"
-    done # for arg
-
-    case $arg_mode in
-    arg)
-      func_fatal_error "you must specify an argument for -Xcompile"
-      ;;
-    target)
-      func_fatal_error "you must specify a target with \`-o'"
-      ;;
-    *)
-      # Get the name of the library object.
-      test -z "$libobj" && {
-       func_basename "$srcfile"
-       libobj="$func_basename_result"
-      }
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    case $libobj in
-    *.[cCFSifmso] | \
-    *.ada | *.adb | *.ads | *.asm | \
-    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
-      func_xform "$libobj"
-      libobj=$func_xform_result
-      ;;
-    esac
-
-    case $libobj in
-    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
-    *)
-      func_fatal_error "cannot determine name of library object from \`$libobj'"
-      ;;
-    esac
-
-    func_infer_tag $base_compile
-
-    for arg in $later; do
-      case $arg in
-      -shared)
-       test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
-       build_old_libs=no
-       continue
-       ;;
-
-      -static)
-       build_libtool_libs=no
-       build_old_libs=yes
-       continue
-       ;;
-
-      -prefer-pic)
-       pic_mode=yes
-       continue
-       ;;
-
-      -prefer-non-pic)
-       pic_mode=no
-       continue
-       ;;
-      esac
-    done
-
-    func_quote_for_eval "$libobj"
-    test "X$libobj" != "X$func_quote_for_eval_result" \
-      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
-      && func_warning "libobj name \`$libobj' may not contain shell special characters."
-    func_dirname_and_basename "$obj" "/" ""
-    objname="$func_basename_result"
-    xdir="$func_dirname_result"
-    lobj=${xdir}$objdir/$objname
-
-    test -z "$base_compile" && \
-      func_fatal_help "you must specify a compilation command"
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
-
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2* | cegcc*)
-      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"
-    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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
-       func_echo "Waiting for $lockfile to be removed"
-       sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      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."
-
-       $opt_dry_run || $RM $removelist
-       exit $EXIT_FAILURE
-      fi
-      removelist="$removelist $output_obj"
-      $ECHO "$srcfile" > "$lockfile"
-    fi
-
-    $opt_dry_run || $RM $removelist
-    removelist="$removelist $lockfile"
-    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-    func_quote_for_eval "$srcfile"
-    qsrcfile=$func_quote_for_eval_result
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      if test "$pic_mode" != no; then
-       command="$base_compile $qsrcfile $pic_flag"
-      else
-       # Don't build PIC code
-       command="$base_compile $qsrcfile"
-      fi
-
-      func_mkdir_p "$xdir$objdir"
-
-      if test -z "$output_obj"; then
-       # Place PIC objects in $objdir
-       command="$command -o $lobj"
-      fi
-
-      func_show_eval_locale "$command" \
-          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/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."
-
-       $opt_dry_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
-       func_show_eval '$MV "$output_obj" "$lobj"' \
-         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
-      fi
-
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-       suppress_output=' >/dev/null 2>&1'
-      fi
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-       # Don't build PIC code
-       command="$base_compile $qsrcfile$pie_flag"
-      else
-       command="$base_compile $qsrcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-       command="$command -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      func_show_eval_locale "$command" \
-        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/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."
-
-       $opt_dry_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
-       func_show_eval '$MV "$output_obj" "$obj"' \
-         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
-      fi
-    fi
-
-    $opt_dry_run || {
-      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
-
-      # Unlock the critical section if it was locked
-      if test "$need_locks" != no; then
-       removelist=$lockfile
-        $RM "$lockfile"
-      fi
-    }
-
-    exit $EXIT_SUCCESS
-}
-
-$opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
-    # We need to display help for each of the modes.
-    case $mode in
-      "")
-        # Generic help is extracted from the usage comments
-        # at the start of this file.
-        func_help
-        ;;
-
-      clean)
-        $ECHO \
-"Usage: $progname [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: $progname [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
-  -no-suppress      do not suppress compiler output for multiple passes
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -shared           do not build a \`.o' file suitable for static linking
-  -static           only build a \`.o' file suitable for static linking
-
-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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially:
-
-  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-        ;;
-
-      link)
-        $ECHO \
-"Usage: $progname [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
-  -shared           only do dynamic linking of libtool libraries
-  -shrext SUFFIX    override the standard shared library file extension
-  -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]
-  -weak LIBNAME     declare that the target provides the LIBNAME interface
-
-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: $progname [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."
-        ;;
-
-      *)
-        func_fatal_help "invalid operation mode \`$mode'"
-        ;;
-    esac
-
-    $ECHO
-    $ECHO "Try \`$progname --help' for more information about other modes."
-
-    exit $?
-}
-
-  # Now that we've collected a possible --mode arg, show help if necessary
-  $opt_help && func_mode_help
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
-    $opt_debug
-    # The first argument is the command name.
-    cmd="$nonopt"
-    test -z "$cmd" && \
-      func_fatal_help "you must specify a COMMAND"
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      test -f "$file" \
-       || func_fatal_help "\`$file' is not a file"
-
-      dir=
-      case $file in
-      *.la)
-       # Check to see that this really is a libtool archive.
-       func_lalib_unsafe_p "$file" \
-         || func_fatal_help "\`$lib' is not a valid libtool archive"
-
-       # Read the libtool library.
-       dlname=
-       library_names=
-       func_source "$file"
-
-       # Skip this library if it cannot be dlopened.
-       if test -z "$dlname"; then
-         # Warn if it was a shared library.
-         test -n "$library_names" && \
-           func_warning "\`$file' was not linked with \`-export-dynamic'"
-         continue
-       fi
-
-       func_dirname "$file" "" "."
-       dir="$func_dirname_result"
-
-       if test -f "$dir/$objdir/$dlname"; then
-         dir="$dir/$objdir"
-       else
-         if test ! -f "$dir/$dlname"; then
-           func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
-         fi
-       fi
-       ;;
-
-      *.lo)
-       # Just add the directory containing the .lo file.
-       func_dirname "$file" "" "."
-       dir="$func_dirname_result"
-       ;;
-
-      *)
-       func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
-       continue
-       ;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # 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 func_ltwrapper_script_p "$file"; then
-         func_source "$file"
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       elif func_ltwrapper_executable_p "$file"; then
-         func_ltwrapper_scriptname "$file"
-         func_source "$func_ltwrapper_scriptname_result"
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       fi
-       ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      func_quote_for_eval "$file"
-      args="$args $func_quote_for_eval_result"
-    done
-
-    if test "X$opt_dry_run" = Xfalse; 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 LANGUAGE 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
-             else
-               $lt_unset $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
-}
-
-test "$mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
-    $opt_debug
-    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.
-         func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
-       fi
-       if test -n "$finish_eval"; then
-         # Do the single finish_eval.
-         eval cmds=\"$finish_eval\"
-         $opt_dry_run || eval "$cmds" || admincmds="$admincmds
-       $cmds"
-       fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    $opt_silent && 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"
-    case $host in
-      solaris2.[6789]|solaris2.1[0-9])
-        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
-       $ECHO "pages."
-       ;;
-      *)
-        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
-        ;;
-    esac
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
-    exit $EXIT_SUCCESS
-}
-
-test "$mode" = finish && func_mode_finish ${1+"$@"}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
-    $opt_debug
-    # 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.
-      func_quote_for_eval "$nonopt"
-      install_prog="$func_quote_for_eval_result "
-      arg=$1
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    func_quote_for_eval "$arg"
-    install_prog="$install_prog$func_quote_for_eval_result"
-
-    # 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.
-      func_quote_for_eval "$arg"
-      install_prog="$install_prog $func_quote_for_eval_result"
-    done
-
-    test -z "$install_prog" && \
-      func_fatal_help "you must specify an install program"
-
-    test -n "$prev" && \
-      func_fatal_help "the \`$prev' option requires an argument"
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-       func_fatal_help "no file or destination specified"
-      else
-       func_fatal_help "you must specify a destination"
-      fi
-    fi
-
-    # Strip any trailing slash from the destination.
-    func_stripname '' '/' "$dest"
-    dest=$func_stripname_result
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      func_dirname_and_basename "$dest" "" "."
-      destdir="$func_dirname_result"
-      destname="$func_basename_result"
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files; shift
-      test "$#" -gt 1 && \
-       func_fatal_help "\`$dest' is not a directory"
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-       case $file in
-       *.lo) ;;
-       *)
-         func_fatal_help "\`$destdir' must be an absolute directory name"
-         ;;
-       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.
-       func_lalib_unsafe_p "$file" \
-         || func_fatal_help "\`$file' is not a valid libtool archive"
-
-       library_names=
-       old_library=
-       relink_command=
-       func_source "$file"
-
-       # 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
-
-       func_dirname "$file" "/" ""
-       dir="$func_dirname_result"
-       dir="$dir$objdir"
-
-       if test -n "$relink_command"; then
-         # Determine the prefix the user has applied to our future dir.
-         inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
-
-         # 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.
-         test "$inst_prefix_dir" = "$destdir" && \
-           func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
-         if test -n "$inst_prefix_dir"; then
-           # Stick the inst_prefix_dir data into the link command.
-           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-         else
-           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
-         fi
-
-         func_warning "relinking \`$file'"
-         func_show_eval "$relink_command" \
-           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
-       fi
-
-       # See the names of the shared library.
-       set dummy $library_names; shift
-       if test -n "$1"; then
-         realname="$1"
-         shift
-
-         srcname="$realname"
-         test -n "$relink_command" && srcname="$realname"T
-
-         # Install the shared library and build the symlinks.
-         func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
-             'exit $?'
-         tstripme="$stripme"
-         case $host_os in
-         cygwin* | mingw* | pw32* | cegcc*)
-           case $realname in
-           *.dll.a)
-             tstripme=""
-             ;;
-           esac
-           ;;
-         esac
-         if test -n "$tstripme" && test -n "$striplib"; then
-           func_show_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
-             test "$linkname" != "$realname" \
-               && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
-           done
-         fi
-
-         # Do each command in the postinstall commands.
-         lib="$destdir/$realname"
-         func_execute_cmds "$postinstall_cmds" 'exit $?'
-       fi
-
-       # Install the pseudo-library for information purposes.
-       func_basename "$file"
-       name="$func_basename_result"
-       instname="$dir/$name"i
-       func_show_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
-         func_basename "$file"
-         destfile="$func_basename_result"
-         destfile="$destdir/$destfile"
-       fi
-
-       # Deduce the name of the destination old-style object file.
-       case $destfile in
-       *.lo)
-         func_lo2o "$destfile"
-         staticdest=$func_lo2o_result
-         ;;
-       *.$objext)
-         staticdest="$destfile"
-         destfile=
-         ;;
-       *)
-         func_fatal_help "cannot copy a libtool object to \`$destfile'"
-         ;;
-       esac
-
-       # Install the libtool object if requested.
-       test -n "$destfile" && \
-         func_show_eval "$install_prog $file $destfile" 'exit $?'
-
-       # Install the old object if enabled.
-       if test "$build_old_libs" = yes; then
-         # Deduce the name of the old-style object file.
-         func_lo2o "$file"
-         staticobj=$func_lo2o_result
-         func_show_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
-         func_basename "$file"
-         destfile="$func_basename_result"
-         destfile="$destdir/$destfile"
-       fi
-
-       # If the file is missing, and there is a .exe on the end, strip it
-       # because it is most likely a libtool script we actually want to
-       # install
-       stripped_ext=""
-       case $file in
-         *.exe)
-           if test ! -f "$file"; then
-             func_stripname '' '.exe' "$file"
-             file=$func_stripname_result
-             stripped_ext=".exe"
-           fi
-           ;;
-       esac
-
-       # Do a test to see if this is really a libtool program.
-       case $host in
-       *cygwin* | *mingw*)
-           if func_ltwrapper_executable_p "$file"; then
-             func_ltwrapper_scriptname "$file"
-             wrapper=$func_ltwrapper_scriptname_result
-           else
-             func_stripname '' '.exe' "$file"
-             wrapper=$func_stripname_result
-           fi
-           ;;
-       *)
-           wrapper=$file
-           ;;
-       esac
-       if func_ltwrapper_script_p "$wrapper"; then
-         notinst_deplibs=
-         relink_command=
-
-         func_source "$wrapper"
-
-         # Check the variables that should have been set.
-         test -z "$generated_by_libtool_version" && \
-           func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
-         finalize=yes
-         for lib in $notinst_deplibs; do
-           # Check to see that each library is installed.
-           libdir=
-           if test -f "$lib"; then
-             func_source "$lib"
-           fi
-           libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-           if test -n "$libdir" && test ! -f "$libfile"; then
-             func_warning "\`$lib' has not been installed in \`$libdir'"
-             finalize=no
-           fi
-         done
-
-         relink_command=
-         func_source "$wrapper"
-
-         outputname=
-         if test "$fast_install" = no && test -n "$relink_command"; then
-           $opt_dry_run || {
-             if test "$finalize" = yes; then
-               tmpdir=`func_mktempdir`
-               func_basename "$file$stripped_ext"
-               file="$func_basename_result"
-               outputname="$tmpdir/$file"
-               # Replace the output file specification.
-               relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
-               $opt_silent || {
-                 func_quote_for_expand "$relink_command"
-                 eval "func_echo $func_quote_for_expand_result"
-               }
-               if eval "$relink_command"; then :
-                 else
-                 func_error "error: relink \`$file' with the above command before installing it"
-                 $opt_dry_run || ${RM}r "$tmpdir"
-                 continue
-               fi
-               file="$outputname"
-             else
-               func_warning "cannot relink \`$file'"
-             fi
-           }
-         else
-           # Install the binary that we compiled earlier.
-           file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-         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)
-           func_stripname '' '.exe' "$destfile"
-           destfile=$func_stripname_result
-           ;;
-         esac
-         ;;
-       esac
-       func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
-       $opt_dry_run || if test -n "$outputname"; then
-         ${RM}r "$tmpdir"
-       fi
-       ;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      func_basename "$file"
-      name="$func_basename_result"
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-       func_show_eval "$old_striplib $oldlib" 'exit $?'
-      fi
-
-      # Do each command in the postinstall commands.
-      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
-    done
-
-    test -n "$future_libdirs" && \
-      func_warning "remember to run \`$progname --finish$future_libdirs'"
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      $opt_dry_run && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-}
-
-test "$mode" = install && func_mode_install ${1+"$@"}
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
-    $opt_debug
-    my_outputname="$1"
-    my_originator="$2"
-    my_pic_p="${3-no}"
-    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
-    my_dlsyms=
-
-    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-      if test -n "$NM" && test -n "$global_symbol_pipe"; then
-       my_dlsyms="${my_outputname}S.c"
-      else
-       func_error "not configured to extract global symbols from dlpreopened files"
-      fi
-    fi
-
-    if test -n "$my_dlsyms"; then
-      case $my_dlsyms in
-      "") ;;
-      *.c)
-       # Discover the nlist of each of the dlfiles.
-       nlist="$output_objdir/${my_outputname}.nm"
-
-       func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
-       # Parse the name list into a source file.
-       func_verbose "creating $output_objdir/$my_dlsyms"
-
-       $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
-       if test "$dlself" = yes; then
-         func_verbose "generating symbol list for \`$output'"
-
-         $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
-
-         # Add our own program objects to the symbol list.
-         progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-         for progfile in $progfiles; do
-           func_verbose "extracting global C symbols from \`$progfile'"
-           $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
-         done
-
-         if test -n "$exclude_expsyms"; then
-           $opt_dry_run || {
-             eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-           }
-         fi
-
-         if test -n "$export_symbols_regex"; then
-           $opt_dry_run || {
-             eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-           }
-         fi
-
-         # Prepare the list of exported symbols
-         if test -z "$export_symbols"; then
-           export_symbols="$output_objdir/$outputname.exp"
-           $opt_dry_run || {
-             $RM $export_symbols
-             eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-             case $host in
-             *cygwin* | *mingw* | *cegcc* )
-                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-               ;;
-             esac
-           }
-         else
-           $opt_dry_run || {
-             eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-             case $host in
-               *cygwin | *mingw* | *cegcc* )
-                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                 ;;
-             esac
-           }
-         fi
-       fi
-
-       for dlprefile in $dlprefiles; do
-         func_verbose "extracting global C symbols from \`$dlprefile'"
-         func_basename "$dlprefile"
-         name="$func_basename_result"
-         $opt_dry_run || {
-           eval '$ECHO ": $name " >> "$nlist"'
-           eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-         }
-       done
-
-       $opt_dry_run || {
-         # 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 >/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/$my_dlsyms"'
-         else
-           $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
-         fi
-
-         $ECHO >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols.  */
-typedef struct {
-  const char *name;
-  void *address;
-} lt_dlsymlist;
-"
-         case $host in
-         *cygwin* | *mingw* | *cegcc* )
-           $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs.  */"
-           lt_dlsym_const= ;;
-         *osf5*)
-           echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
-           lt_dlsym_const= ;;
-         *)
-           lt_dlsym_const=const ;;
-         esac
-
-         $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
-  { \"$my_originator\", (void *) 0 },"
-
-         case $need_lib_prefix in
-         no)
-           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
-           ;;
-         *)
-           eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
-           ;;
-         esac
-         $ECHO >> "$output_objdir/$my_dlsyms" "\
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-       } # !$opt_dry_run
-
-       pic_flag_for_symtable=
-       case "$compile_command " in
-       *" -static "*) ;;
-       *)
-         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*)
-           pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
-         *-*-hpux*)
-           pic_flag_for_symtable=" $pic_flag"  ;;
-         *)
-           if test "X$my_pic_p" != Xno; then
-             pic_flag_for_symtable=" $pic_flag"
-           fi
-           ;;
-         esac
-         ;;
-       esac
-       symtab_cflags=
-       for arg in $LTCFLAGS; do
-         case $arg in
-         -pie | -fpie | -fPIE) ;;
-         *) symtab_cflags="$symtab_cflags $arg" ;;
-         esac
-       done
-
-       # Now compile the dynamic symbol file.
-       func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
-       # Clean up the generated files.
-       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
-       # Transform the symbol file into the correct name.
-       symfileobj="$output_objdir/${my_outputname}S.$objext"
-       case $host in
-       *cygwin* | *mingw* | *cegcc* )
-         if test -f "$output_objdir/$my_outputname.def"; then
-           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-         else
-           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-         fi
-         ;;
-       *)
-         compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-         finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-         ;;
-       esac
-       ;;
-      *)
-       func_fatal_error "unknown suffix for \`$my_dlsyms'"
-       ;;
-      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" | $Xsed -e "s% @SYMFILE@%%"`
-      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
-    fi
-}
-
-# 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 ()
-{
-  $opt_debug
-  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 '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_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
-    $opt_debug
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-     :
-    else
-      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
-    fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
-    $opt_debug
-    my_gentop="$1"; shift
-    my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
-
-    for my_xlib in $my_oldlibs; do
-      # Extract the objects.
-      case $my_xlib in
-       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-       *) my_xabs=`pwd`"/$my_xlib" ;;
-      esac
-      func_basename "$my_xlib"
-      my_xlib="$func_basename_result"
-      my_xlib_u=$my_xlib
-      while :; do
-        case " $extracted_archives " in
-       *" $my_xlib_u "*)
-         func_arith $extracted_serial + 1
-         extracted_serial=$func_arith_result
-         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"
-
-      func_mkdir_p "$my_xdir"
-
-      case $host in
-      *-darwin*)
-       func_verbose "Extracting $my_xabs"
-       # Do not bother doing anything if just a dry run
-       $opt_dry_run || {
-         darwin_orig_dir=`pwd`
-         cd $my_xdir || exit $?
-         darwin_archive=$my_xabs
-         darwin_curdir=`pwd`
-         darwin_base_archive=`basename "$darwin_archive"`
-         darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
-         if test -n "$darwin_arches"; then
-           darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
-           darwin_arch=
-           func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-           for darwin_arch in  $darwin_arches ; do
-             func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-             cd "$darwin_curdir"
-             $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-           done # $darwin_arches
-            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
-           darwin_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 -rf unfat-$$
-           cd "$darwin_orig_dir"
-         else
-           cd $darwin_orig_dir
-           func_extract_an_archive "$my_xdir" "$my_xabs"
-         fi # $darwin_arches
-       } # !$opt_dry_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"
-}
-
-
-
-# func_emit_wrapper_part1 [arg=no]
-#
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
-       func_emit_wrapper_part1_arg1=no
-       if test -n "$1" ; then
-         func_emit_wrapper_part1_arg1=$1
-       fi
-
-       $ECHO "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# 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
-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 variables:
-  generated_by_libtool_version='$macro_version'
-  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 "\
-
-  # 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
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
-       func_emit_wrapper_part2_arg1=no
-       if test -n "$1" ; then
-         func_emit_wrapper_part2_arg1=$1
-       fi
-
-       $ECHO "\
-
-  # Usually 'no', except on cygwin/mingw when embedded into
-  # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
-  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
-    # special case for '.'
-    if test \"\$thisdir\" = \".\"; then
-      thisdir=\`pwd\`
-    fi
-    # remove .libs from thisdir
-    case \"\$thisdir\" in
-    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
-    $objdir )   thisdir=. ;;
-    esac
-  fi
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-       if test "$fast_install" = yes; then
-         $ECHO "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
-
-  if test ! -f \"\$progdir/\$program\" ||
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $MKDIR \"\$progdir\"
-    else
-      $RM \"\$progdir/\$file\"
-    fi"
-
-         $ECHO "\
-
-    # 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 1
-      fi
-    fi
-
-    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $RM \"\$progdir/\$program\";
-      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $RM \"\$progdir/\$file\"
-  fi"
-       else
-         $ECHO "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-       fi
-
-       $ECHO "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-       # Export our shlibpath_var if we have one.
-       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-         $ECHO "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-       fi
-
-       # fixup the dll searchpath if we need to.
-       if test -n "$dllsearchpath"; then
-         $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-       fi
-
-       $ECHO "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-       case $host in
-       # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2* | *-cegcc*)
-         $ECHO "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-         ;;
-
-       *)
-         $ECHO "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-         ;;
-       esac
-       $ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 1
-    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 1
-  fi
-fi\
-"
-}
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory.  This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
-       func_emit_wrapper_arg1=no
-       if test -n "$1" ; then
-         func_emit_wrapper_arg1=$1
-       fi
-
-       # split this up so that func_emit_cwrapperexe_src
-       # can call each part independently.
-       func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
-       func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin.  Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
-  func_to_host_path_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        case $build in
-          *mingw* ) # actually, msys
-            # awkward: cmd appends spaces to result
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_path_tmp1=`cygpath -w "$1"`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # Unfortunately, winepath does not exit with a non-zero
-            # error code, so we are forced to check the contents of
-            # stdout. On the other hand, if the command is not
-            # found, the shell will set an exit code of 127 and print
-            # *an error message* to stdout. So we must check for both
-            # error code of zero AND non-empty stdout, which explains
-            # the odd construction:
-            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
-            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
-              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-                $SED -e "$lt_sed_naive_backslashify"`
-            else
-              # Allow warning below.
-              func_to_host_path_result=""
-            fi
-            ;;
-        esac
-        if test -z "$func_to_host_path_result" ; then
-          func_error "Could not determine host path corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback:
-          func_to_host_path_result="$1"
-        fi
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_path
-
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
-  func_to_host_pathlist_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        # Remove leading and trailing path separator characters from
-        # ARG. msys behavior is inconsistent here, cygpath turns them
-        # into '.;' and ';.', and winepath ignores them completely.
-        func_to_host_pathlist_tmp2="$1"
-        # Once set for this call, this variable should not be
-        # reassigned. It is used in tha fallback case.
-        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
-          $SED -e 's|^:*||' -e 's|:*$||'`
-        case $build in
-          *mingw* ) # Actually, msys.
-            # Awkward: cmd appends spaces to result.
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # unfortunately, winepath doesn't convert pathlists
-            func_to_host_pathlist_result=""
-            func_to_host_pathlist_oldIFS=$IFS
-            IFS=:
-            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
-              IFS=$func_to_host_pathlist_oldIFS
-              if test -n "$func_to_host_pathlist_f" ; then
-                func_to_host_path "$func_to_host_pathlist_f"
-                if test -n "$func_to_host_path_result" ; then
-                  if test -z "$func_to_host_pathlist_result" ; then
-                    func_to_host_pathlist_result="$func_to_host_path_result"
-                  else
-                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
-                  fi
-                fi
-              fi
-              IFS=:
-            done
-            IFS=$func_to_host_pathlist_oldIFS
-            ;;
-        esac
-        if test -z "$func_to_host_pathlist_result" ; then
-          func_error "Could not determine the host path(s) corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback. This may break if $1 contains DOS-style drive
-          # specifications. The fix is not to complicate the expression
-          # below, but for the user to provide a working wine installation
-          # with winepath so that path translation in the cross-to-mingw
-          # case works properly.
-          lt_replace_pathsep_nix_to_dos="s|:|;|g"
-          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
-            $SED -e "$lt_replace_pathsep_nix_to_dos"`
-        fi
-        # Now, add the leading and trailing path separators back
-        case "$1" in
-          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
-            ;;
-        esac
-        case "$1" in
-          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
-            ;;
-        esac
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_pathlist
-
-# func_emit_cwrapperexe_src
-# emit the source code for a wrapper executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_cwrapperexe_src ()
-{
-       cat <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "$SHELL $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-           cat <<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-# define setmode _setmode
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-#  include <io.h>
-#  define HAVE_SETENV
-#  ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-#  endif
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef S_IXOTH
-# define S_IXOTH 0
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0
-#endif
-
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#endif
-
-#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
-# define FOPEN_WB "wb"
-# 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 */
-
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef _O_BINARY
-# define _O_BINARY 0
-#endif
-
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    (void) vfprintf (stderr, fmt, args);
-    va_end (args);
-}
-#else
-# define LTWRAPPER_DEBUGPRINTF(args)
-#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);
-char *chase_symlinks (const char *pathspec);
-int make_executable (const char *path);
-int check_executable (const char *path);
-char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-void lt_setenv (const char *name, const char *value);
-char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
-           func_emit_wrapper_part1 yes |
-               $SED -e 's/\([\\"]\)/\\\1/g' \
-                    -e 's/^/  "/' -e 's/$/\\n"/'
-           echo ";"
-           cat <<EOF
-
-static const char *script_text_part2 =
-EOF
-           func_emit_wrapper_part2 yes |
-               $SED -e 's/\([\\"]\)/\\\1/g' \
-                    -e 's/^/  "/' -e 's/$/\\n"/'
-           echo ";"
-
-           cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
-           if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-              func_to_host_pathlist "$temp_rpath"
-             cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
-EOF
-           else
-             cat <<"EOF"
-const char * LIB_PATH_VALUE   = "";
-EOF
-           fi
-
-           if test -n "$dllsearchpath"; then
-              func_to_host_pathlist "$dllsearchpath:"
-             cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
-EOF
-           else
-             cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE   = "";
-EOF
-           fi
-
-           if test "$fast_install" = yes; then
-             cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
-           else
-             cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
-           fi
-
-
-           cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX         "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
-
-static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
-static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
-  /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
-  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
-  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int  newargc;
-  char *tmp_pathspec;
-  char *actual_cwrapper_path;
-  char *actual_cwrapper_name;
-  char *target_name;
-  char *lt_argv_zero;
-  intptr_t rval = 127;
-
-  int i;
-
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
-
-  /* very simple arg parsing; don't want to rely on getopt */
-  for (i = 1; i < argc; i++)
-    {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
-       {
-EOF
-           case "$host" in
-             *mingw* | *cygwin* )
-               # make stdout use "unix" line endings
-               echo "          setmode(1,_O_BINARY);"
-               ;;
-             esac
-
-           cat <<"EOF"
-         printf ("%s", script_text_part1);
-         printf ("%s", script_text_part2);
-         return 0;
-       }
-    }
-
-  newargz = XMALLOC (char *, argc + 1);
-  tmp_pathspec = find_executable (argv[0]);
-  if (tmp_pathspec == NULL)
-    lt_fatal ("Couldn't find %s", argv[0]);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
-                         tmp_pathspec));
-
-  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
-                         actual_cwrapper_path));
-  XFREE (tmp_pathspec);
-
-  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
-  strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
-  /* wrapper name transforms */
-  strendzap (actual_cwrapper_name, ".exe");
-  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
-  XFREE (actual_cwrapper_name);
-  actual_cwrapper_name = tmp_pathspec;
-  tmp_pathspec = 0;
-
-  /* target_name transforms -- use actual target program name; might have lt- prefix */
-  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
-  strendzap (target_name, ".exe");
-  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
-  XFREE (target_name);
-  target_name = tmp_pathspec;
-  tmp_pathspec = 0;
-
-  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
-                         target_name));
-EOF
-
-           cat <<EOF
-  newargz[0] =
-    XMALLOC (char, (strlen (actual_cwrapper_path) +
-                   strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
-  strcpy (newargz[0], actual_cwrapper_path);
-  strcat (newargz[0], "$objdir");
-  strcat (newargz[0], "/");
-EOF
-
-           cat <<"EOF"
-  /* stop here, and copy so we don't have to do this twice */
-  tmp_pathspec = xstrdup (newargz[0]);
-
-  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
-  strcat (newargz[0], actual_cwrapper_name);
-
-  /* DO want the lt- prefix here if it exists, so use target_name */
-  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
-  XFREE (tmp_pathspec);
-  tmp_pathspec = NULL;
-EOF
-
-           case $host_os in
-             mingw*)
-           cat <<"EOF"
-  {
-    char* p;
-    while ((p = strchr (newargz[0], '\\')) != NULL)
-      {
-       *p = '/';
-      }
-    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
-      {
-       *p = '/';
-      }
-  }
-EOF
-           ;;
-           esac
-
-           cat <<"EOF"
-  XFREE (target_name);
-  XFREE (actual_cwrapper_path);
-  XFREE (actual_cwrapper_name);
-
-  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
-  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
-  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-
-  newargc=0;
-  for (i = 1; i < argc; i++)
-    {
-      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
-        {
-          if (argv[i][env_set_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_set_opt_len + 1;
-              lt_opt_process_env_set (p);
-            }
-          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_set (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_set_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
-        {
-          if (argv[i][env_prepend_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_prepend_opt_len + 1;
-              lt_opt_process_env_prepend (p);
-            }
-          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_prepend_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
-        {
-          if (argv[i][env_append_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_append_opt_len + 1;
-              lt_opt_process_env_append (p);
-            }
-          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_append (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_append_opt);
-          continue;
-        }
-      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
-        {
-          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-             namespace, but it is not one of the ones we know about and
-             have already dealt with, above (inluding dump-script), then
-             report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-             namespace. The first time any user complains about this, we'll
-             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-             or a configure.ac-settable value.
-           */
-          lt_fatal ("Unrecognized option in %s namespace: '%s'",
-                    ltwrapper_option_prefix, argv[i]);
-        }
-      /* otherwise ... */
-      newargz[++newargc] = xstrdup (argv[i]);
-    }
-  newargz[++newargc] = NULL;
-
-  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
-  for (i = 0; i < newargc; i++)
-    {
-      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
-    }
-
-EOF
-
-           case $host_os in
-             mingw*)
-               cat <<"EOF"
-  /* execv doesn't actually work on mingw as expected on unix */
-  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
-  if (rval == -1)
-    {
-      /* failed to start process */
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
-      return 127;
-    }
-  return rval;
-EOF
-               ;;
-             *)
-               cat <<"EOF"
-  execv (lt_argv_zero, newargz);
-  return rval; /* =127, but avoids unused variable warning */
-EOF
-               ;;
-           esac
-
-           cat <<"EOF"
-}
-
-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;
-
-  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
-                         path ? (*path ? path : "EMPTY!") : "NULL!"));
-  if ((!path) || (!*path))
-    return 0;
-
-  if ((stat (path, &st) >= 0)
-      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
-    return 1;
-  else
-    return 0;
-}
-
-int
-make_executable (const char *path)
-{
-  int rval = 0;
-  struct stat st;
-
-  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
-                         path ? (*path ? path : "EMPTY!") : "NULL!"));
-  if ((!path) || (!*path))
-    return 0;
-
-  if (stat (path, &st) >= 0)
-    {
-      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
-    }
-  return rval;
-}
-
-/* Searches for the full path of the wrapper.  Returns
-   newly allocated full path name if found, NULL otherwise
-   Does not chase symlinks, even on platforms that support them.
-*/
-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;
-
-  LTWRAPPER_DEBUGPRINTF (("(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 *
-chase_symlinks (const char *pathspec)
-{
-#ifndef S_ISLNK
-  return xstrdup (pathspec);
-#else
-  char buf[LT_PATHMAX];
-  struct stat s;
-  char *tmp_pathspec = xstrdup (pathspec);
-  char *p;
-  int has_symlinks = 0;
-  while (strlen (tmp_pathspec) && !has_symlinks)
-    {
-      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
-                             tmp_pathspec));
-      if (lstat (tmp_pathspec, &s) == 0)
-       {
-         if (S_ISLNK (s.st_mode) != 0)
-           {
-             has_symlinks = 1;
-             break;
-           }
-
-         /* search backwards for last DIR_SEPARATOR */
-         p = tmp_pathspec + strlen (tmp_pathspec) - 1;
-         while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
-           p--;
-         if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
-           {
-             /* no more DIR_SEPARATORS left */
-             break;
-           }
-         *p = '\0';
-       }
-      else
-       {
-         char *errstr = strerror (errno);
-         lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
-       }
-    }
-  XFREE (tmp_pathspec);
-
-  if (!has_symlinks)
-    {
-      return xstrdup (pathspec);
-    }
-
-  tmp_pathspec = realpath (pathspec, buf);
-  if (tmp_pathspec == 0)
-    {
-      lt_fatal ("Could not follow symlinks for %s", pathspec);
-    }
-  return xstrdup (tmp_pathspec);
-#endif
-}
-
-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);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
-  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
-  {
-#ifdef HAVE_SETENV
-    /* always make a copy, for consistency with !HAVE_SETENV */
-    char *str = xstrdup (value);
-    setenv (name, str, 1);
-#else
-    int len = strlen (name) + 1 + strlen (value) + 1;
-    char *str = XMALLOC (char, len);
-    sprintf (str, "%s=%s", name, value);
-    if (putenv (str) != EXIT_SUCCESS)
-      {
-        XFREE (str);
-      }
-#endif
-  }
-}
-
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
-  char *new_value;
-  if (orig_value && *orig_value)
-    {
-      int orig_value_len = strlen (orig_value);
-      int add_len = strlen (add);
-      new_value = XMALLOC (char, add_len + orig_value_len + 1);
-      if (to_end)
-        {
-          strcpy (new_value, orig_value);
-          strcpy (new_value + orig_value_len, add);
-        }
-      else
-        {
-          strcpy (new_value, add);
-          strcpy (new_value + add_len, orig_value);
-        }
-    }
-  else
-    {
-      new_value = xstrdup (add);
-    }
-  return new_value;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
-  const char *p;
-  int len;
-  if (!arg || !*arg)
-    return 1;
-
-  p = strchr (arg, (int)'=');
-
-  if (!p)
-    return 1;
-
-  *value = xstrdup (++p);
-
-  len = strlen (arg) - strlen (*value);
-  *name = XMALLOC (char, len);
-  strncpy (*name, arg, len-1);
-  (*name)[len - 1] = '\0';
-
-  return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
-    }
-
-  lt_setenv (name, value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 0);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 1);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
-
-  if (name && *name && value && *value)
-    {
-      char *new_value = lt_extend_str (getenv (name), value, 0);
-      /* some systems can't cope with a ':'-terminated path #' */
-      int len = strlen (new_value);
-      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
-        {
-          new_value[len-1] = '\0';
-        }
-      lt_setenv (name, new_value);
-      XFREE (new_value);
-    }
-}
-
-void
-lt_update_lib_path (const char *name, const char *value)
-{
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
-
-  if (name && *name && value && *value)
-    {
-      char *new_value = lt_extend_str (getenv (name), value, 0);
-      lt_setenv (name, new_value);
-      XFREE (new_value);
-    }
-}
-
-
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# func_mode_link arg...
-func_mode_link ()
-{
-    $opt_debug
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args=$nonopt
-    base_compile="$nonopt $@"
-    compile_command=$nonopt
-    finalize_command=$nonopt
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
-    new_inherited_linker_flags=
-
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
-    weak_libs=
-    single_module="${wl}-single_module"
-    func_infer_tag $base_compile
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -shared)
-       test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
-       build_old_libs=no
-       break
-       ;;
-      -all-static | -static | -static-libtool-libs)
-       case $arg in
-       -all-static)
-         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-           func_warning "complete static linking is impossible in this configuration"
-         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
-      func_quote_for_eval "$arg"
-      qarg=$func_quote_for_eval_unquoted_result
-      func_append libtool_args " $func_quote_for_eval_result"
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-       case $prev in
-       output)
-         func_append compile_command " @OUTPUT@"
-         func_append finalize_command " @OUTPUT@"
-         ;;
-       esac
-
-       case $prev in
-       dlfiles|dlprefiles)
-         if test "$preload" = no; then
-           # Add the symbol object into the linking commands.
-           func_append compile_command " @SYMFILE@"
-           func_append 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"
-         test -f "$arg" \
-           || func_fatal_error "symbol file \`$arg' does not exist"
-         prev=
-         continue
-         ;;
-       expsyms_regex)
-         export_symbols_regex="$arg"
-         prev=
-         continue
-         ;;
-       framework)
-         case $host in
-           *-*-darwin*)
-             case "$deplibs " in
-               *" $qarg.ltframework "*) ;;
-               *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
-                  ;;
-             esac
-             ;;
-         esac
-         prev=
-         continue
-         ;;
-       inst_prefix)
-         inst_prefix_dir="$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 func_lalib_unsafe_p "$arg"; then
-               pic_object=
-               non_pic_object=
-
-               # Read the .lo file
-               func_source "$arg"
-
-               if test -z "$pic_object" ||
-                  test -z "$non_pic_object" ||
-                  test "$pic_object" = none &&
-                  test "$non_pic_object" = none; then
-                 func_fatal_error "cannot find name of object for \`$arg'"
-               fi
-
-               # Extract subdirectory from the argument.
-               func_dirname "$arg" "/" ""
-               xdir="$func_dirname_result"
-
-               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.
-                 func_append 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
-                 func_append 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"
-                 func_append non_pic_objects " $non_pic_object"
-               fi
-             else
-               # Only an error if not doing a dry-run.
-               if $opt_dry_run; then
-                 # Extract subdirectory from the argument.
-                 func_dirname "$arg" "/" ""
-                 xdir="$func_dirname_result"
-
-                 func_lo2o "$arg"
-                 pic_object=$xdir$objdir/$func_lo2o_result
-                 non_pic_object=$xdir$func_lo2o_result
-                 func_append libobjs " $pic_object"
-                 func_append non_pic_objects " $non_pic_object"
-               else
-                 func_fatal_error "\`$arg' is not a valid libtool object"
-               fi
-             fi
-           done
-         else
-           func_fatal_error "link input file \`$arg' does not exist"
-         fi
-         arg=$save_arg
-         prev=
-         continue
-         ;;
-       precious_regex)
-         precious_files_regex="$arg"
-         prev=
-         continue
-         ;;
-       release)
-         release="-$arg"
-         prev=
-         continue
-         ;;
-       rpath | xrpath)
-         # We need an absolute path.
-         case $arg in
-         [\\/]* | [A-Za-z]:[\\/]*) ;;
-         *)
-           func_fatal_error "only absolute run-paths are allowed"
-           ;;
-         esac
-         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
-         ;;
-       shrext)
-         shrext_cmds="$arg"
-         prev=
-         continue
-         ;;
-       weak)
-         weak_libs="$weak_libs $arg"
-         prev=
-         continue
-         ;;
-       xcclinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         func_append compile_command " $qarg"
-         func_append finalize_command " $qarg"
-         continue
-         ;;
-       xcompiler)
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         func_append compile_command " $qarg"
-         func_append finalize_command " $qarg"
-         continue
-         ;;
-       xlinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $wl$qarg"
-         prev=
-         func_append compile_command " $wl$qarg"
-         func_append finalize_command " $wl$qarg"
-         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
-         # See comment for -static flag below, for more details.
-         func_append compile_command " $link_static_flag"
-         func_append finalize_command " $link_static_flag"
-       fi
-       continue
-       ;;
-
-      -allow-undefined)
-       # FIXME: remove this flag sometime in the future.
-       func_fatal_error "\`-allow-undefined' must not be used because it is the default"
-       ;;
-
-      -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
-         func_fatal_error "more than one -exported-symbols argument is not allowed"
-       fi
-       if test "X$arg" = "X-export-symbols"; then
-         prev=expsyms
-       else
-         prev=expsyms_regex
-       fi
-       continue
-       ;;
-
-      -framework)
-       prev=framework
-       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*)
-         func_append compile_command " $arg"
-         func_append finalize_command " $arg"
-         ;;
-       esac
-       continue
-       ;;
-
-      -L*)
-       func_stripname '-L' '' "$arg"
-       dir=$func_stripname_result
-       if test -z "$dir"; then
-         if test "$#" -gt 0; then
-           func_fatal_error "require no space between \`-L' and \`$1'"
-         else
-           func_fatal_error "need path for \`-L' option"
-         fi
-       fi
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         absdir=`cd "$dir" && pwd`
-         test -z "$absdir" && \
-           func_fatal_error "cannot determine absolute directory name of \`$dir'"
-         dir="$absdir"
-         ;;
-       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* | *-cegcc*)
-         testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$dir:"*) ;;
-         ::) dllsearchpath=$dir;;
-         *) dllsearchpath="$dllsearchpath:$dir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         ::) dllsearchpath=$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* | *-cegcc*)
-           # 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 System.ltframework"
-           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
-       ;;
-
-      -module)
-       module=yes
-       continue
-       ;;
-
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
-      # classes, name mangling, and exception handling.
-      # Darwin uses the -arch flag to determine output architecture.
-      -model|-arch|-isysroot)
-       compiler_flags="$compiler_flags $arg"
-       func_append compile_command " $arg"
-       func_append finalize_command " $arg"
-       prev=xcompiler
-       continue
-       ;;
-
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-       compiler_flags="$compiler_flags $arg"
-       func_append compile_command " $arg"
-       func_append finalize_command " $arg"
-       case "$new_inherited_linker_flags " in
-           *" $arg "*) ;;
-           * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
-       esac
-       continue
-       ;;
-
-      -multi_module)
-       single_module="${wl}-multi_module"
-       continue
-       ;;
-
-      -no-fast-install)
-       fast_install=no
-       continue
-       ;;
-
-      -no-install)
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
-         # The PATH hackery in wrapper scripts is required on Windows
-         # and Darwin in order for the loader to find any dlls it needs.
-         func_warning "\`-no-install' is ignored for $host"
-         func_warning "assuming \`-no-fast-install' instead"
-         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*)
-       func_stripname '-R' '' "$arg"
-       dir=$func_stripname_result
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         func_fatal_error "only absolute run-paths are allowed"
-         ;;
-       esac
-       case "$xrpath " in
-       *" $dir "*) ;;
-       *) xrpath="$xrpath $dir" ;;
-       esac
-       continue
-       ;;
-
-      -shared)
-       # The effects of -shared are defined in a previous loop.
-       continue
-       ;;
-
-      -shrext)
-       prev=shrext
-       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
-       ;;
-
-      -weak)
-        prev=weak
-       continue
-       ;;
-
-      -Wc,*)
-       func_stripname '-Wc,' '' "$arg"
-       args=$func_stripname_result
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-          func_quote_for_eval "$flag"
-         arg="$arg $wl$func_quote_for_eval_result"
-         compiler_flags="$compiler_flags $func_quote_for_eval_result"
-       done
-       IFS="$save_ifs"
-       func_stripname ' ' '' "$arg"
-       arg=$func_stripname_result
-       ;;
-
-      -Wl,*)
-       func_stripname '-Wl,' '' "$arg"
-       args=$func_stripname_result
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-          func_quote_for_eval "$flag"
-         arg="$arg $wl$func_quote_for_eval_result"
-         compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
-         linker_flags="$linker_flags $func_quote_for_eval_result"
-       done
-       IFS="$save_ifs"
-       func_stripname ' ' '' "$arg"
-       arg=$func_stripname_result
-       ;;
-
-      -Xcompiler)
-       prev=xcompiler
-       continue
-       ;;
-
-      -Xlinker)
-       prev=xlinker
-       continue
-       ;;
-
-      -XCClinker)
-       prev=xcclinker
-       continue
-       ;;
-
-      # -msg_* for osf cc
-      -msg_*)
-       func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-       ;;
-
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-        func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-        func_append compile_command " $arg"
-        func_append finalize_command " $arg"
-        compiler_flags="$compiler_flags $arg"
-        continue
-        ;;
-
-      # Some other compiler flag.
-      -* | +*)
-        func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-       ;;
-
-      *.$objext)
-       # A standard object.
-       objs="$objs $arg"
-       ;;
-
-      *.lo)
-       # A libtool-controlled object.
-
-       # Check to see that this really is a libtool object.
-       if func_lalib_unsafe_p "$arg"; then
-         pic_object=
-         non_pic_object=
-
-         # Read the .lo file
-         func_source "$arg"
-
-         if test -z "$pic_object" ||
-            test -z "$non_pic_object" ||
-            test "$pic_object" = none &&
-            test "$non_pic_object" = none; then
-           func_fatal_error "cannot find name of object for \`$arg'"
-         fi
-
-         # Extract subdirectory from the argument.
-         func_dirname "$arg" "/" ""
-         xdir="$func_dirname_result"
-
-         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.
-           func_append 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
-           func_append 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"
-           func_append non_pic_objects " $non_pic_object"
-         fi
-       else
-         # Only an error if not doing a dry-run.
-         if $opt_dry_run; then
-           # Extract subdirectory from the argument.
-           func_dirname "$arg" "/" ""
-           xdir="$func_dirname_result"
-
-           func_lo2o "$arg"
-           pic_object=$xdir$objdir/$func_lo2o_result
-           non_pic_object=$xdir$func_lo2o_result
-           func_append libobjs " $pic_object"
-           func_append non_pic_objects " $non_pic_object"
-         else
-           func_fatal_error "\`$arg' is not a valid libtool 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.
-       func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-       ;;
-      esac # arg
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-       func_append compile_command " $arg"
-       func_append finalize_command " $arg"
-      fi
-    done # argument parsing loop
-
-    test -n "$prev" && \
-      func_fatal_help "the \`$prevarg' option requires an argument"
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      func_append compile_command " $arg"
-      func_append finalize_command " $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    func_basename "$output"
-    outputname="$func_basename_result"
-    libobjs_save="$libobjs"
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    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\"
-
-    func_dirname "$output" "/" ""
-    output_objdir="$func_dirname_result$objdir"
-    # Create the object directory.
-    func_mkdir_p "$output_objdir"
-
-    # Determine the type of output
-    case $output in
-    "")
-      func_fatal_help "you must specify an output file"
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    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 $opt_duplicate_deps ; 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 $opt_duplicate_compiler_generated_deps; then
-       for pre_post_dep in $predeps $postdeps; do
-         case "$pre_post_deps " in
-         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-         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
-    notinst_path= # paths that contain not-installed libtool libraries
-
-    case $linkmode in
-    lib)
-       passes="conv dlpreopen link"
-       for file in $dlfiles $dlprefiles; do
-         case $file in
-         *.la) ;;
-         *)
-           func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
-           ;;
-         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
-      # The preopen pass in lib mode reverses $deplibs; put it back here
-      # so that -L comes before libs that need it for instance...
-      if test "$linkmode,$pass" = "lib,link"; then
-       ## FIXME: Find the place where the list is rebuilt in the wrong
-       ##        order, and fix it there properly
-        tmp_deplibs=
-       for deplib in $deplibs; do
-         tmp_deplibs="$deplib $tmp_deplibs"
-       done
-       deplibs="$tmp_deplibs"
-      fi
-
-      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%"
-         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-         ;;
-       esac
-      fi
-      if test "$linkmode,$pass" = "lib,dlpreopen"; then
-       # Collect and forward deplibs of preopened libtool libs
-       for lib in $dlprefiles; do
-         # Ignore non-libtool-libs
-         dependency_libs=
-         case $lib in
-         *.la) func_source "$lib" ;;
-         esac
-
-         # Collect preopened libtool deplibs, except any this library
-         # has declared as weak libs
-         for deplib in $dependency_libs; do
-            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
-           case " $weak_libs " in
-           *" $deplib_base "*) ;;
-           *) deplibs="$deplibs $deplib" ;;
-           esac
-         done
-       done
-       libs="$dlprefiles"
-      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"
-           if test "$linkmode" = lib ; then
-               case "$new_inherited_linker_flags " in
-                   *" $deplib "*) ;;
-                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
-               esac
-           fi
-         fi
-         continue
-         ;;
-       -l*)
-         if test "$linkmode" != lib && test "$linkmode" != prog; then
-           func_warning "\`-l' is ignored for archives/objects"
-           continue
-         fi
-         func_stripname '-l' '' "$deplib"
-         name=$func_stripname_result
-         if test "$linkmode" = lib; then
-           searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
-         else
-           searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
-         fi
-         for searchdir in $searchdirs; do
-           for search_ext in .la $std_shrext .so .a; do
-             # Search the libtool library
-             lib="$searchdir/lib${name}${search_ext}"
-             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 func_lalib_p "$lib"; then
-                 library_names=
-                 old_library=
-                 func_source "$lib"
-                 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
-                   func_dirname "$lib" "" "."
-                   ladir="$func_dirname_result"
-                   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
-       *.ltframework)
-         if test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$deplib $compile_deplibs"
-           finalize_deplibs="$deplib $finalize_deplibs"
-         else
-           deplibs="$deplib $deplibs"
-           if test "$linkmode" = lib ; then
-               case "$new_inherited_linker_flags " in
-                   *" $deplib "*) ;;
-                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
-               esac
-           fi
-         fi
-         continue
-         ;;
-       -L*)
-         case $linkmode in
-         lib)
-           deplibs="$deplib $deplibs"
-           test "$pass" = conv && continue
-           newdependency_libs="$deplib $newdependency_libs"
-           func_stripname '-L' '' "$deplib"
-           newlib_search_path="$newlib_search_path $func_stripname_result"
-           ;;
-         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
-           func_stripname '-L' '' "$deplib"
-           newlib_search_path="$newlib_search_path $func_stripname_result"
-           ;;
-         *)
-           func_warning "\`-L' is ignored for archives/objects"
-           ;;
-         esac # linkmode
-         continue
-         ;; # -L
-       -R*)
-         if test "$pass" = link; then
-           func_stripname '-R' '' "$deplib"
-           dir=$func_stripname_result
-           # 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)
-           # Linking convenience modules into shared libraries is allowed,
-           # but linking other static libraries is non-portable.
-           case " $dlpreconveniencelibs " in
-           *" $deplib "*) ;;
-           *)
-             valid_a_lib=no
-             case $deplibs_check_method in
-               match_pattern*)
-                 set dummy $deplibs_check_method; shift
-                 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-                 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
-                   | $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 use here."
-             else
-               $ECHO
-               $ECHO "*** Warning: Linking the shared library $output against the"
-               $ECHO "*** static library $deplib is not portable!"
-               deplibs="$deplib $deplibs"
-             fi
-             ;;
-           esac
-           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
-         func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
-       fi
-
-       # Check to see that this really is a libtool archive.
-       func_lalib_unsafe_p "$lib" \
-         || func_fatal_error "\`$lib' is not a valid libtool archive"
-
-       func_dirname "$lib" "" "."
-       ladir="$func_dirname_result"
-
-       dlname=
-       dlopen=
-       dlpreopen=
-       libdir=
-       library_names=
-       old_library=
-       inherited_linker_flags=
-       # 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
-       func_source "$lib"
-
-       # Convert "-framework foo" to "foo.ltframework"
-       if test -n "$inherited_linker_flags"; then
-         tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
-         for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
-           case " $new_inherited_linker_flags " in
-             *" $tmp_inherited_linker_flag "*) ;;
-             *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
-           esac
-         done
-       fi
-       dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-       if test "$linkmode,$pass" = "lib,link" ||
-          test "$linkmode,$pass" = "prog,scan" ||
-          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-       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
-             func_fatal_error "cannot find name of link library for \`$lib'"
-           fi
-           # It is a libtool convenience library, so add in its objects.
-           convenience="$convenience $ladir/$objdir/$old_library"
-           old_convenience="$old_convenience $ladir/$objdir/$old_library"
-         elif test "$linkmode" != prog && test "$linkmode" != lib; then
-           func_fatal_error "\`$lib' is not a convenience library"
-         fi
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           deplibs="$deplib $deplibs"
-           if $opt_duplicate_deps ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done
-         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
-         func_fatal_error "cannot find name of link library for \`$lib'"
-       fi
-
-       # This library was specified with -dlopen.
-       if test "$pass" = dlopen; then
-         if test -z "$libdir"; then
-           func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
-         fi
-         if test -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
-           func_warning "cannot determine absolute directory name of \`$ladir'"
-           func_warning "passing it literally to the linker, although it might fail"
-           abs_ladir="$ladir"
-         fi
-         ;;
-       esac
-       func_basename "$lib"
-       laname="$func_basename_result"
-
-       # Find the relevant object directory and library name.
-       if test "X$installed" = Xyes; then
-         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           func_warning "library \`$lib' was moved."
-           dir="$ladir"
-           absdir="$abs_ladir"
-           libdir="$abs_ladir"
-         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
-       func_stripname 'lib' '.la' "$laname"
-       name=$func_stripname_result
-
-       # This library was specified with -dlpreopen.
-       if test "$pass" = dlpreopen; then
-         if test -z "$libdir" && test "$linkmode" = prog; then
-           func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
-         fi
-         # Prefer using a static library (so that no silly _DYNAMIC symbols
-         # are required to link).
-         if test -n "$old_library"; then
-           newdlprefiles="$newdlprefiles $dir/$old_library"
-           # Keep a list of preopened convenience libraries to check
-           # that they are being used correctly in the link pass.
-           test -z "$libdir" && \
-               dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
-         # Otherwise, use the dlname, so that lt_dlopen finds it.
-         elif test -n "$dlname"; then
-           newdlprefiles="$newdlprefiles $dir/$dlname"
-         else
-           newdlprefiles="$newdlprefiles $dir/$linklib"
-         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*) func_stripname '-L' '' "$deplib"
-                newlib_search_path="$newlib_search_path $func_stripname_result"
-                ;;
-           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 $opt_duplicate_deps ; 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
-             *"$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
-         case $host in
-         *cygwin* | *mingw* | *cegcc*)
-             # No point in relinking DLLs because paths are not encoded
-             notinst_deplibs="$notinst_deplibs $lib"
-             need_relink=no
-           ;;
-         *)
-           if test "$installed" = no; then
-             notinst_deplibs="$notinst_deplibs $lib"
-             need_relink=yes
-           fi
-           ;;
-         esac
-         # This is a shared library
-
-         # Warn about portability, can't link against -module's on some
-         # systems (darwin).  Don't bleat about dlopened modules though!
-         dlopenmodule=""
-         for dlpremoduletest in $dlprefiles; do
-           if test "X$dlpremoduletest" = "X$lib"; then
-             dlopenmodule="$dlpremoduletest"
-             break
-           fi
-         done
-         if test -z "$dlopenmodule" && 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
-           shift
-           realname="$1"
-           shift
-           libname=`eval "\\$ECHO \"$libname_spec\""`
-           # use dlname if we got it. it's perfectly good, no?
-           if test -n "$dlname"; then
-             soname="$dlname"
-           elif test -n "$soname_spec"; then
-             # bleh windows
-             case $host in
-             *cygwin* | mingw* | *cegcc*)
-               func_arith $current - $age
-               major=$func_arith_result
-               versuffix="-$major"
-               ;;
-             esac
-             eval soname=\"$soname_spec\"
-           else
-             soname="$realname"
-           fi
-
-           # Make a new name for the extract_expsyms_cmds to use
-           soroot="$soname"
-           func_basename "$soroot"
-           soname="$func_basename_result"
-           func_stripname 'lib' '.dll' "$soname"
-           newlib=libimp-$func_stripname_result.a
-
-           # If the library has no export list, then create one now
-           if test -f "$output_objdir/$soname-def"; then :
-           else
-             func_verbose "extracting exported symbol list from \`$soname'"
-             func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
-           fi
-
-           # Create $newlib
-           if test -f "$output_objdir/$newlib"; then :; else
-             func_verbose "generating import library for \`$soname'"
-             func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
-           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 (non-dlopened) module then we can not
-                   # link against it, someone is ignoring the earlier warnings
-                   if /usr/bin/file -L $add 2> /dev/null |
-                        $GREP ": [^:]* bundle" >/dev/null ; then
-                     if test "X$dlopenmodule" != "X$lib"; then
-                       $ECHO "*** Warning: lib $linklib is a module, not a shared library"
-                       if test -z "$old_library" ; then
-                         $ECHO
-                         $ECHO "*** And there doesn't seem to be a static archive available"
-                         $ECHO "*** The link will probably fail, sorry"
-                       else
-                         add="$dir/$old_library"
-                       fi
-                     elif test -n "$old_library"; then
-                       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 &&
-                test "$hardcode_direct_absolute" = no; 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
-             func_fatal_configuration "unsupported hardcode properties"
-           fi
-
-           if test -n "$add_shlibpath"; then
-             case :$compile_shlibpath: in
-             *":$add_shlibpath:"*) ;;
-             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-             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 &&
-              test "$hardcode_direct_absolute" = no; then
-             add="$libdir/$linklib"
-           elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
-             add="-l$name"
-           elif test "$hardcode_shlibpath_var" = yes; then
-             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*) func_stripname '-R' '' "$libdir"
-                  temp_xrpath=$func_stripname_result
-                  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 $opt_duplicate_deps ; 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)
-               func_dirname "$deplib" "" "."
-               dir="$func_dirname_result"
-               # We need an absolute path.
-               case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-               *)
-                 absdir=`cd "$dir" && pwd`
-                 if test -z "$absdir"; then
-                   func_warning "cannot determine absolute directory name of \`$dir'"
-                   absdir="$dir"
-                 fi
-                 ;;
-               esac
-               if $GREP "^installed=no" $deplib > /dev/null; then
-               case $host in
-               *-*-darwin*)
-                 depdepl=
-                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-                 if test -n "$deplibrary_names" ; then
-                   for tmp in $deplibrary_names ; do
-                     depdepl=$tmp
-                   done
-                   if test -f "$absdir/$objdir/$depdepl" ; then
-                     depdepl="$absdir/$objdir/$depdepl"
-                     darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
-                      if test -z "$darwin_install_name"; then
-                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
-                      fi
-                     compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-                     linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
-                     path=
-                   fi
-                 fi
-                 ;;
-               *)
-                 path="-L$absdir/$objdir"
-                 ;;
-               esac
-               else
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-                 test -z "$libdir" && \
-                   func_fatal_error "\`$deplib' is not a valid libtool archive"
-                 test "$absdir" != "$libdir" && \
-                   func_warning "\`$deplib' seems to be moved"
-
-                 path="-L$absdir"
-               fi
-               ;;
-             esac
-             case " $deplibs " in
-             *" $path "*) ;;
-             *) deplibs="$path $deplibs" ;;
-             esac
-           done
-         fi # link_all_deplibs != no
-       fi # linkmode = lib
-      done # for deplib in $libs
-      if test "$pass" = link; then
-       if test "$linkmode" = "prog"; then
-         compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
-         finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
-       else
-         compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-       fi
-      fi
-      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"
-    fi
-    if test "$linkmode" = prog || test "$linkmode" = lib; then
-      dlprefiles="$newdlprefiles"
-    fi
-
-    case $linkmode in
-    oldlib)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       func_warning "\`-dlopen' is ignored for archives"
-      fi
-
-      case " $deplibs" in
-      *\ -l* | *\ -L*)
-       func_warning "\`-l' and \`-L' are ignored for archives" ;;
-      esac
-
-      test -n "$rpath" && \
-       func_warning "\`-rpath' is ignored for archives"
-
-      test -n "$xrpath" && \
-       func_warning "\`-R' is ignored for archives"
-
-      test -n "$vinfo" && \
-       func_warning "\`-version-info/-version-number' is ignored for archives"
-
-      test -n "$release" && \
-       func_warning "\`-release' is ignored for archives"
-
-      test -n "$export_symbols$export_symbols_regex" && \
-       func_warning "\`-export-symbols' is ignored for archives"
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-       func_stripname 'lib' '.la' "$outputname"
-       name=$func_stripname_result
-       eval shared_ext=\"$shrext_cmds\"
-       eval libname=\"$libname_spec\"
-       ;;
-      *)
-       test "$module" = no && \
-         func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
-       if test "$need_lib_prefix" != no; then
-         # Add the "lib" prefix for modules if required
-         func_stripname '' '.la' "$outputname"
-         name=$func_stripname_result
-         eval shared_ext=\"$shrext_cmds\"
-         eval libname=\"$libname_spec\"
-       else
-         func_stripname '' '.la' "$outputname"
-         libname=$func_stripname_result
-       fi
-       ;;
-      esac
-
-      if test -n "$objs"; then
-       if test "$deplibs_check_method" != pass_all; then
-         func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
-       else
-         $ECHO
-         $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
-         $ECHO "*** objects $objs is not portable!"
-         libobjs="$libobjs $objs"
-       fi
-      fi
-
-      test "$dlself" != no && \
-       func_warning "\`-dlopen self' is ignored for libtool libraries"
-
-      set dummy $rpath
-      shift
-      test "$#" -gt 1 && \
-       func_warning "ignoring multiple \`-rpath's for a libtool library"
-
-      install_libdir="$1"
-
-      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
-
-       test -n "$vinfo" && \
-         func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
-       test -n "$release" && \
-         func_warning "\`-release' is ignored for convenience libraries"
-      else
-
-       # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
-       set dummy $vinfo 0 0 0
-       shift
-       IFS="$save_ifs"
-
-       test -n "$7" && \
-         func_fatal_help "too many parameters to \`-version-info'"
-
-       # 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="$1"
-         number_minor="$2"
-         number_revision="$3"
-         #
-         # There are really only two kinds -- those that
-         # use the current revision as the major version
-         # and those that subtract age and use age as
-         # a minor version.  But, then there is irix
-         # which has an extra 1 added just for fun
-         #
-         case $version_type in
-         darwin|linux|osf|windows|none)
-           func_arith $number_major + $number_minor
-           current=$func_arith_result
-           age="$number_minor"
-           revision="$number_revision"
-           ;;
-         freebsd-aout|freebsd-elf|sunos)
-           current="$number_major"
-           revision="$number_minor"
-           age="0"
-           ;;
-         irix|nonstopux)
-           func_arith $number_major + $number_minor
-           current=$func_arith_result
-           age="$number_minor"
-           revision="$number_minor"
-           lt_irix_increment=no
-           ;;
-         *)
-           func_fatal_configuration "$modename: unknown library version type \`$version_type'"
-           ;;
-         esac
-         ;;
-       no)
-         current="$1"
-         revision="$2"
-         age="$3"
-         ;;
-       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]) ;;
-       *)
-         func_error "CURRENT \`$current' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
-         ;;
-       esac
-
-       case $revision in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         func_error "REVISION \`$revision' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
-         ;;
-       esac
-
-       case $age in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         func_error "AGE \`$age' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
-         ;;
-       esac
-
-       if test "$age" -gt "$current"; then
-         func_error "AGE \`$age' is greater than the current interface number \`$current'"
-         func_fatal_error "\`$vinfo' is not valid version information"
-       fi
-
-       # Calculate the version variables.
-       major=
-       versuffix=
-       verstring=
-       case $version_type in
-       none) ;;
-
-       darwin)
-         # Like Linux, but with the current version available in
-         # verstring for coding it into the library header
-         func_arith $current - $age
-         major=.$func_arith_result
-         versuffix="$major.$age.$revision"
-         # Darwin ld doesn't like 0 for these options...
-         func_arith $current + 1
-         minor_current=$func_arith_result
-         xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-         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
-           func_arith $current - $age
-         else
-           func_arith $current - $age + 1
-         fi
-         major=$func_arith_result
-
-         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
-           func_arith $revision - $loop
-           iface=$func_arith_result
-           func_arith $loop - 1
-           loop=$func_arith_result
-           verstring="$verstring_prefix$major.$iface:$verstring"
-         done
-
-         # Before this point, $major must not contain `.'.
-         major=.$major
-         versuffix="$major.$revision"
-         ;;
-
-       linux)
-         func_arith $current - $age
-         major=.$func_arith_result
-         versuffix="$major.$age.$revision"
-         ;;
-
-       osf)
-         func_arith $current - $age
-         major=.$func_arith_result
-         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
-           func_arith $current - $loop
-           iface=$func_arith_result
-           func_arith $loop - 1
-           loop=$func_arith_result
-           verstring="$verstring:${iface}.0"
-         done
-
-         # Make executables depend on our current version.
-         verstring="$verstring:${current}.0"
-         ;;
-
-       qnx)
-         major=".$current"
-         versuffix=".$current"
-         ;;
-
-       sunos)
-         major=".$current"
-         versuffix=".$current.$revision"
-         ;;
-
-       windows)
-         # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
-         func_arith $current - $age
-         major=$func_arith_result
-         versuffix="-$major"
-         ;;
-
-       *)
-         func_fatal_configuration "unknown library version type \`$version_type'"
-         ;;
-       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=
-         verstring=""
-       fi
-
-       # Check to see if the archive will have undefined symbols.
-       if test "$allow_undefined" = yes; then
-         if test "$allow_undefined_flag" = unsupported; then
-           func_warning "undefined symbols not allowed in $host shared libraries"
-           build_libtool_libs=no
-           build_old_libs=yes
-         fi
-       else
-         # Don't allow undefined symbols.
-         allow_undefined_flag="$no_undefined_flag"
-       fi
-
-      fi
-
-      func_generate_dlsyms "$libname" "$libname" "yes"
-      libobjs="$libobjs $symfileobj"
-      test "X$libobjs" = "X " && libobjs=
-
-      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 | *.gcno)
-              ;;
-           $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
-       test -n "$removelist" && \
-         func_show_eval "${RM}r \$removelist"
-      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 "X$lib_search_path " | $Xsed -e "s% $path % %g"`
-      #        deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
-      #        dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
-      #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* | *-cegcc*)
-           # these systems don't actually have a c library (as such)!
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C library is in the System framework
-           deplibs="$deplibs System.ltframework"
-           ;;
-         *-*-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.
-         $opt_dry_run || $RM conftest.c
-         cat > conftest.c <<EOF
-         int main() { return 0; }
-EOF
-         $opt_dry_run || $RM conftest
-         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
-           ldd_output=`ldd conftest`
-           for i in $deplibs; do
-             case $i in
-             -l*)
-               func_stripname -l '' "$i"
-               name=$func_stripname_result
-               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                 case " $predeps $postdeps " in
-                 *" $i "*)
-                   newdeplibs="$newdeplibs $i"
-                   i=""
-                   ;;
-                 esac
-               fi
-               if test -n "$i" ; then
-                 libname=`eval "\\$ECHO \"$libname_spec\""`
-                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
-                 set dummy $deplib_matches; shift
-                 deplib_match=$1
-                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                   newdeplibs="$newdeplibs $i"
-                 else
-                   droppeddeps=yes
-                   $ECHO
-                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-                   $ECHO "*** I have the capability to make that library automatically link in when"
-                   $ECHO "*** you link to this library.  But I can only do this if you have a"
-                   $ECHO "*** shared version of the library, which I believe you do not have"
-                   $ECHO "*** because a test_compile did reveal that the linker did not use it for"
-                   $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
-                 fi
-               fi
-               ;;
-             *)
-               newdeplibs="$newdeplibs $i"
-               ;;
-             esac
-           done
-         else
-           # Error occurred in the first compile.  Let's try to salvage
-           # the situation: Compile a separate program for each library.
-           for i in $deplibs; do
-             case $i in
-             -l*)
-               func_stripname -l '' "$i"
-               name=$func_stripname_result
-               $opt_dry_run || $RM conftest
-               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
-                 ldd_output=`ldd conftest`
-                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                   case " $predeps $postdeps " in
-                   *" $i "*)
-                     newdeplibs="$newdeplibs $i"
-                     i=""
-                     ;;
-                   esac
-                 fi
-                 if test -n "$i" ; then
-                   libname=`eval "\\$ECHO \"$libname_spec\""`
-                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
-                   set dummy $deplib_matches; shift
-                   deplib_match=$1
-                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                     newdeplibs="$newdeplibs $i"
-                   else
-                     droppeddeps=yes
-                     $ECHO
-                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-                     $ECHO "*** I have the capability to make that library automatically link in when"
-                     $ECHO "*** you link to this library.  But I can only do this if you have a"
-                     $ECHO "*** shared version of the library, which you do not appear to have"
-                     $ECHO "*** because a test_compile did reveal that the linker did not use this one"
-                     $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
-                   fi
-                 fi
-               else
-                 droppeddeps=yes
-                 $ECHO
-                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
-                 $ECHO "*** make it link in!  You will probably need to install it or some"
-                 $ECHO "*** library that it depends on before this library will be fully"
-                 $ECHO "*** functional.  Installing it before continuing would be even better."
-               fi
-               ;;
-             *)
-               newdeplibs="$newdeplibs $i"
-               ;;
-             esac
-           done
-         fi
-         ;;
-       file_magic*)
-         set dummy $deplibs_check_method; shift
-         file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-         for a_deplib in $deplibs; do
-           case $a_deplib in
-           -l*)
-             func_stripname -l '' "$a_deplib"
-             name=$func_stripname_result
-             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
-                     # 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 -e 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
-             ;;
-           *)
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-             ;;
-           esac
-         done # Gone through all deplibs.
-         ;;
-       match_pattern*)
-         set dummy $deplibs_check_method; shift
-         match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-         for a_deplib in $deplibs; do
-           case $a_deplib in
-           -l*)
-             func_stripname -l '' "$a_deplib"
-             name=$func_stripname_result
-             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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 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
-             ;;
-           *)
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-             ;;
-           esac
-         done # Gone through all deplibs.
-         ;;
-       none | unknown | *)
-         newdeplibs=""
-         tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
-             -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
-         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-           for i in $predeps $postdeps ; do
-             # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -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 with the System framework
-         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-         ;;
-       esac
-
-       if test "$droppeddeps" = yes; then
-         if test "$module" = yes; then
-           $ECHO
-           $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
-           $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
-      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
-      case $host in
-       *-*-darwin*)
-         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-         new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-         deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-         ;;
-      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 " $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
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-           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
-       shift
-       realname="$1"
-       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`
-       test "X$libobjs" = "X " && libobjs=
-
-       delfiles=
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
-         export_symbols="$output_objdir/$libname.uexp"
-         delfiles="$delfiles $export_symbols"
-       fi
-
-       orig_export_symbols=
-       case $host_os in
-       cygwin* | mingw* | cegcc*)
-         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
-           # exporting using user supplied symfile
-           if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
-             # and it's NOT already a .def file. Must figure out
-             # which of the given symbols are data symbols and tag
-             # them as such. So, trigger use of export_symbols_cmds.
-             # export_symbols gets reassigned inside the "prepare
-             # the list of exported symbols" if statement, so the
-             # include_expsyms logic still works.
-             orig_export_symbols="$export_symbols"
-             export_symbols=
-             always_export_symbols=yes
-           fi
-         fi
-         ;;
-       esac
-
-       # Prepare the list of exported symbols
-       if test -z "$export_symbols"; then
-         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           func_verbose "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $opt_dry_run || $RM $export_symbols
-           cmds=$export_symbols_cmds
-           save_ifs="$IFS"; IFS='~'
-           for cmd in $cmds; do
-             IFS="$save_ifs"
-             eval cmd=\"$cmd\"
-             func_len " $cmd"
-             len=$func_len_result
-             if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-               func_show_eval "$cmd" 'exit $?'
-               skipped_export=false
-             else
-               # The command line is too long to execute in one step.
-               func_verbose "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" && test "X$skipped_export" != "X:"; then
-             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-       fi
-
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         tmp_export_symbols="$export_symbols"
-         test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-         $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
-       fi
-
-       if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
-         # The given exports_symbols file has to be filtered, so filter it.
-         func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
-         # FIXME: $output_objdir/$libname.filter potentially contains lots of
-         # 's' commands which not all seds can handle. GNU sed should be fine
-         # though. Also, the filter scales superlinearly with the number of
-         # global variables. join(1) would be nice here, but unfortunately
-         # isn't a blessed tool.
-         $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-         delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
-         export_symbols=$output_objdir/$libname.def
-         $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $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" &&
-           test "$compiler_needs_object" = yes &&
-           test -z "$libobjs"; then
-           # extract the archives, so we have objects to list.
-           # TODO: could optimize this to just extract one archive.
-           whole_archive_flag_spec=
-         fi
-         if test -n "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-           test "X$libobjs" = "X " && libobjs=
-         else
-           gentop="$output_objdir/${outputname}x"
-           generated="$generated $gentop"
-
-           func_extract_archives $gentop $convenience
-           libobjs="$libobjs $func_extract_archives_result"
-           test "X$libobjs" = "X " && libobjs=
-         fi
-       fi
-
-       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-         eval flag=\"$thread_safe_flag_spec\"
-         linker_flags="$linker_flags $flag"
-       fi
-
-       # Make a backup of the uninstalled library when relinking
-       if test "$mode" = relink; then
-         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
-       fi
-
-       # Do each of the archive commands.
-       if test "$module" = yes && test -n "$module_cmds" ; then
-         if test -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:" &&
-          func_len " $test_cmds" &&
-          len=$func_len_result &&
-          test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         :
-       else
-         # The command line is too long to link in one step, link piecewise
-         # or, if using GNU ld and skipped_export is not :, use a linker
-         # script.
-
-         # 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=
-         last_robj=
-         k=1
-
-         if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
-           output=${output_objdir}/${output_la}.lnkscript
-           func_verbose "creating GNU ld script: $output"
-           $ECHO 'INPUT (' > $output
-           for obj in $save_libobjs
-           do
-             $ECHO "$obj" >> $output
-           done
-           $ECHO ')' >> $output
-           delfiles="$delfiles $output"
-         elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
-           output=${output_objdir}/${output_la}.lnk
-           func_verbose "creating linker input file list: $output"
-           : > $output
-           set x $save_libobjs
-           shift
-           firstobj=
-           if test "$compiler_needs_object" = yes; then
-             firstobj="$1 "
-             shift
-           fi
-           for obj
-           do
-             $ECHO "$obj" >> $output
-           done
-           delfiles="$delfiles $output"
-           output=$firstobj\"$file_list_spec$output\"
-         else
-           if test -n "$save_libobjs"; then
-             func_verbose "creating reloadable object files..."
-             output=$output_objdir/$output_la-${k}.$objext
-             eval test_cmds=\"$reload_cmds\"
-             func_len " $test_cmds"
-             len0=$func_len_result
-             len=$len0
-
-             # Loop over the list of objects to be linked.
-             for obj in $save_libobjs
-             do
-               func_len " $obj"
-               func_arith $len + $func_len_result
-               len=$func_arith_result
-               if test "X$objlist" = X ||
-                  test "$len" -lt "$max_cmd_len"; then
-                 func_append objlist " $obj"
-               else
-                 # The command $test_cmds is almost too long, add a
-                 # command to the queue.
-                 if test "$k" -eq 1 ; then
-                   # 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~\$RM $last_robj\"
-                 fi
-                 last_robj=$output_objdir/$output_la-${k}.$objext
-                 func_arith $k + 1
-                 k=$func_arith_result
-                 output=$output_objdir/$output_la-${k}.$objext
-                 objlist=$obj
-                 func_len " $last_robj"
-                 func_arith $len0 + $func_len_result
-                 len=$func_arith_result
-               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 test -n "$last_robj"; then
-               eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
-             fi
-             delfiles="$delfiles $output"
-
-           else
-             output=
-           fi
-
-           if ${skipped_export-false}; then
-             func_verbose "generating symbol list for \`$libname.la'"
-             export_symbols="$output_objdir/$libname.exp"
-             $opt_dry_run || $RM $export_symbols
-             libobjs=$output
-             # Append the command to create the export file.
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
-             if test -n "$last_robj"; then
-               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
-             fi
-           fi
-
-           test -n "$save_libobjs" &&
-             func_verbose "creating a temporary reloadable object file: $output"
-
-           # Loop through the commands generated above and execute them.
-           save_ifs="$IFS"; IFS='~'
-           for cmd in $concat_cmds; do
-             IFS="$save_ifs"
-             $opt_silent || {
-                 func_quote_for_expand "$cmd"
-                 eval "func_echo $func_quote_for_expand_result"
-             }
-             $opt_dry_run || eval "$cmd" || {
-               lt_exit=$?
-
-               # Restore the uninstalled library and exit
-               if test "$mode" = relink; then
-                 ( cd "$output_objdir" && \
-                   $RM "${realname}T" && \
-                   $MV "${realname}U" "$realname" )
-               fi
-
-               exit $lt_exit
-             }
-           done
-           IFS="$save_ifs"
-
-           if test -n "$export_symbols_regex" && ${skipped_export-false}; then
-             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-
-          if ${skipped_export-false}; then
-           if test -n "$export_symbols" && test -n "$include_expsyms"; then
-             tmp_export_symbols="$export_symbols"
-             test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-             $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
-           fi
-
-           if test -n "$orig_export_symbols"; then
-             # The given exports_symbols file has to be filtered, so filter it.
-             func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
-             # FIXME: $output_objdir/$libname.filter potentially contains lots of
-             # 's' commands which not all seds can handle. GNU sed should be fine
-             # though. Also, the filter scales superlinearly with the number of
-             # global variables. join(1) would be nice here, but unfortunately
-             # isn't a blessed tool.
-             $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-             delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
-             export_symbols=$output_objdir/$libname.def
-             $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
-           fi
-         fi
-
-         libobjs=$output
-         # Restore the value of output.
-         output=$save_output
-
-         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-           test "X$libobjs" = "X " && libobjs=
-         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
-       fi
-
-       if test -n "$delfiles"; then
-         # Append the command to remove temporary files to $cmds.
-         eval cmds=\"\$cmds~\$RM $delfiles\"
-       fi
-
-       # Add any objects from preloaded convenience libraries
-       if test -n "$dlprefiles"; then
-         gentop="$output_objdir/${outputname}x"
-         generated="$generated $gentop"
-
-         func_extract_archives $gentop $dlprefiles
-         libobjs="$libobjs $func_extract_archives_result"
-         test "X$libobjs" = "X " && libobjs=
-       fi
-
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $opt_silent || {
-           func_quote_for_expand "$cmd"
-           eval "func_echo $func_quote_for_expand_result"
-         }
-         $opt_dry_run || eval "$cmd" || {
-           lt_exit=$?
-
-           # Restore the uninstalled library and exit
-           if test "$mode" = relink; then
-             ( 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
-         $opt_dry_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
-             func_show_eval '${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
-           func_show_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 "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       func_warning "\`-dlopen' is ignored for objects"
-      fi
-
-      case " $deplibs" in
-      *\ -l* | *\ -L*)
-       func_warning "\`-l' and \`-L' are ignored for objects" ;;
-      esac
-
-      test -n "$rpath" && \
-       func_warning "\`-rpath' is ignored for objects"
-
-      test -n "$xrpath" && \
-       func_warning "\`-R' is ignored for objects"
-
-      test -n "$vinfo" && \
-       func_warning "\`-version-info' is ignored for objects"
-
-      test -n "$release" && \
-       func_warning "\`-release' is ignored for objects"
-
-      case $output in
-      *.lo)
-       test -n "$objs$old_deplibs" && \
-         func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
-       libobj=$output
-       func_lo2o "$libobj"
-       obj=$func_lo2o_result
-       ;;
-      *)
-       libobj=
-       obj="$output"
-       ;;
-      esac
-
-      # Delete the old objects.
-      $opt_dry_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"
-      func_execute_cmds "$reload_cmds" 'exit $?'
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-       if test -n "$gentop"; then
-         func_show_eval '${RM}r "$gentop"'
-       fi
-
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-       if test -n "$gentop"; then
-         func_show_eval '${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"
-       # $opt_dry_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"
-       func_execute_cmds "$reload_cmds" 'exit $?'
-      fi
-
-      if test -n "$gentop"; then
-       func_show_eval '${RM}r "$gentop"'
-      fi
-
-      exit $EXIT_SUCCESS
-      ;;
-
-    prog)
-      case $host in
-       *cygwin*) func_stripname '' '.exe' "$output"
-                 output=$func_stripname_result.exe;;
-      esac
-      test -n "$vinfo" && \
-       func_warning "\`-version-info' is ignored for programs"
-
-      test -n "$release" && \
-       func_warning "\`-release' is ignored for programs"
-
-      test "$preload" = yes \
-        && test "$dlopen_support" = unknown \
-       && test "$dlopen_self" = unknown \
-       && test "$dlopen_self_static" = unknown && \
-         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-       # On Rhapsody replace the C library is the System framework
-       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-       ;;
-      esac
-
-      case $host in
-      *-*-darwin*)
-       # Don't allow lazy linking, it breaks C++ global constructors
-       # But is supposedly fixed on 10.4 or later (yay!).
-       if test "$tagname" = CXX ; then
-         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
-           10.[0123])
-             compile_command="$compile_command ${wl}-bind_at_load"
-             finalize_command="$finalize_command ${wl}-bind_at_load"
-           ;;
-         esac
-       fi
-       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
-       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-       ;;
-      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* | *-cegcc*)
-         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$libdir:"*) ;;
-         ::) dllsearchpath=$libdir;;
-         *) dllsearchpath="$dllsearchpath:$libdir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         ::) dllsearchpath=$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
-
-      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
-      # template prelinking step
-      if test -n "$prelink_cmds"; then
-       func_execute_cmds "$prelink_cmds" 'exit $?'
-      fi
-
-      wrappers_required=yes
-      case $host in
-      *cygwin* | *mingw* )
-        if test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
-        ;;
-      *cegcc)
-        # Disable wrappers for cegcc, we are cross compiling anyway.
-        wrappers_required=no
-        ;;
-      *)
-        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
-        ;;
-      esac
-      if test "$wrappers_required" = no; then
-       # Replace the output file specification.
-       compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-       link_command="$compile_command$compile_rpath"
-
-       # We have no uninstalled library dependencies, so finalize right now.
-       exit_status=0
-       func_show_eval "$link_command" 'exit_status=$?'
-
-       # Delete the generated files.
-       if test -f "$output_objdir/${outputname}S.${objext}"; then
-         func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
-       fi
-
-       exit $exit_status
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      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.
-       $opt_dry_run || $RM $output
-       # Link the executable and exit
-       func_show_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"
-
-       func_warning "this platform does not like uninstalled shared libraries"
-       func_warning "\`$output' will be relinked during installation"
-      else
-       if test "$fast_install" != no; then
-         link_command="$finalize_var$compile_command$finalize_rpath"
-         if test "$fast_install" = yes; then
-           relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-         else
-           # fast_install is set to needless
-           relink_command=
-         fi
-       else
-         link_command="$compile_var$compile_command$compile_rpath"
-         relink_command="$finalize_var$finalize_command$finalize_rpath"
-       fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
-      # Delete the old output files.
-      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      func_show_eval "$link_command" 'exit $?'
-
-      # Now create the wrapper script.
-      func_verbose "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}\" || $lt_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
-           func_quote_for_eval "$var_value"
-           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
-         fi
-       done
-       relink_command="(cd `pwd`; $relink_command)"
-       relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $ECHO for shipping.
-      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
-       case $progpath in
-       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-       esac
-       qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-       qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if not in dry run mode.
-      $opt_dry_run || {
-       # win32 will think the script is a binary if it has
-       # a .exe suffix, so we strip it off here.
-       case $output in
-         *.exe) func_stripname '' '.exe' "$output"
-                output=$func_stripname_result ;;
-       esac
-       # test for cygwin because mv fails w/o .exe extensions
-       case $host in
-         *cygwin*)
-           exeext=.exe
-           func_stripname '' '.exe' "$outputname"
-           outputname=$func_stripname_result ;;
-         *) exeext= ;;
-       esac
-       case $host in
-         *cygwin* | *mingw* )
-           func_dirname_and_basename "$output" "" "."
-           output_name=$func_basename_result
-           output_path=$func_dirname_result
-           cwrappersource="$output_path/$objdir/lt-$output_name.c"
-           cwrapper="$output_path/$output_name.exe"
-           $RM $cwrappersource $cwrapper
-           trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
-           func_emit_cwrapperexe_src > $cwrappersource
-
-           # The wrapper executable is built using the $host compiler,
-           # because it contains $host paths and files. If cross-
-           # compiling, it, like the target executable, must be
-           # executed on the $host or under an emulation environment.
-           $opt_dry_run || {
-             $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
-             $STRIP $cwrapper
-           }
-
-           # Now, create the wrapper script for func_source use:
-           func_ltwrapper_scriptname $cwrapper
-           $RM $func_ltwrapper_scriptname_result
-           trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
-           $opt_dry_run || {
-             # note: this script will not be executed, so do not chmod.
-             if test "x$build" = "x$host" ; then
-               $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
-             else
-               func_emit_wrapper no > $func_ltwrapper_scriptname_result
-             fi
-           }
-         ;;
-         * )
-           $RM $output
-           trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
-           func_emit_wrapper no > $output
-           chmod +x $output
-         ;;
-       esac
-      }
-      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 $symfileobj"
-       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"
-         if test "$preload" = yes && test -f "$symfileobj"; then
-           oldobjs="$oldobjs $symfileobj"
-         fi
-       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
-
-       # Add any objects from preloaded convenience libraries
-       if test -n "$dlprefiles"; then
-         gentop="$output_objdir/${outputname}x"
-         generated="$generated $gentop"
-
-         func_extract_archives $gentop $dlprefiles
-         oldobjs="$oldobjs $func_extract_archives_result"
-       fi
-
-       # 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
-             func_basename "$obj"
-             $ECHO "$func_basename_result"
-           done | sort | sort -uc >/dev/null 2>&1); then
-         :
-       else
-         $ECHO "copying selected object files to avoid basename conflicts..."
-         gentop="$output_objdir/${outputname}x"
-         generated="$generated $gentop"
-         func_mkdir_p "$gentop"
-         save_oldobjs=$oldobjs
-         oldobjs=
-         counter=1
-         for obj in $save_oldobjs
-         do
-           func_basename "$obj"
-           objbase="$func_basename_result"
-           case " $oldobjs " in
-           " ") oldobjs=$obj ;;
-           *[\ /]"$objbase "*)
-             while :; do
-               # Make sure we don't pick an alternate name that also
-               # overlaps.
-               newobj=lt$counter-$objbase
-               func_arith $counter + 1
-               counter=$func_arith_result
-               case " $oldobjs " in
-               *[\ /]"$newobj "*) ;;
-               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
-               esac
-             done
-             func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-             oldobjs="$oldobjs $gentop/$newobj"
-             ;;
-           *) oldobjs="$oldobjs $obj" ;;
-           esac
-         done
-       fi
-       eval cmds=\"$old_archive_cmds\"
-
-       func_len " $cmds"
-       len=$func_len_result
-       if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         cmds=$old_archive_cmds
-       else
-         # the command line is too long to link in one step, link in parts
-         func_verbose "using piecewise archive linking..."
-         save_RANLIB=$RANLIB
-         RANLIB=:
-         objlist=
-         concat_cmds=
-         save_oldobjs=$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
-         eval test_cmds=\"$old_archive_cmds\"
-         func_len " $test_cmds"
-         len0=$func_len_result
-         len=$len0
-         for obj in $save_oldobjs
-         do
-           func_len " $obj"
-           func_arith $len + $func_len_result
-           len=$func_arith_result
-           func_append objlist " $obj"
-           if test "$len" -lt "$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=
-             len=$len0
-           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
-      func_execute_cmds "$cmds" 'exit $?'
-    done
-
-    test -n "$generated" && \
-      func_show_eval "${RM}r$generated"
-
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      func_verbose "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}\" || $lt_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
-         func_quote_for_eval "$var_value"
-         relink_command="$var=$func_quote_for_eval_result; 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" | $Xsed -e "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
-       relink_command=
-      fi
-
-      # Only create the output if not a dry run.
-      $opt_dry_run || {
-       for installed in no yes; do
-         if test "$installed" = yes; then
-           if test -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)
-               func_basename "$deplib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-               test -z "$libdir" && \
-                 func_fatal_error "\`$deplib' is not a valid libtool archive"
-               newdependency_libs="$newdependency_libs $libdir/$name"
-               ;;
-             *) newdependency_libs="$newdependency_libs $deplib" ;;
-             esac
-           done
-           dependency_libs="$newdependency_libs"
-           newdlfiles=
-
-           for lib in $dlfiles; do
-             case $lib in
-             *.la)
-               func_basename "$lib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-               test -z "$libdir" && \
-                 func_fatal_error "\`$lib' is not a valid libtool archive"
-               newdlfiles="$newdlfiles $libdir/$name"
-               ;;
-             *) newdlfiles="$newdlfiles $lib" ;;
-             esac
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             case $lib in
-             *.la)
-               # Only pass preopened files to the pseudo-archive (for
-               # eventual linking with the app. that links it) if we
-               # didn't already link the preopened objects directly into
-               # the library:
-               func_basename "$lib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-               test -z "$libdir" && \
-                 func_fatal_error "\`$lib' is not a valid libtool archive"
-               newdlprefiles="$newdlprefiles $libdir/$name"
-               ;;
-             esac
-           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 | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-         esac
-         $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# 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'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_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
-      }
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-}
-
-{ test "$mode" = link || test "$mode" = relink; } &&
-    func_mode_link ${1+"$@"}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
-    $opt_debug
-    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
-
-    test -z "$RM" && \
-      func_fatal_help "you must specify an RM program"
-
-    rmdirs=
-
-    origobjdir="$objdir"
-    for file in $files; do
-      func_dirname "$file" "" "."
-      dir="$func_dirname_result"
-      if test "X$dir" = X.; then
-       objdir="$origobjdir"
-      else
-       objdir="$dir/$origobjdir"
-      fi
-      func_basename "$file"
-      name="$func_basename_result"
-      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 func_lalib_p "$file"; then
-         func_source $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.
-             func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
-           fi
-
-           if test -n "$old_library"; then
-             # Do each command in the old_postuninstall commands.
-             func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
-           fi
-           # FIXME: should reinstall the best remaining shared library.
-           ;;
-         esac
-       fi
-       ;;
-
-      *.lo)
-       # Possibly a libtool object, so verify it.
-       if func_lalib_p "$file"; then
-
-         # Read the .lo file
-         func_source $dir/$name
-
-         # Add PIC object to the list of files to remove.
-         if test -n "$pic_object" &&
-            test "$pic_object" != none; then
-           rmfiles="$rmfiles $dir/$pic_object"
-         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)
-           func_stripname '' '.exe' "$file"
-           file=$func_stripname_result
-           func_stripname '' '.exe' "$name"
-           noexename=$func_stripname_result
-           # $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 func_ltwrapper_p "$file"; then
-           if func_ltwrapper_executable_p "$file"; then
-             func_ltwrapper_scriptname "$file"
-             relink_command=
-             func_source $func_ltwrapper_scriptname_result
-             rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
-           else
-             relink_command=
-             func_source $dir/$noexename
-           fi
-
-           # 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
-      func_show_eval "$RM $rmfiles" 'exit_status=1'
-    done
-    objdir="$origobjdir"
-
-    # Try to remove the ${objdir}s in the directories where we deleted files
-    for dir in $rmdirs; do
-      if test -d "$dir"; then
-       func_show_eval "rmdir $dir >/dev/null 2>&1"
-      fi
-    done
-
-    exit $exit_status
-}
-
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
-    func_mode_uninstall ${1+"$@"}
-
-test -z "$mode" && {
-  help="$generic_help"
-  func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$mode'"
-
-if test -n "$exec_cmd"; then
-  eval exec "$exec_cmd"
-  exit $EXIT_FAILURE
-fi
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
-# 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
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# vi:sw=2
-
diff --git a/build-aux/missing b/build-aux/missing
deleted file mode 100755 (executable)
index 1c8ff70..0000000
+++ /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 <pinard@iro.umontreal.ca>, 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 <bug-automake@gnu.org>."
-    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:
index 0d84bf6..9aa76f0 100644 (file)
@@ -5,7 +5,9 @@ includedir=@includedir@
 
 Name: Check
 Description: A unit test framework for C
-URL: http://check.sourceforge.net
+URL: https://libcheck.github.io/check/
 Version: @VERSION@
+Requires.private: @LIBSUBUNIT_PC@
 Libs: -L${libdir} -lcheck
-Cflags: -I${includedir}
+Libs.private: @GCOV_LIBS@ @PTHREAD_LIBS@ @LIBS@
+Cflags: -I${includedir} @PTHREAD_CFLAGS@
diff --git a/check_stdint.h b/check_stdint.h
new file mode 100644 (file)
index 0000000..fc600c3
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef _CHECK_CHECK_STDINT_H
+#define _CHECK_CHECK_STDINT_H 1
+#ifndef _GENERATED_STDINT_H
+#define _GENERATED_STDINT_H "check 0.12.0"
+/* generated using gnu compiler gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 */
+#define _STDINT_HAVE_STDINT_H 1
+#include <stdint.h>
+#endif
+#endif
diff --git a/checkmk/Makefile.am b/checkmk/Makefile.am
new file mode 100644 (file)
index 0000000..8a3aba9
--- /dev/null
@@ -0,0 +1,14 @@
+if INSTALL_CHECKMK
+bin_SCRIPTS = checkmk
+TESTS = test/check_checkmk
+endif
+EXTRA_DIST = test examples doc/checkmk.1
+CONFIG_STATUS_DEPENDENCIES = checkmk.in
+
+man_MANS = doc/checkmk.1
+
+clean-local:
+       rm -rf test.out
+
+dist-hook:
+       rm -rf `find $(distdir)/ -name '.svn'`
diff --git a/checkmk/Makefile.in b/checkmk/Makefile.in
new file mode 100644 (file)
index 0000000..47bb77a
--- /dev/null
@@ -0,0 +1,961 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 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@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@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@
+subdir = checkmk
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+       $(top_srcdir)/m4/ax_c_check_flag.m4 \
+       $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+       $(top_srcdir)/m4/librt_timers.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = checkmk
+CONFIG_CLEAN_VPATH_FILES =
+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 = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+SCRIPTS = $(bin_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = { \
+  $(am__tty_colors_dummy); \
+  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+    am__color_tests=no; \
+  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+    am__color_tests=yes; \
+  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+    am__color_tests=yes; \
+  fi; \
+  if test $$am__color_tests = yes; then \
+    red='\e[0;31m'; \
+    grn='\e[0;32m'; \
+    lgn='\e[1;32m'; \
+    blu='\e[1;34m'; \
+    mgn='\e[0;35m'; \
+    brg='\e[1m'; \
+    std='\e[m'; \
+  fi; \
+}
+am__recheck_rx = ^[    ]*:recheck:[    ]*
+am__global_test_result_rx = ^[         ]*:global-test-result:[         ]*
+am__copy_in_global_log_rx = ^[         ]*:copy-in-global-log:[         ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+          if ((getline line2 < ($$0 ".log")) < 0) \
+           recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+          break; \
+        } \
+    }; \
+  if (recheck) \
+    print $$0; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+  print "fatal: making $@: " msg | "cat >&2"; \
+  exit 1; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+{ \
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+         fatal("failed to read from " $$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[       ]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          fatal("failed to read from " $$0 ".log"); \
+        print line; \
+      }; \
+      printf "\n"; \
+    }; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+  --color-tests "$$am__color_tests" \
+  --enable-hard-errors "$$am__enable_hard_errors" \
+  --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test.  Creates the
+# directory for the log if needed.  Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup);                                     \
+$(am__vpath_adj_setup) $(am__vpath_adj)                        \
+$(am__tty_colors);                                     \
+srcdir=$(srcdir); export srcdir;                       \
+case "$@" in                                           \
+  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;   \
+    *) am__odir=.;;                                    \
+esac;                                                  \
+test "x$$am__odir" = x"." || test -d "$$am__odir"      \
+  || $(MKDIR_P) "$$am__odir" || exit $$?;              \
+if test -f "./$$f"; then dir=./;                       \
+elif test -f "$$f"; then dir=;                         \
+else dir="$(srcdir)/"; fi;                             \
+tst=$$dir$$f; log='$@';                                \
+if test -n '$(DISABLE_HARD_ERRORS)'; then              \
+  am__enable_hard_errors=no;                           \
+else                                                   \
+  am__enable_hard_errors=yes;                          \
+fi;                                                    \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    am__expect_failure=yes;;                           \
+  *)                                                   \
+    am__expect_failure=no;;                            \
+esac;                                                  \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed).  The result is saved in the shell variable
+# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+  bases='$(TEST_LOGS)'; \
+  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+  bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+       $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/checkmk.in \
+       $(top_srcdir)/test-driver README
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AWK_GSUB_DBL_BSLASH = @AWK_GSUB_DBL_BSLASH@
+AWK_PATH = @AWK_PATH@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_MAJOR_VERSION = @CHECK_MAJOR_VERSION@
+CHECK_MICRO_VERSION = @CHECK_MICRO_VERSION@
+CHECK_MINOR_VERSION = @CHECK_MINOR_VERSION@
+CHECK_VERSION = @CHECK_VERSION@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_REGEX = @ENABLE_REGEX@
+ENABLE_SUBUNIT = @ENABLE_SUBUNIT@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FILTERDIFF = @FILTERDIFF@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LIBS = @GCOV_LIBS@
+GENHTML = @GENHTML@
+GREP = @GREP@
+HAVE_FORK = @HAVE_FORK@
+HAVE_REGEX = @HAVE_REGEX@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSUBUNIT_CFLAGS = @LIBSUBUNIT_CFLAGS@
+LIBSUBUNIT_LIBS = @LIBSUBUNIT_LIBS@
+LIBSUBUNIT_PC = @LIBSUBUNIT_PC@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TEX = @TEX@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+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@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@INSTALL_CHECKMK_TRUE@bin_SCRIPTS = checkmk
+@INSTALL_CHECKMK_TRUE@TESTS = test/check_checkmk
+EXTRA_DIST = test examples doc/checkmk.1
+CONFIG_STATUS_DEPENDENCIES = checkmk.in
+man_MANS = doc/checkmk.1
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .log .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits checkmk/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits checkmk/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+checkmk: $(top_builddir)/config.status $(srcdir)/checkmk.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+            } \
+       ; done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+
+installcheck-binSCRIPTS: $(bin_SCRIPTS)
+       bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \
+         case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+          *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+         esac; \
+         f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
+         for opt in --help --version; do \
+           if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+                2>c$${pid}_.err </dev/null \
+                && test -n "`cat c$${pid}_.out`" \
+                && test -z "`cat c$${pid}_.err`"; then :; \
+           else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+         done; \
+       done; rm -f c$${pid}_.???; exit $$bad
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-man1: $(man_MANS)
+       @$(NORMAL_INSTALL)
+       @list1=''; \
+       list2='$(man_MANS)'; \
+       test -n "$(man1dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.1[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
+       done; \
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
+uninstall-man1:
+       @$(NORMAL_UNINSTALL)
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+       rm -f $< $@
+       $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+       @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+       @$(am__set_TESTS_bases); \
+       am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+       redo_bases=`for i in $$bases; do \
+                     am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+                   done`; \
+       if test -n "$$redo_bases"; then \
+         redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+         redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+         if $(am__make_dryrun); then :; else \
+           rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+         fi; \
+       fi; \
+       if test -n "$$am__remaking_logs"; then \
+         echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+              "recursion detected" >&2; \
+       elif test -n "$$redo_logs"; then \
+         am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+       fi; \
+       if $(am__make_dryrun); then :; else \
+         st=0;  \
+         errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+         for i in $$redo_bases; do \
+           test -f $$i.trs && test -r $$i.trs \
+             || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+           test -f $$i.log && test -r $$i.log \
+             || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+         done; \
+         test $$st -eq 0 || exit 1; \
+       fi
+       @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+       ws='[   ]'; \
+       results=`for b in $$bases; do echo $$b.trs; done`; \
+       test -n "$$results" || results=/dev/null; \
+       all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+       pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+       fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+       skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+       xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+       xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+       error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+       if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+         success=true; \
+       else \
+         success=false; \
+       fi; \
+       br='==================='; br=$$br$$br$$br$$br; \
+       result_count () \
+       { \
+           if test x"$$1" = x"--maybe-color"; then \
+             maybe_colorize=yes; \
+           elif test x"$$1" = x"--no-color"; then \
+             maybe_colorize=no; \
+           else \
+             echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+           fi; \
+           shift; \
+           desc=$$1 count=$$2; \
+           if test $$maybe_colorize = yes && test $$count -gt 0; then \
+             color_start=$$3 color_end=$$std; \
+           else \
+             color_start= color_end=; \
+           fi; \
+           echo "$${color_start}# $$desc $$count$${color_end}"; \
+       }; \
+       create_testsuite_report () \
+       { \
+         result_count $$1 "TOTAL:" $$all   "$$brg"; \
+         result_count $$1 "PASS: " $$pass  "$$grn"; \
+         result_count $$1 "SKIP: " $$skip  "$$blu"; \
+         result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+         result_count $$1 "FAIL: " $$fail  "$$red"; \
+         result_count $$1 "XPASS:" $$xpass "$$red"; \
+         result_count $$1 "ERROR:" $$error "$$mgn"; \
+       }; \
+       {                                                               \
+         echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |       \
+           $(am__rst_title);                                           \
+         create_testsuite_report --no-color;                           \
+         echo;                                                         \
+         echo ".. contents:: :depth: 2";                               \
+         echo;                                                         \
+         for b in $$bases; do echo $$b; done                           \
+           | $(am__create_global_log);                                 \
+       } >$(TEST_SUITE_LOG).tmp || exit 1;                             \
+       mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
+       if $$success; then                                              \
+         col="$$grn";                                                  \
+        else                                                           \
+         col="$$red";                                                  \
+         test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);               \
+       fi;                                                             \
+       echo "$${col}$$br$${std}";                                      \
+       echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
+       echo "$${col}$$br$${std}";                                      \
+       create_testsuite_report --maybe-color;                          \
+       echo "$$col$$br$$std";                                          \
+       if $$success; then :; else                                      \
+         echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";         \
+         if test -n "$(PACKAGE_BUGREPORT)"; then                       \
+           echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+         fi;                                                           \
+         echo "$$col$$br$$std";                                        \
+       fi;                                                             \
+       $$success || exit 1
+
+check-TESTS:
+       @list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+       @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set +e; $(am__set_TESTS_bases); \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+       log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+       exit $$?;
+recheck: all 
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set +e; $(am__set_TESTS_bases); \
+       bases=`for i in $$bases; do echo $$i; done \
+                | $(am__list_recheck_tests)` || exit 1; \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       log_list=`echo $$log_list`; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+               am__force_recheck=am--force-recheck \
+               TEST_LOGS="$$log_list"; \
+       exit $$?
+test/check_checkmk.log: test/check_checkmk
+       @p='test/check_checkmk'; \
+       b='test/check_checkmk'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+       @p='$<'; \
+       $(am__set_b); \
+       $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@      @p='$<'; \
+@am__EXEEXT_TRUE@      $(am__set_b); \
+@am__EXEEXT_TRUE@      $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@      --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@      $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@      "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+       @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 "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$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
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS)
+installdirs:
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: 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:
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
+mostlyclean-generic:
+       -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+       -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+       -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-binSCRIPTS
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am check check-TESTS check-am clean clean-generic \
+       clean-libtool clean-local cscopelist-am ctags-am dist-hook \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binSCRIPTS install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man1 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installcheck-binSCRIPTS installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \
+       uninstall uninstall-am uninstall-binSCRIPTS uninstall-man \
+       uninstall-man1
+
+.PRECIOUS: Makefile
+
+
+clean-local:
+       rm -rf test.out
+
+dist-hook:
+       rm -rf `find $(distdir)/ -name '.svn'`
+
+# 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/checkmk/README b/checkmk/README
new file mode 100644 (file)
index 0000000..1bde91c
--- /dev/null
@@ -0,0 +1,17 @@
+=======
+checkmk
+=======
+
+Written by Micah J Cowan.
+
+Translates concise versions of test suites into C programs
+suitable suitable for use with the Check unit test framework.
+
+See the source code in checkmk.in (checkmk when installed) for terms of
+distribution (scaled-down version of the modified BSD license).
+
+To see how it works, try running checkmk on the example files,
+basic_complete.ts and multiple_everything.ts:
+  checkmk basic_complete.ts > basic_complete.c
+  cc -o basic basic_complete.c -lcheck
+  ./basic
diff --git a/checkmk/checkmk.in b/checkmk/checkmk.in
new file mode 100644 (file)
index 0000000..2100274
--- /dev/null
@@ -0,0 +1,574 @@
+#! @AWK_PATH@ -f
+# @configure_input@
+
+# checkmk - translate more concise versions of test suite specifications
+#           into C programs suitable for use with the Check unit test
+#           framework.
+
+# -- LICENSE --
+#
+# Written by Micah Cowan <micah@cowan.name>
+# Copyright (c) 2006, 2010  Micah Cowan
+#
+# Redistribution of this program in any form, with or without
+# modifications, is permitted, provided that the above copyright is
+# retained in distributions of this program in source form.
+#
+# (This is a free, non-copyleft license compatible with pretty much any
+# other free or proprietary license, including the GPL. It's essentially
+# a scaled-down version of the "modified" BSD license.)
+
+BEGIN {
+    progname="checkmk";
+    is_stdin=0;
+    outfname="/dev/stdout";
+
+    # Tokens
+    pp_ws            = "[ \\t\\f\\v\\r\\n]+";
+    pp_ws_op         = "[ \\t\\f\\v\\r\\n]*";
+    pp_digit         = "[0-9]+"
+    pp_prefix        = pp_ws_op "#" pp_ws_op;
+    pp_sep           = "[ \\t\\f\\v\\r\\n]+";
+    pp_name          = ".+";
+    pp_hex_quad      = "[A-F0-9a-f][A-F0-9a-f][A-F0-9a-f][A-F0-9a-f]"
+    pp_ucn           = "\\\\(u" pp_hex_quad "|U" pp_hex_quad pp_hex_quad ")";
+    pp_test_name     = "([A-Za-z_]|" pp_ucn ")([A-Za-z0-9_]|" pp_ucn ")*";
+    pp_tag           = "([Ss][Uu][Ii][Tt][Ee]|[Tt][Cc][Aa][Ss][Ee])";
+    pp_test_tag      = "[Tt][Ee][Ss][Tt]";
+    pp_main_pre_tag  = "[Mm][Aa][Ii][Nn]-[Pp][Rr][Ee]";
+    pp_main_post_tag = "[Mm][Aa][Ii][Nn]-[Pp][Oo][Ss][Tt]";
+
+    # Tests with arguments
+    pp_test_exit_tag = "[Tt][Ee][Ss][Tt]-[Ee][Xx][Ii][Tt]" pp_ws_op "[(]" \
+        pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op "[)]";
+
+    pp_test_signal_tag = "[Tt][Ee][Ss][Tt]-[Ss][Ii][Gg][Nn][Aa][Ll]" pp_ws_op \
+        "[(]" pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op "[)]";
+
+    pp_test_loop_tag = "[Tt][Ee][Ss][Tt]-[Ll][Oo][Oo][Pp]" pp_ws_op "[(]" \
+        pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op "[,]" pp_ws_op \
+        "[+-]?" pp_ws_op pp_digit pp_ws_op "[)]";
+
+    pp_test_loop_exit_tag = "[Tt][Ee][Ss][Tt]-[Ll][Oo][Oo][Pp]-[Ee][Xx][Ii][Tt]" \
+        pp_ws_op "[(]" pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op \
+        "[,]" pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op "[,]" \
+        pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op "[)]";
+
+    pp_test_loop_signal_tag = "[Tt][Ee][Ss][Tt]-[Ll][Oo][Oo][Pp]-[Ss][Ii][Gg]" \
+        "[Nn][Aa][Ll]" pp_ws_op "[(]" pp_ws_op "[+-]?" pp_ws_op pp_digit \
+        pp_ws_op "[,]" pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op \
+        "[,]" pp_ws_op "[+-]?" pp_ws_op pp_digit pp_ws_op "[)]";
+
+    pp_suite_or_tcase_line = "^" pp_prefix pp_tag pp_ws pp_name "$";
+    pp_test_line_prefix = "^" pp_prefix pp_test_tag pp_ws;
+    pp_test_exit_line_prefix = "^" pp_prefix pp_test_exit_tag pp_ws;
+    pp_test_signal_line_prefix = "^" pp_prefix pp_test_signal_tag pp_ws;
+    pp_test_loop_line_prefix = "^" pp_prefix pp_test_loop_tag pp_ws;
+    pp_test_loop_exit_line_prefix = "^" pp_prefix pp_test_loop_exit_tag pp_ws;
+    pp_test_loop_signal_line_prefix = "^" pp_prefix pp_test_loop_signal_tag pp_ws;
+    pp_test_line = pp_test_line_prefix pp_name pp_ws_op "$";
+    pp_test_exit_line = pp_test_exit_line_prefix pp_name pp_ws_op "$";
+    pp_test_signal_line = pp_test_signal_line_prefix pp_name pp_ws_op "$";
+    pp_test_loop_line = pp_test_loop_line_prefix pp_name pp_ws_op "$";
+    pp_test_loop_exit_line = pp_test_loop_exit_line_prefix pp_name pp_ws_op "$";
+    pp_test_loop_signal_line = pp_test_loop_signal_line_prefix pp_name pp_ws_op "$";
+    pp_main_pre_line = "^" pp_prefix pp_main_pre_tag pp_ws_op "$";
+    pp_main_post_line = "^" pp_prefix pp_main_post_tag pp_ws_op "$";
+
+    # Global vars
+    in_test = needs_line_decl = 0;
+    cur_suite = cur_tcase = "Core";
+    cur_test = "";
+    exit_okay = start = 1;
+    num_cur_tcases = num_cur_tests = 0;
+    test_type = num_tests = 0;
+    arg1 = 0;
+    arg2 = 1;
+    arg3 = 2;
+    test_name = 0;
+    test_type_flag = 1;
+}
+
+# Run on the first line of the input file.
+start {
+    print_boilerplate();
+    start = 0;
+}
+
+# (Executed every line:)
+{
+    print_line = 1;
+}
+
+$0 ~ pp_suite_or_tcase_line {
+    if (in_main())
+        in_main_error();
+
+    # Skip to the start of the tag ("suite" or "tcase").
+    match($0, pp_prefix);
+    rol = substr($0, RLENGTH+1);
+
+    # Save away the tag.
+    match(rol, "^" pp_tag);
+    tag = substr(rol, 1, RLENGTH);
+
+    # Advance past the ws following tag.
+    rol = substr(rol, RLENGTH+1);
+    match(rol, pp_ws);
+    rol = substr(rol, RLENGTH+1);
+
+    # The suite or tcase name is the rest of the line, minus any
+    # trailing ws.
+    if (match(rol, pp_ws "$")) {
+        name = substr(rol, 1, RSTART-1);
+    } else {
+        name = rol;
+    }
+
+    if (tolower(tag) == "suite") {
+        # Does this suite already exist?
+        if ((name, 0) in suite_tcase_map) {
+            error_with_line("Suite \"" name "\" already exists.");
+        }
+        cur_suite = name;
+        num_cur_tcases = 0;
+    }
+    else if ((name, 0, 0) in tcase_test_map) {
+        error_with_line("Test Case \"" name "\" already exists.");
+    }
+    cur_tcase = name;
+    num_cur_tests = 0;
+
+    finish_test();
+    print_line = 0;
+    if (!clean_mode)
+        needs_line_decl = 1;
+}
+
+$0 ~ pp_test_line {
+
+    # Pre checks
+    test_pre();
+
+    # Get the test name
+    match($0, pp_test_line_prefix)
+    cur_test = substr($0, RLENGTH+1);
+
+    # Remove trailing ws.
+    sub(pp_ws_op "$", "", cur_test);
+
+    # Check for duplicate tests / cases and valid names
+    duplicate_check();
+
+    # Boilerplate printing code
+    test_post();
+
+    # Set type before calling register
+    test_type = 0;
+    register_test();
+
+    print_line = 0;
+    in_test = 1;
+}
+
+$0 ~ pp_test_loop_line {
+
+    test_pre();
+
+    match($0, pp_test_loop_line_prefix)
+    cur_test = substr($0, RLENGTH+1);
+    sub(pp_ws_op "$", "", cur_test);
+
+    duplicate_check();
+
+    # Split the line into an array to extract the arguments
+    split($0, arr, pp_ws_op "[(),]" pp_ws_op);
+
+    # Eliminate possible whitespace between sign and numbers
+    gsub(pp_ws_op, "", arr[2]);
+    gsub(pp_ws_op, "", arr[3]);
+
+    test_post();
+
+    test_type = 1;
+    register_test();
+
+    print_line = 0;
+    in_test = 1;
+}
+
+$0 ~ pp_test_exit_line {
+
+    test_pre();
+
+    match($0, pp_test_exit_line_prefix)
+    cur_test = substr($0, RLENGTH+1);
+    sub(pp_ws_op "$", "", cur_test);
+
+    duplicate_check();
+
+    split($0, arr, pp_ws_op "[(),]" pp_ws_op);
+    gsub(pp_ws_op, "", arr[2]);
+
+    test_post();
+
+    test_type = 2;
+    register_test();
+
+    print_line = 0;
+    in_test = 1;
+}
+
+$0 ~ pp_test_signal_line {
+
+    test_pre();
+
+    match($0, pp_test_signal_line_prefix)
+    cur_test = substr($0, RLENGTH+1);
+    sub(pp_ws_op "$", "", cur_test);
+
+    duplicate_check();
+
+    split($0, arr, pp_ws_op "[(),]" pp_ws_op);
+    gsub(pp_ws_op, "", arr[2]);
+
+    test_post();
+
+    test_type = 3;
+    register_test();
+
+    print_line = 0;
+    in_test = 1;
+}
+
+$0 ~ pp_test_loop_exit_line {
+
+    test_pre();
+
+    match($0, pp_test_loop_exit_line_prefix)
+    cur_test = substr($0, RLENGTH+1);
+    sub(pp_ws_op "$", "", cur_test);
+
+    duplicate_check();
+
+    split($0, arr, pp_ws_op "[(),]" pp_ws_op);
+    gsub(pp_ws_op, "", arr[2]);
+    gsub(pp_ws_op, "", arr[3]);
+    gsub(pp_ws_op, "", arr[4]);
+
+    test_post();
+
+    test_type = 4;
+    register_test();
+
+    print_line = 0;
+    in_test = 1;
+}
+
+$0 ~ pp_test_loop_signal_line {
+
+    test_pre();
+
+    match($0, pp_test_loop_signal_line_prefix)
+    cur_test = substr($0, RLENGTH+1);
+    sub(pp_ws_op "$", "", cur_test);
+
+    duplicate_check();
+
+    split($0, arr, pp_ws_op "[(),]" pp_ws_op);
+    gsub(pp_ws_op, "", arr[2]);
+    gsub(pp_ws_op, "", arr[3]);
+    gsub(pp_ws_op, "", arr[4]);
+
+    test_post();
+
+    test_type = 5;
+    register_test();
+
+    print_line = 0;
+    in_test = 1;
+}
+
+$0 ~ pp_main_pre_line {
+    main_pre();
+
+    print "";
+    print "    /* User-specified pre-run code */";
+
+    if (!clean_mode)
+        needs_line_decl = 1;
+    print_line = 0;
+}
+
+$0 ~ pp_main_post_line {
+    main_post();
+
+    print "";
+    print "    /* User-specified post-run code */";
+
+    if (!clean_mode)
+        needs_line_decl = 1;
+    print_line = 0;
+}
+
+print_line {
+    if (/[^ \t\f\v\r\n]/ && needs_line_decl && !clean_mode) {
+        print "#line " FNR;
+        needs_line_decl = 0;
+    }
+    print;
+}
+
+END {
+    if (!exit_okay) {
+        # We're exiting due to an error. Don't do anything else.
+    }
+    else if (num_tests) {
+        if (!main_post_done) {
+            main_post();
+            print "";
+            print "    return nf == 0 ? 0 : 1;";
+        }
+        print "}";
+    }
+    else {
+        error("Expected at least one #test line.");
+    }
+}
+
+### Functions ###
+
+function test_pre()
+{
+    if (in_main())
+        in_main_error();
+
+    if (in_test) {
+        finish_test();
+        print "";
+    }
+    ++num_tests;
+}
+
+function duplicate_check()
+{
+    # Confirm that the test name is a valid C identifier.
+    if (!match(cur_test, "^" pp_test_name "$")) {
+        error_with_line("Malformed test name \"" cur_test \
+                        "\" (must be a C identifier).");
+    }
+
+    # Verify that it has not already been used.
+    if (cur_test in test_registry) {
+        error_with_line("Test \"" cur_test "\" already exists.");
+    }
+
+    # Verify that any implied test case is not a repeat.
+    if (num_cur_tests == 0 && (cur_tcase, 0, 0) in tcase_test_map) {
+        error_with_line("Test Case \"" name "\" already exists.");
+    }
+}
+
+function test_post()
+{
+    print "START_TEST(" cur_test ")";
+    print "{";
+    if (!clean_mode)
+        print "#line " FNR+1;
+
+    needs_line_decl = 0;
+}
+
+function main_post()
+{
+    if (main_post_done)
+        error_with_line("main-post specified multiple times.");
+    if (!main_pre_done)
+        main_pre();
+    main_post_done = 1;
+
+    print "";
+
+    print_runner_bindings();
+
+    print "";
+    print "    srunner_run_all(sr, CK_ENV);";
+    print "    nf = srunner_ntests_failed(sr);";
+    print "    srunner_free(sr);";
+}
+
+function in_main()
+{
+    return main_pre_done || main_post_done;
+}
+
+function in_main_error()
+{
+    error_with_line("Cannot specify tests after main-pre or main-post.");
+}
+
+function main_pre()
+{
+    if (main_post_done)
+        error_with_line("main-pre specified after main-post.");
+    if (main_pre_done)
+        error_with_line("main-pre specified multiple times.");
+    main_pre_done = 1;
+    finish_test();
+    print "";
+    print "int main(void)";
+    print "{";
+
+    print_main_declarations();
+}
+
+function suite_var_name(num)
+{
+    return "s" num+1;
+}
+
+function tcase_var_name(snum, tcnum)
+{
+    return "tc" snum+1 "_" tcnum+1;
+}
+
+function print_main_declarations()
+{
+    for (i=0; i != num_suites; ++i) {
+        s = suite_names[i];
+        svar = suite_var_name(i);
+        print "    Suite *" svar " = suite_create(" string_encode(s) ");";
+        for (j=0; j != suite_num_tcases[s]; ++j) {
+            tc = suite_tcase_map[s, j];
+            tcvar = tcase_var_name(i, j);
+            print "    TCase *" tcvar " = tcase_create(" \
+                    string_encode(tc) ");";
+        }
+    }
+    print "    SRunner *sr = srunner_create(s1);";
+    print "    int nf;";
+}
+
+function string_encode(raw)
+{
+    # The next line might look funny, but remember that the first
+    # argument will go through both string interpolation /and/ regex
+    # interpolation, so the backslashes must be double-escaped. The
+    # substitution string is supposed to result in an actual
+    # double-backslash.
+    gsub("\\\\", "@AWK_GSUB_DBL_BSLASH@", raw);
+    gsub("\"", "\\\"", raw);
+    return "\"" raw "\"";
+}
+
+function print_runner_bindings()
+{
+    for (i=0; i != num_suites; ++i) {
+        s = suite_names[i];
+        svar = suite_var_name(i);
+        for (j=0; j != suite_num_tcases[s]; ++j) {
+            tc = suite_tcase_map[s, j];
+            tcvar = tcase_var_name(i, j);
+            print "    suite_add_tcase(" svar ", " tcvar ");";
+            for (k=0; k != tcase_num_tests[tc]; ++k) {
+                t = tcase_test_map[tc, k, test_name];
+                test_type = tcase_test_map[tc, k, test_type_flag];
+                if (test_type == 0) {
+                    print "    tcase_add_test(" tcvar ", " t ");";
+                }
+                else if (test_type == 1) {
+                    print "    tcase_add_loop_test(" tcvar ", " t ", " \
+                        test_parameters[t, arg1] ", " test_parameters[t, arg2] \
+                        ");";
+                }
+                else if (test_type == 2) {
+                    print "    tcase_add_exit_test(" tcvar ", " t ", " \
+                        test_parameters[t, arg1] ");";
+                }
+                else if (test_type == 3) {
+                    print "    tcase_add_test_raise_signal(" tcvar ", " t ", " \
+                        test_parameters[t, arg1] ");";
+                }
+                else if (test_type == 4) {
+                    print "    tcase_add_loop_exit_test(" tcvar ", " t ", " \
+                        test_parameters[t, arg1] ", " test_parameters[t, arg2] \
+                        ", " test_parameters[t, arg3] ");";
+                }
+                else if (test_type == 5) {
+                    print "    tcase_add_loop_test_raise_signal(" tcvar ", " t \
+                        ", " test_parameters[t, arg1] ", " test_parameters[t, arg2] \
+                        ", " test_parameters[t, arg3] ");";
+                }
+            }
+        }
+    }
+    if (num_suites > 1) {
+        print "";
+        for (i=1; i != num_suites; ++i) {
+            svar = suite_var_name(i);
+            print "    srunner_add_suite(sr, " svar ");";
+        }
+    }
+}
+
+function register_test()
+{
+    if (num_cur_tcases == 0) {
+        suite_names[num_suites++] = cur_suite;
+    }
+    if (num_cur_tests == 0) {
+        suite_tcase_map[cur_suite, num_cur_tcases++] = cur_tcase;
+        suite_num_tcases[cur_suite] = num_cur_tcases;
+    }
+    tcase_test_map[cur_tcase, num_cur_tests, test_name] = cur_test;
+    tcase_test_map[cur_tcase, num_cur_tests++, test_type_flag] = test_type;
+    tcase_num_tests[cur_tcase] = num_cur_tests;
+    test_registry[cur_test] = 1;
+
+    # Store arguments to array
+    test_parameters[cur_test, arg1] = arr[2];
+    test_parameters[cur_test, arg2] = arr[3];
+    test_parameters[cur_test, arg3] = arr[4];
+}
+
+function finish_test()
+{
+    if (in_test) {
+        in_test = 0;
+        print "}";
+        print "END_TEST";
+    }
+}
+
+function print_boilerplate()
+{
+    print "/*";
+    print " * DO NOT EDIT THIS FILE. Generated by " progname ".";
+    if (!FILENAME || FILENAME == "-") {
+        clean_mode=1;
+        is_stdin=1;
+    }
+    if (is_stdin)
+        srcfile = "(standard input)";
+    else
+        srcfile = "\"" FILENAME "\"";
+    print " * Edit the original source file " srcfile " instead.";
+    print " */";
+    print "";
+    print "#include <check.h>";
+    print "";
+    if (!clean_mode)
+        print "#line 1 " string_encode(FILENAME)
+}
+
+function error_with_line(err)
+{
+    error((is_stdin ? "(standard input)" : FILENAME) " line " FNR ": " err);
+}
+
+function error(err)
+{
+    print progname ": " err > "/dev/stderr";
+    exit_okay = 0;
+    exit 1;
+}
diff --git a/checkmk/doc/checkmk.1 b/checkmk/doc/checkmk.1
new file mode 100644 (file)
index 0000000..febaec6
--- /dev/null
@@ -0,0 +1,569 @@
+.\" This manpage has been automatically generated by docbook2man 
+.\" from a DocBook document.  This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
+.\" Please send any bug reports, improvements, comments, patches, 
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "CHECKMK" "1" "09 February 2010" "" ""
+
+.SH NAME
+checkmk \- Awk script for generating C unit tests for use with the    Check unit testing framework.
+.SH SYNOPSIS
+
+\fBcheckmk\fR [ \fBclean_mode=1\fR ] [ \fB\fIinput-file\fB\fR ]
+
+.SH "DESCRIPTION"
+.PP
+Generate C-language source files containing unit tests for use
+with the Check unit testing framework. The aim of this script is
+to automate away some of the typical boilerplate one must write when
+writing a test suite using Check: specifically, the instantiation of
+an SRunner, Suite(s), and TCase(s), and the building of
+relationships between these objects and the test functions.
+.PP
+This tool is intended to be used by those who are familiar
+with the Check unit testing framework. Familiarity with the
+framework will be assumed throughout this manual.
+.PP
+The Check framework, along with information regarding it, is
+available at http://check.sourceforge.net/ <URL:http://check.sourceforge.net/>\&.
+.PP
+The \fIinput-file\fR argument to
+\fBcheckmk\fR uses a simple, C-preprocessor-like
+syntax to declare test functions, and to describe their
+relationships to Suites and TCases in Check.
+\fBcheckmk\fR then uses this information to
+automatically write a \fBmain()\fR function
+containing all of the necessary declarations, and whatever code is
+needed to run the test suites. The final C-language output is
+printed to \fBcheckmk\fR\&'s standard output.
+.PP
+Facilities are provided for the insertion of user code into
+the generated \fBmain()\fR function, to provide for
+the use of logging, test fixtures or specialized exit values.
+.PP
+While it is possible to omit the
+\fIinput-file\fR argument to
+\fBcheckmk\fR and provide the input file on
+\fBcheckmk\fR\&'s standard input instead, it is generally
+recommended to provide it as an argument. Doing this allows
+\fBcheckmk\fR to be aware of the file's name, to place
+references to it in the initial comments of the C-language output,
+and to intersperse C #line directives throughout, to
+facilitate in debugging problems by directing the user to the
+original input file.
+.SH "OPTIONS"
+.PP
+The only officially supported option is specifying a true
+value (using Awk's definition for "true") for the variable
+\fBclean_mode\fR\&. This causes \fBcheckmk\fR
+not to place appropriate #line directives in the
+source code, which some might find to be unnecessary clutter.
+.PP
+The author recommends against the use of this option, as it
+will cause C compilers and debugging tools to refer to lines in the
+automatically generated output, rather than the original input files
+to \fBcheckmk\fR\&. This would encourage users to edit the
+output files instead of the original input files, would make it
+difficult for intelligent editors or IDEs to pull up the right file
+to edit, and could result in the fixes being overwritten when the
+output files are regenerated.
+.PP
+#line directives are automatically
+supressed when the input file is provided on standard input
+instead of as a command-line argument.
+.SH "BASIC EXAMPLE"
+.PP
+In its most basic form, an input file can be simply a
+prologue and a test function. Anything that appears before the
+first test function is in the prologue, and will be copied into
+the output verbatim. The test function is begun by a line in the
+form:
+
+.nf
+#test \fItest_name\fR
+.fi
+.PP
+Where \fItest_name\fR is the name of
+your test function. This will be used to name a C function, so
+it must be a valid C identifier.
+.PP
+Here is a small, complete example:
+
+.nf
+--------------------------------------------------
+/* A complete test example */
+
+#include <stdio.h>
+
+#test the_test
+    int nc;
+    const char msg[] = "\\n\\n    Hello, world!\\n";
+
+    nc = printf("%s", msg);
+    ck_assert(nc == (sizeof(msg) - 1)); /* for terminating NUL. */
+--------------------------------------------------
+.fi
+.PP
+If you place the above into a file named
+\fIbasic_complete.ts\fR and process it using the
+following command:
+.PP
+\fB$ checkmk basic_complete.ts > basic_complete.c\fR
+.PP
+\fIbasic_complete.c\fR
+will contain output similar to:
+
+.nf
+--------------------------------------------------
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+/* A complete test example */
+
+#include <stdio.h>
+
+START_TEST(the_test)
+{
+    int nc;
+    const char msg[] = "\\n\\n    Hello, world!\\n";
+
+    nc = printf("%s", msg);
+    ck_assert(nc == (sizeof(msg) - 1)); /* for terminating NUL. */
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("Core");
+    TCase *tc1_1 = tcase_create("Core");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
+--------------------------------------------------
+.fi
+.PP
+In real usage, \fIbasic_complete.c\fR would
+also contain #line directives.
+.SH "DIRECTIVE SUMMARY"
+.PP
+Here is a complete summary of all the C-preprocessor-style
+directives that are understood by \fBcheckmk\fR\&. See
+below for more details.
+
+.nf
+# test \fItest_name\fR
+# test-signal(\fIsignal\fR) \fItest_name\fR
+# test-exit(\fIexit_code\fR) \fItest_name\fR
+# test-loop(\fIstart\fR, \fIend\fR) \fItest_name\fR
+# test-loop-signal(\fIsignal\fR, \fIstart\fR, \fIend\fR) \fItest_name\fR
+# test-loop-exit(\fIexit_code\fR, \fIstart\fR, \fIend\fR) \fItest_name\fR
+# suite \fITestSuiteName\fR
+# tcase \fITestCaseName\fR
+# main-pre
+# main-post
+.fi
+.PP
+All directives are case-insensitive. Whitespace may appear
+at the beginning of the line before the #,
+between the # and the directive, between the
+directive and any argument, and at the end of the line.
+.SH "TEST-DEFINING DIRECTIVES"
+.PP
+Here is a more detailed explanation of the directives that may be
+used to define test functions and their containers.
+.SS "TEST FUNCTIONS"
+
+.nf
+# test \fItest_name\fR
+# test-signal(\fIsignal\fR) \fItest_name\fR
+# test-exit(\fIexit_code\fR) \fItest_name\fR
+# test-loop(\fIstart\fR, \fIend\fR) \fItest_name\fR
+# test-loop-signal(\fIsignal\fR, \fIstart\fR, \fIend\fR) \fItest_name\fR
+# test-loop-exit(\fIexit_code\fR, \fIstart\fR, \fIend\fR) \fItest_name\fR
+.fi
+.PP
+These are the most basic directives for creating a template
+for input to \fBcheckmk\fR\&. They are the only
+directives that are required: there must be at least one
+#test* directive appearing in the template, or
+\fBcheckmk\fR will fail with an error message. The
+#test* directives may be specified several times,
+each one beginning the definition of a new test function.
+.PP
+The \fItest_name\fR argument will be
+used as the name of a test function in the C-language output, so
+it must be a valid C identifier. That is, it must begin with an
+alphabetic character or the underscore (_),
+followed by optional alpha-numeric characters and/or
+underscores.
+.PP
+Universal Character Names (introduced in C99) are also
+allowed, of the form \\uXXXX or
+\\UXXXXXXXX, where the X\&'s
+represent hexadecimal digits.
+.PP
+It is an error to specify the same
+\fItest_name\fR in more than one
+#test* directive, regardless of whether they
+are associated with different test cases or suites.
+.PP
+See CHECKMK
+IDENTIFIERS for the list of identifiers which should be
+avoided for use as test function names.
+.SS "TEST SUITES"
+
+.nf
+# suite \fITestSuiteName\fR
+.fi
+.PP
+This directive specifies the name of the test suite
+(\fBSuite\fR object in the Check test
+framework) to which all future test cases (and their test
+functions) will be added.
+.PP
+The \fITestSuiteName\fR is a text
+string, and may contain any sort of characters at all (other
+than ASCII NUL character, and the newline, which would terminate
+the directive). Any leading or trailing whitespace will be omitted
+from the test suite name.
+.PP
+Starting a new test suite also begins a new test case, whose
+name is identical to the new test suite. This test case name may be
+overridden by a subsequent #tcase directive.
+.PP
+Note that a \fBSuite\fR object won't
+actually be defined by \fBcheckmk\fR in the C
+output, unless it is followed at some point by a
+#test directive (without an intervening
+#suite). It is not an error for a
+#suite to have no associated
+#test\&'s; the #suite (and any
+associated #tcase\&'s) simply won't result in any
+action on the part of \fBcheckmk\fR (and would
+therefore be useless).
+.PP
+It is an error for a #suite directive to
+specify the same (case sensitive) suite multiple times, unless the
+previous uses were not instantiated by the presence of at least
+one associated #test directive.
+.PP
+If you do not specify a #suite directive
+before the first #test directive,
+\fBcheckmk\fR performs the equivalent of an
+implicit #suite directive, with the string
+"Core" as the value for
+\fITestSuiteName\fR (this also implies a
+"Core" test case object). This is demonstrated
+above in BASIC EXAMPLE\&.
+.SS "TEST CASES"
+
+.nf
+# tcase \fITestCaseName\fR
+.fi
+.PP
+This directive specifies the name of the test case
+(\fBTCase\fR object in the Check test
+framework) to which all future test functions will be added.
+.PP
+The #tcase works very in a way very
+similar to #suite\&. The
+\fITestCaseName\fR is a text string, and
+may contain arbitrary characters; and a
+\fBTCase\fR object won't actually be defined
+unless it is followed by an associated
+#test directive.
+.PP
+It is an error for a #tcase directive to
+specify the same (case sensitive) test case multiple times, unless the
+previous uses were not instantiated by the presence of at least
+one associated #test directive.
+.PP
+See also the #suite directive, described
+above.
+.SH "USER CODE IN MAIN()"
+.PP
+The C \fBmain()\fR is automatically generated
+by \fBcheckmk\fR, defining the necessary
+\fBSRunner\fR\&'s, \fBSuite\fR\&'s,
+and\~\fBTCase\fR\&'s required by the
+test-defining directives specified by the user.
+.PP
+For most situations, this completely automated
+\fBmain()\fR is quite suitable as-is. However,
+there are situations where one might wish to add custom code to
+the \fBmain()\fR\&. For instance, if the user wishes
+to:
+.TP 0.2i
+\(bu
+change the test timeout value via
+\fBtcase_set_timeout()\fR,
+.TP 0.2i
+\(bu
+specify Check's "no-fork-mode" via
+\fBsrunner_set_fork_status()\fR,
+.TP 0.2i
+\(bu
+set up test fixtures for some test cases, via
+\fBtcase_add_checked_fixture()\fR
+or\~\fBtcase_add_unchecked_fixture()\fR,
+.TP 0.2i
+\(bu
+set up test logging for the suite
+runner, via \fBsrunner_set_log()\fR
+or\~\fBsrunner_set_xml()\fR, or
+.TP 0.2i
+\(bu
+perform custom wrap-up after the test suites have
+been run.
+.PP
+For these purposes, the #main-pre
+and\~#main-post directives have been
+provided.
+.SS "MAIN() PROLOGUE"
+
+.nf
+# main-pre
+.fi
+.PP
+The text following this directive will be placed verbatim
+into the body of the generated \fBmain()\fR
+function, just after \fBcheckmk\fR\&'s own local
+variable declarations, and before any test running has taken
+place (indeed, before even the relationships between the tests,
+test cases, and test suites have been set up, though that
+fact shouldn't make much difference). Since
+\fBcheckmk\fR has only just finished making its
+declarations, it is permissible, even under strict 1990 ISO C
+guidelines, to make custom variable declarations here.
+.PP
+Unlike the previously-described directives,
+#main-pre may be specified at most once. It may
+not be preceded by the #main-post directive,
+and no #suite, #tcase, 
+or #test directive may appear after it.
+.PP
+#main-pre is a good place to tweak
+settings or set up test fixtures. Of course, in order to do so,
+you need to know what names \fBcheckmk\fR has used
+to instantiate the \fBSRunner\fR\&'s,
+\fBSuite\fR\&'s,
+and\~\fBTCase\fR\&'s.
+.SS "CHECKMK IDENTIFIERS"
+.PP
+Pointers to \fBSuite\fR\&'s are declared
+using the pattern
+s\fIX\fR, where
+\fIX\fR is a number
+that starts at 1, and is incremented for each subsequent
+#suite directive.
+s1 always exists, and contains the test
+function declared by the first #test
+directive. If that directive was not preceded by a
+#suite, it will be given the name "Core".
+.PP
+Pointers to \fBTCase\fR\&'s are declared
+using the pattern
+tc\fIX\fR_\fIY\fR,
+where \fIX\fR corresponds to the number
+used for the name of the \fBSuite\fR that
+will contain this \fBTCase\fR; and
+\fIY\fR is a number that starts at 1 for
+each new \fBSuite\fR, and is incremented for
+each \fBTCase\fR in that
+\fBSuite\fR\&.
+.PP
+A pointer to \fBSRunner\fR is declared
+using the identifier sr; there is also an
+integer named nf which holds the number of
+test failures (after the tests have run).
+.PP
+For obvious reasons, the user should not attempt to
+declare local identifiers in \fBmain()\fR, or
+define any macros or test functions, whose names might
+conflict with the local variable names used by
+\fBcheckmk\fR\&. To summarize, these names are:
+
+s\fIX\fR
+
+tc\fIX\fR_\fIY\fR
+
+sr
+
+nf\&.
+.SS "MAIN() EPILOGUE"
+
+.nf
+# main-post
+.fi
+.PP
+Though it is not as useful, \fBcheckmk\fR also
+provides a #main-post directive to insert
+custom code at the end of \fBmain()\fR, after the
+tests have run. This could be used to clean up resources that
+were allocated in the prologue, or to print information about
+the failed tests, or to provide a custom exit status
+code.
+.PP
+Note that, if you make use of this directive,
+\fBcheckmk\fR will \fBnot\fR provide a
+return statement: you will need
+to provide one yourself.
+.PP
+The #main-post directive may not be
+followed by any other directives recognized by
+\fBcheckmk\fR\&.
+.SH "COMPREHENSIVE EXAMPLE"
+.PP
+Now that you've gotten the detailed descriptions of the
+various directives, let's see it all put to action with this
+fairly comprehensive template.
+
+.nf
+--------------------------------------------------
+#include "mempool.h"  /* defines MEMPOOLSZ, prototypes for
+                         mempool_init() and mempool_free() */
+
+void *mempool;
+
+void mp_setup(void)
+{
+    mempool = mempool_init(MEMPOOLSZ);
+    ck_assert_msg(mempool != NULL, "Couldn't allocate mempool.");
+}
+
+void mp_teardown(void)
+{
+    mempool_free(mempool);
+}
+
+/* end of prologue */
+
+#suite Mempool
+
+#tcase MP Init
+
+#test mempool_init_zero_test
+    mempool = mempool_init(0);
+    ck_assert_msg(mempool == NULL, "Allocated a zero-sized mempool!");
+    ck_assert_msg(mempool_error(), "Didn't get an error for zero alloc.");
+
+/* "MP Util" TCase uses checked fixture. */
+#tcase MP Util
+
+#test mempool_copy_test
+    void *cp = mempool_copy(mempool);
+    ck_assert_msg(cp != NULL, "Couldn't perform mempool copy.");
+    ck_assert_msg(cp != mempool, "Copy returned original pointer!");
+
+#test mempool_size_test
+    ck_assert(mempool_getsize(mempool) == MEMPOOLSZ);
+
+#main-pre
+    tcase_add_checked_fixture(tc1_2, mp_setup, mp_teardown);
+    srunner_set_log(sr, "mplog.txt");
+
+#main-post
+    if (nf != 0) {
+      printf("Hey, something's wrong! %d whole tests failed!\\n", nf);
+    }
+    return 0; /* Harness checks for output, always return success
+                 regardless. */
+--------------------------------------------------
+.fi
+.PP
+Plugging this into \fBcheckmk\fR, we'll get
+output roughly like the following:
+
+.nf
+--------------------------------------------------
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "comprehensive.ts" instead.
+ */
+
+#include <check.h>
+
+#include "mempool.h"
+
+void *mempool;
+
+void mp_setup(void)
+{
+\&...
+}
+
+void mp_teardown(void)
+{
+\&...
+}
+
+/* end of prologue */
+
+START_TEST(mempool_init_zero_test)
+{
+\&...
+}
+END_TEST
+
+START_TEST(mempool_copy_test)
+{
+\&...
+}
+END_TEST
+
+START_TEST(mempool_size_test)
+{
+\&...
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("Mempool");
+    TCase *tc1_1 = tcase_create("MP Init");
+    TCase *tc1_2 = tcase_create("MP Util");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    /* User-specified pre-run code */
+    tcase_add_checked_fixture(tc1_2, mp_setup, mp_teardown);
+    srunner_set_log(sr, "mplog.txt");
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, mempool_init_zero_test);
+    suite_add_tcase(s1, tc1_2);
+    tcase_add_test(tc1_2, mempool_copy_test);
+    tcase_add_test(tc1_2, mempool_size_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    /* User-specified post-run code */
+    if (nf != 0) {
+      printf("Hey, something's wrong! %d whole tests failed!\\n", nf);
+    }
+    return 0; /* Harness checks for output, always return success
+                 regardless. */
+}
+--------------------------------------------------
+.fi
+.SH "AUTHOR"
+.PP
+\fBcheckmk\fR and this manual were written
+by Micah J Cowan.
+.PP
+Copyright (C) 2006, 2010 Micah J Cowan.
diff --git a/checkmk/examples/basic_complete.ts b/checkmk/examples/basic_complete.ts
new file mode 100644 (file)
index 0000000..a296f93
--- /dev/null
@@ -0,0 +1,16 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/examples/multiple_everything.ts b/checkmk/examples/multiple_everything.ts
new file mode 100644 (file)
index 0000000..fbe4518
--- /dev/null
@@ -0,0 +1,47 @@
+/* Multiple everything... */
+
+#include <stdlib.h>
+#include <errno.h>
+#include <stdio.h>
+
+void print_message(const char *msg, size_t msgsz)
+{
+    int nc;
+
+    nc = printf("%s", msg);
+    fail_unless(nc == msgsz, "failed to print completely: %s",
+                strerror(errno));
+}
+
+# suite A Suite
+
+# tcase A Test Case
+
+# test hello_world
+    const char msg[] = "Hello, world!\n";
+    print_message(msg, sizeof msg - 1);
+
+# test neverending_story
+    const char msg[] = "Bastian Balthazar Bux\n";
+    print_message(msg, sizeof msg - 1);
+
+# tcase Another Test Case
+
+# test math_problem
+    fail_unless(1 + 1 == 2, "Something's broken...");
+
+# suite Another Suite
+
+# tcase A Test Case for Another Suite
+
+# test more_math
+    fail_unless(2/2 == 1, "Another weird math result");
+
+# tcase A Basket Case
+
+# test weave
+    int i;
+    const char msg[] = "###\n";
+
+    for (i=0; i != 3; ++i)
+        print_message(row, sizeof row - 1);
diff --git a/checkmk/test/argument_ws/in b/checkmk/test/argument_ws/in
new file mode 100644 (file)
index 0000000..9dc1572
--- /dev/null
@@ -0,0 +1,84 @@
+#test-exit(0) test1
+       ck_assert(0 == 0);
+  #test-exit (1)  test2
+       ck_assert(1 == 0);
+       #test-exit ( 0)         test3
+       ck_assert(1 == 0);
+         #test-exit ( +0 )       test4
+       ck_assert(1 == 0);
+               #test-exit (    -1 )      test5
+       ck_assert(1 == 0);
+                 #test-exit   (        -  1 )            test6
+       ck_assert(1 == 0);
+                 #test-exit    (-        0     )         test7
+       ck_assert(1 == 0);
+                 #test-exit      (      + 1      )       test8
+       ck_assert(1 == 0);
+
+#test-signal(0) test9
+       ck_assert(0 == 0);
+  #test-signal (1)  test10
+       ck_assert(1 == 0);
+       #test-signal ( 0)       test11
+       ck_assert(1 == 0);
+         #test-signal ( +0 )     test12
+       ck_assert(1 == 2);
+               #test-signal (  -1 )      test13
+       ck_assert(1 == 0);
+                 #test-signal   (      -  1 )            test14
+       ck_assert(1 == 0);
+                 #test-signal          (-        0     )         test15
+       ck_assert(1 == 0);
+                 #test-signal    (      + 1      )       test16
+       ck_assert(1 == 0);
+
+#test-loop(0,2) test17
+       ck_assert(0 == 0);
+  #test-loop (1  ,0)  test18
+       ck_assert(1 == 0);
+       #test-loop ( 0  ,  1)   test19
+       ck_assert(1 == 1);
+         #test-loop ( +0  ,  -2)         test20
+       ck_assert(1 == 0);
+               #test-loop (    -1      ,+  3)            test21
+       ck_assert(1 == 0);
+                 #test-loop   (        -  1,   +  2 )            test22
+       ck_assert(1 == 0);
+                 #test-loop    (-        0     ,         -  2)           test23
+       ck_assert(1 == 0);
+                 #test-loop      (      + 1      ,     -       3         )       test24
+       ck_assert(1 == 1);
+
+#test-loop-exit(1,0,2) test25
+       ck_assert(0 == 1);
+  #test-loop-exit ( 2,1  ,0)  test26
+       ck_assert(1 == 0);
+       #test-loop-exit ( 2  ,0  ,  1)          test27
+       ck_assert(1 == 0);
+         #test-loop-exit (     -1      , +0  ,  -2)      test28
+       ck_assert(1 == 0);
+               #test-loop-exit (  -  3  ,      -1      ,+  3)            test29
+       ck_assert(1 == 1);
+                 #test-loop-exit   (   +  0,   -  1,   +  2 )            test30
+       ck_assert(1 == 0);
+                 #test-loop-exit       (- 4    ,-        0     ,         -  2)           test31
+       ck_assert(1 == 0);
+                 #test-loop-exit         (      +2  ,  +       1         ,     -       3         )       test32
+       ck_assert(1 == 0);
+
+#test-loop-signal(1,0,2) test33
+       ck_assert(0 == 0);
+  #test-loop-signal ( 2,1  ,0)  test34
+       ck_assert(1 == 0);
+       #test-loop-signal ( 2  ,0  ,  1)        test35
+       ck_assert(1 == 1);
+         #test-loop-signal (   -1      , +0  ,  -2)      test36
+       ck_assert(1 == 0);
+               #test-loop-signal (  -  3        ,      -1      ,+  3)            test37
+       ck_assert(1 == 0);
+                 #test-loop-signal   ( +  0,   -  1,   +  2 )            test38
+       ck_assert(1 == 0);
+                 #test-loop-signal     (- 4    ,-        0     ,         -  2)           test39
+       ck_assert(1 == 0);
+                 #test-loop-signal       (      +2  ,  +       1         ,     -       3         )       test40
+       ck_assert(1 == 1);
\ No newline at end of file
diff --git a/checkmk/test/argument_ws/x_output b/checkmk/test/argument_ws/x_output
new file mode 100644 (file)
index 0000000..59d5556
--- /dev/null
@@ -0,0 +1,347 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+START_TEST(test1)
+{
+#line 2
+       ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test2)
+{
+#line 4
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test3)
+{
+#line 6
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test4)
+{
+#line 8
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test5)
+{
+#line 10
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test6)
+{
+#line 12
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test7)
+{
+#line 14
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test8)
+{
+#line 16
+       ck_assert(1 == 0);
+
+}
+END_TEST
+
+START_TEST(test9)
+{
+#line 19
+       ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test10)
+{
+#line 21
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test11)
+{
+#line 23
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test12)
+{
+#line 25
+       ck_assert(1 == 2);
+}
+END_TEST
+
+START_TEST(test13)
+{
+#line 27
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test14)
+{
+#line 29
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test15)
+{
+#line 31
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test16)
+{
+#line 33
+       ck_assert(1 == 0);
+
+}
+END_TEST
+
+START_TEST(test17)
+{
+#line 36
+       ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test18)
+{
+#line 38
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test19)
+{
+#line 40
+       ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test20)
+{
+#line 42
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test21)
+{
+#line 44
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test22)
+{
+#line 46
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test23)
+{
+#line 48
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test24)
+{
+#line 50
+       ck_assert(1 == 1);
+
+}
+END_TEST
+
+START_TEST(test25)
+{
+#line 53
+       ck_assert(0 == 1);
+}
+END_TEST
+
+START_TEST(test26)
+{
+#line 55
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test27)
+{
+#line 57
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test28)
+{
+#line 59
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test29)
+{
+#line 61
+       ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test30)
+{
+#line 63
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test31)
+{
+#line 65
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test32)
+{
+#line 67
+       ck_assert(1 == 0);
+
+}
+END_TEST
+
+START_TEST(test33)
+{
+#line 70
+       ck_assert(0 == 0);
+}
+END_TEST
+
+START_TEST(test34)
+{
+#line 72
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test35)
+{
+#line 74
+       ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test36)
+{
+#line 76
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test37)
+{
+#line 78
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test38)
+{
+#line 80
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test39)
+{
+#line 82
+       ck_assert(1 == 0);
+}
+END_TEST
+
+START_TEST(test40)
+{
+#line 84
+       ck_assert(1 == 1);
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("Core");
+    TCase *tc1_1 = tcase_create("Core");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_exit_test(tc1_1, test1, 0);
+    tcase_add_exit_test(tc1_1, test2, 1);
+    tcase_add_exit_test(tc1_1, test3, 0);
+    tcase_add_exit_test(tc1_1, test4, +0);
+    tcase_add_exit_test(tc1_1, test5, -1);
+    tcase_add_exit_test(tc1_1, test6, -1);
+    tcase_add_exit_test(tc1_1, test7, -0);
+    tcase_add_exit_test(tc1_1, test8, +1);
+    tcase_add_test_raise_signal(tc1_1, test9, 0);
+    tcase_add_test_raise_signal(tc1_1, test10, 1);
+    tcase_add_test_raise_signal(tc1_1, test11, 0);
+    tcase_add_test_raise_signal(tc1_1, test12, +0);
+    tcase_add_test_raise_signal(tc1_1, test13, -1);
+    tcase_add_test_raise_signal(tc1_1, test14, -1);
+    tcase_add_test_raise_signal(tc1_1, test15, -0);
+    tcase_add_test_raise_signal(tc1_1, test16, +1);
+    tcase_add_loop_test(tc1_1, test17, 0, 2);
+    tcase_add_loop_test(tc1_1, test18, 1, 0);
+    tcase_add_loop_test(tc1_1, test19, 0, 1);
+    tcase_add_loop_test(tc1_1, test20, +0, -2);
+    tcase_add_loop_test(tc1_1, test21, -1, +3);
+    tcase_add_loop_test(tc1_1, test22, -1, +2);
+    tcase_add_loop_test(tc1_1, test23, -0, -2);
+    tcase_add_loop_test(tc1_1, test24, +1, -3);
+    tcase_add_loop_exit_test(tc1_1, test25, 1, 0, 2);
+    tcase_add_loop_exit_test(tc1_1, test26, 2, 1, 0);
+    tcase_add_loop_exit_test(tc1_1, test27, 2, 0, 1);
+    tcase_add_loop_exit_test(tc1_1, test28, -1, +0, -2);
+    tcase_add_loop_exit_test(tc1_1, test29, -3, -1, +3);
+    tcase_add_loop_exit_test(tc1_1, test30, +0, -1, +2);
+    tcase_add_loop_exit_test(tc1_1, test31, -4, -0, -2);
+    tcase_add_loop_exit_test(tc1_1, test32, +2, +1, -3);
+    tcase_add_loop_test_raise_signal(tc1_1, test33, 1, 0, 2);
+    tcase_add_loop_test_raise_signal(tc1_1, test34, 2, 1, 0);
+    tcase_add_loop_test_raise_signal(tc1_1, test35, 2, 0, 1);
+    tcase_add_loop_test_raise_signal(tc1_1, test36, -1, +0, -2);
+    tcase_add_loop_test_raise_signal(tc1_1, test37, -3, -1, +3);
+    tcase_add_loop_test_raise_signal(tc1_1, test38, +0, -1, +2);
+    tcase_add_loop_test_raise_signal(tc1_1, test39, -4, -0, -2);
+    tcase_add_loop_test_raise_signal(tc1_1, test40, +2, +1, -3);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/basic_complete/in b/checkmk/test/basic_complete/in
new file mode 100644 (file)
index 0000000..a296f93
--- /dev/null
@@ -0,0 +1,16 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/basic_complete/x_output b/checkmk/test/basic_complete/x_output
new file mode 100644 (file)
index 0000000..77cff13
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/between_the_lines/in b/checkmk/test/between_the_lines/in
new file mode 100644 (file)
index 0000000..c72d58e
--- /dev/null
@@ -0,0 +1,12 @@
+int foo;
+
+#suite A
+
+int bar;
+
+#tcase B
+
+int baz;
+
+#test C
+    fail_unless(foo | bar | baz == 0);
diff --git a/checkmk/test/between_the_lines/x_output b/checkmk/test/between_the_lines/x_output
new file mode 100644 (file)
index 0000000..d64c4b8
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+int foo;
+
+
+#line 5
+int bar;
+
+
+#line 9
+int baz;
+
+START_TEST(C)
+{
+#line 12
+    fail_unless(foo | bar | baz == 0);
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("A");
+    TCase *tc1_1 = tcase_create("B");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, C);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/case_insensitive_pp/in b/checkmk/test/case_insensitive_pp/in
new file mode 100644 (file)
index 0000000..89ab9a5
--- /dev/null
@@ -0,0 +1,16 @@
+/* Test case-insensitive directives. */
+
+#include <stdio.h>
+
+# SuiTe The Suite
+
+# tCaSe The Test Case
+
+# teSt  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/case_insensitive_pp/x_output b/checkmk/test/case_insensitive_pp/x_output
new file mode 100644 (file)
index 0000000..af11f07
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Test case-insensitive directives. */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/check_checkmk b/checkmk/test/check_checkmk
new file mode 100755 (executable)
index 0000000..1f0120e
--- /dev/null
@@ -0,0 +1,143 @@
+#!/usr/bin/env sh
+
+TESTS_RUN=0
+TESTS_PASSED=0
+TESTS_FAILED=0
+
+TEST_DIRS='empty_input pass_thru single_test_line basic_complete'
+TEST_DIRS="$TEST_DIRS multiple_everything between_the_lines"
+TEST_DIRS="$TEST_DIRS repeated_suites repeated_tcases repeated_tests"
+TEST_DIRS="$TEST_DIRS not_really_repeated tcase_implied_repeat"
+TEST_DIRS="$TEST_DIRS case_insensitive_pp trailing_ws non_word_chars"
+TEST_DIRS="$TEST_DIRS test_chars num_start_test_name"
+TEST_DIRS="$TEST_DIRS no_args clean_mode declarations test_after_main_pre"
+TEST_DIRS="$TEST_DIRS main_pre_multiple main_post main_pre_after_post"
+TEST_DIRS="$TEST_DIRS test_after_main_post main_post_multiple ucn"
+TEST_DIRS="$TEST_DIRS invalid_ucn argument_ws repeated_argument_tests"
+
+check_dir() {
+    status=0
+
+    checkmkdir=$PWD
+    outdir="test.out/$1"
+    testdir="$srcdir/test/$1"
+
+    if ! mkdir -p "$outdir"
+    then
+        echo "Couldn't make path \"$outdir\"!"
+    fi
+    outdir=$(cd "$outdir" && pwd)
+
+    if ! cd "$testdir"
+    then
+        echo "Couldn't chdir to \"$testdir\"!"
+    fi
+
+    # set up expected input/output file names
+    infname=in
+    outfname="$outdir/output"
+    errfname="$outdir/err"
+    diffname="$outdir/diff"
+    errdiffname="$outdir/err-diff"
+    CHECKMK="$checkmkdir/checkmk"
+    checkmk_cmd='"$CHECKMK" "$infname" > "$outfname" 2>"$errfname"'
+
+    rm -f "$outfname" "$errfname" "$diffname" "$errdiffname"
+
+    # source local versions, if available.
+    [ -r ./cmd ] && . ./cmd
+
+    # Check output.
+    eval "$checkmk_cmd"
+    ckstat=$?
+
+    if ! diff -c "x_output" "$outfname" > "$diffname"
+    then
+        echo "Unexpected output differences:"
+        cat "$diffname"
+        status=1
+    fi
+
+    # Check stderr.
+    if [ -s x_err ]
+    then
+        if ! diff -c "x_err" "$errfname" > "$errdiffname"
+        then
+            echo "Unexpected error differences:"
+            cat "$errdiffname"
+            status=1
+        fi
+    elif [ -s err ]
+    then
+        echo "Unexpected text from standard error:"
+        echo "------------------------------------"
+        cat "$errfname"
+        echo "------------------------------------"
+        status=1
+    fi
+
+    # Check status.
+    xstat=0
+    if [ -e "x_exit" ]
+    then
+        xstat=`cat x_exit`
+    elif [ -s "x_err" ]
+    then
+        xstat=1
+    fi
+
+    if [ $xstat != $ckstat ]
+    then
+        echo "Expected exit status of $xstat, but got $ckstat."
+        status=1
+    fi
+
+    return $status
+}
+
+pass_dir() {
+    echo "Test $1 passed."
+    TESTS_PASSED=$(($TESTS_PASSED+1))
+}
+
+fail_dir() {
+    echo "Test $1 FAILED."
+    TESTS_FAILED=$(($TESTS_FAILED+1))
+}
+
+echo "These are the tests for the checkmk program."
+echo
+echo "===================="
+echo "   Test Run Start"
+echo "===================="
+echo
+
+for dir in $TEST_DIRS
+do
+    echo "Running test $dir..."
+    if ( check_dir $dir )
+    then
+        pass_dir $dir
+    else
+        fail_dir $dir
+    fi
+    TESTS_RUN=$(($TESTS_RUN+1))
+    echo
+done
+
+echo "===================="
+echo " Test Run Complete"
+echo "===================="
+echo "Total:  $TESTS_RUN"
+echo "Passed: $TESTS_PASSED"
+echo "Failed: $TESTS_FAILED"
+
+if [ "$TESTS_FAILED" -gt 0 ]
+then
+    echo
+    echo "****************************************"
+    echo "          TEST RUN FAILED!!!!"
+    echo "****************************************"
+    exit 1;
+fi
+echo
diff --git a/checkmk/test/clean_mode/cmd b/checkmk/test/clean_mode/cmd
new file mode 100644 (file)
index 0000000..d88410f
--- /dev/null
@@ -0,0 +1 @@
+checkmk_cmd='"$CHECKMK" clean_mode=1 "$infname" > "$outfname" 2>"$errfname"'
diff --git a/checkmk/test/clean_mode/in b/checkmk/test/clean_mode/in
new file mode 100644 (file)
index 0000000..a296f93
--- /dev/null
@@ -0,0 +1,16 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/clean_mode/x_output b/checkmk/test/clean_mode/x_output
new file mode 100644 (file)
index 0000000..3dff645
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/declarations/in b/checkmk/test/declarations/in
new file mode 100644 (file)
index 0000000..921d7a5
--- /dev/null
@@ -0,0 +1,19 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-pre
+    int declare_me = 0;
diff --git a/checkmk/test/declarations/x_output b/checkmk/test/declarations/x_output
new file mode 100644 (file)
index 0000000..a819ce8
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    /* User-specified pre-run code */
+#line 19
+    int declare_me = 0;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/empty_input/in b/checkmk/test/empty_input/in
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/checkmk/test/empty_input/x_err b/checkmk/test/empty_input/x_err
new file mode 100644 (file)
index 0000000..f55516b
--- /dev/null
@@ -0,0 +1 @@
+checkmk: Expected at least one #test line.
diff --git a/checkmk/test/empty_input/x_output b/checkmk/test/empty_input/x_output
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/checkmk/test/invalid_ucn/in b/checkmk/test/invalid_ucn/in
new file mode 100644 (file)
index 0000000..90a0a5d
--- /dev/null
@@ -0,0 +1,16 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_\u4ECA\u65E5\u306_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/invalid_ucn/x_err b/checkmk/test/invalid_ucn/x_err
new file mode 100644 (file)
index 0000000..78d0160
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 9: Malformed test name "the_\u4ECA\u65E5\u306_test" (must be a C identifier).
diff --git a/checkmk/test/invalid_ucn/x_output b/checkmk/test/invalid_ucn/x_output
new file mode 100644 (file)
index 0000000..f3df163
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
diff --git a/checkmk/test/main_post/in b/checkmk/test/main_post/in
new file mode 100644 (file)
index 0000000..fb1595d
--- /dev/null
@@ -0,0 +1,19 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-post
+    return 0; /* Always report success. */
diff --git a/checkmk/test/main_post/x_output b/checkmk/test/main_post/x_output
new file mode 100644 (file)
index 0000000..2f499f9
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    /* User-specified post-run code */
+#line 19
+    return 0; /* Always report success. */
+}
diff --git a/checkmk/test/main_post_multiple/in b/checkmk/test/main_post_multiple/in
new file mode 100644 (file)
index 0000000..e61ab55
--- /dev/null
@@ -0,0 +1,22 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-post
+    return 0; /* Always report success. */
+
+# main-post
+    return 0; /* We really want success, so we'll specify it twice! */
diff --git a/checkmk/test/main_post_multiple/x_err b/checkmk/test/main_post_multiple/x_err
new file mode 100644 (file)
index 0000000..a0634d9
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 21: main-post specified multiple times.
diff --git a/checkmk/test/main_post_multiple/x_output b/checkmk/test/main_post_multiple/x_output
new file mode 100644 (file)
index 0000000..fc7b9d2
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    /* User-specified post-run code */
+#line 19
+    return 0; /* Always report success. */
+
diff --git a/checkmk/test/main_pre_after_post/in b/checkmk/test/main_pre_after_post/in
new file mode 100644 (file)
index 0000000..b6822fb
--- /dev/null
@@ -0,0 +1,22 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-post
+    return 0; /* Always report success. */
+
+# main-pre
+    int declare_me = 0;
diff --git a/checkmk/test/main_pre_after_post/x_err b/checkmk/test/main_pre_after_post/x_err
new file mode 100644 (file)
index 0000000..a6fc75b
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 21: main-pre specified after main-post.
diff --git a/checkmk/test/main_pre_after_post/x_output b/checkmk/test/main_pre_after_post/x_output
new file mode 100644 (file)
index 0000000..fc7b9d2
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    /* User-specified post-run code */
+#line 19
+    return 0; /* Always report success. */
+
diff --git a/checkmk/test/main_pre_multiple/in b/checkmk/test/main_pre_multiple/in
new file mode 100644 (file)
index 0000000..e7e30da
--- /dev/null
@@ -0,0 +1,22 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-pre
+    int declare_me = 0;
+
+# main-pre
+    int oh_wait_declare_me_too;
diff --git a/checkmk/test/main_pre_multiple/x_err b/checkmk/test/main_pre_multiple/x_err
new file mode 100644 (file)
index 0000000..69c3c02
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 21: main-pre specified multiple times.
diff --git a/checkmk/test/main_pre_multiple/x_output b/checkmk/test/main_pre_multiple/x_output
new file mode 100644 (file)
index 0000000..aa9e38e
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    /* User-specified pre-run code */
+#line 19
+    int declare_me = 0;
+
diff --git a/checkmk/test/multiple_everything/in b/checkmk/test/multiple_everything/in
new file mode 100644 (file)
index 0000000..fbe4518
--- /dev/null
@@ -0,0 +1,47 @@
+/* Multiple everything... */
+
+#include <stdlib.h>
+#include <errno.h>
+#include <stdio.h>
+
+void print_message(const char *msg, size_t msgsz)
+{
+    int nc;
+
+    nc = printf("%s", msg);
+    fail_unless(nc == msgsz, "failed to print completely: %s",
+                strerror(errno));
+}
+
+# suite A Suite
+
+# tcase A Test Case
+
+# test hello_world
+    const char msg[] = "Hello, world!\n";
+    print_message(msg, sizeof msg - 1);
+
+# test neverending_story
+    const char msg[] = "Bastian Balthazar Bux\n";
+    print_message(msg, sizeof msg - 1);
+
+# tcase Another Test Case
+
+# test math_problem
+    fail_unless(1 + 1 == 2, "Something's broken...");
+
+# suite Another Suite
+
+# tcase A Test Case for Another Suite
+
+# test more_math
+    fail_unless(2/2 == 1, "Another weird math result");
+
+# tcase A Basket Case
+
+# test weave
+    int i;
+    const char msg[] = "###\n";
+
+    for (i=0; i != 3; ++i)
+        print_message(row, sizeof row - 1);
diff --git a/checkmk/test/multiple_everything/x_output b/checkmk/test/multiple_everything/x_output
new file mode 100644 (file)
index 0000000..dc24cae
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Multiple everything... */
+
+#include <stdlib.h>
+#include <errno.h>
+#include <stdio.h>
+
+void print_message(const char *msg, size_t msgsz)
+{
+    int nc;
+
+    nc = printf("%s", msg);
+    fail_unless(nc == msgsz, "failed to print completely: %s",
+                strerror(errno));
+}
+
+
+
+START_TEST(hello_world)
+{
+#line 21
+    const char msg[] = "Hello, world!\n";
+    print_message(msg, sizeof msg - 1);
+
+}
+END_TEST
+
+START_TEST(neverending_story)
+{
+#line 25
+    const char msg[] = "Bastian Balthazar Bux\n";
+    print_message(msg, sizeof msg - 1);
+
+}
+END_TEST
+
+START_TEST(math_problem)
+{
+#line 31
+    fail_unless(1 + 1 == 2, "Something's broken...");
+
+}
+END_TEST
+
+
+START_TEST(more_math)
+{
+#line 38
+    fail_unless(2/2 == 1, "Another weird math result");
+
+}
+END_TEST
+
+START_TEST(weave)
+{
+#line 43
+    int i;
+    const char msg[] = "###\n";
+
+    for (i=0; i != 3; ++i)
+        print_message(row, sizeof row - 1);
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("A Suite");
+    TCase *tc1_1 = tcase_create("A Test Case");
+    TCase *tc1_2 = tcase_create("Another Test Case");
+    Suite *s2 = suite_create("Another Suite");
+    TCase *tc2_1 = tcase_create("A Test Case for Another Suite");
+    TCase *tc2_2 = tcase_create("A Basket Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, hello_world);
+    tcase_add_test(tc1_1, neverending_story);
+    suite_add_tcase(s1, tc1_2);
+    tcase_add_test(tc1_2, math_problem);
+    suite_add_tcase(s2, tc2_1);
+    tcase_add_test(tc2_1, more_math);
+    suite_add_tcase(s2, tc2_2);
+    tcase_add_test(tc2_2, weave);
+
+    srunner_add_suite(sr, s2);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/name_enc/cmd b/checkmk/test/name_enc/cmd
new file mode 100644 (file)
index 0000000..70e8dad
--- /dev/null
@@ -0,0 +1 @@
+infname='\aa"'
diff --git a/checkmk/test/name_enc/x_output b/checkmk/test/name_enc/x_output
new file mode 100644 (file)
index 0000000..8492414
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "\aa"" instead.
+ */
+
+#include <check.h>
+
+#line 1 "\\aa\""
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/no_args/cmd b/checkmk/test/no_args/cmd
new file mode 100644 (file)
index 0000000..a84be22
--- /dev/null
@@ -0,0 +1 @@
+checkmk_cmd='"$CHECKMK" < "$infname" > "$outfname" 2>"$errfname"'
diff --git a/checkmk/test/no_args/in b/checkmk/test/no_args/in
new file mode 100644 (file)
index 0000000..b490712
--- /dev/null
@@ -0,0 +1,22 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+#main-pre
+    int fooyah;
+
+#main-post
+    return nf;
diff --git a/checkmk/test/no_args/x_output b/checkmk/test/no_args/x_output
new file mode 100644 (file)
index 0000000..774a5f6
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file (standard input) instead.
+ */
+
+#include <check.h>
+
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    /* User-specified pre-run code */
+    int fooyah;
+
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    /* User-specified post-run code */
+    return nf;
+}
diff --git a/checkmk/test/non_word_chars/in b/checkmk/test/non_word_chars/in
new file mode 100644 (file)
index 0000000..63de648
--- /dev/null
@@ -0,0 +1,16 @@
+/* Non-word characters */
+
+#include <stdio.h>
+
+# suite The Suite (of Test Cases/\TCases)
+
+# tcase The "Test Case"
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/non_word_chars/x_output b/checkmk/test/non_word_chars/x_output
new file mode 100644 (file)
index 0000000..93e0406
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Non-word characters */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite (of Test Cases/\\TCases)");
+    TCase *tc1_1 = tcase_create("The \"Test Case\"");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/not_really_repeated/in b/checkmk/test/not_really_repeated/in
new file mode 100644 (file)
index 0000000..6b5a9fc
--- /dev/null
@@ -0,0 +1,25 @@
+/* Test that repeated suites/tcases are only disallowed when they've
+ * actually been used in defining a test. */
+
+# suite Foo
+
+# tcase Bar
+
+/* But no test... */
+
+# suite Baz
+
+# tcase Quux
+
+# test quuux
+    const char msg[] = "Howdy doody!\n";
+    int nc = printf(msg);
+
+    fail_unless(nc == sizeof msg - 1);
+
+# suite Foo
+
+# tcase Bar
+
+# test huh
+    fail_unless(ALLOWED_AFTER_ALL);
diff --git a/checkmk/test/not_really_repeated/x_output b/checkmk/test/not_really_repeated/x_output
new file mode 100644 (file)
index 0000000..bd9d4f3
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Test that repeated suites/tcases are only disallowed when they've
+ * actually been used in defining a test. */
+
+
+
+#line 8
+/* But no test... */
+
+
+
+START_TEST(quuux)
+{
+#line 15
+    const char msg[] = "Howdy doody!\n";
+    int nc = printf(msg);
+
+    fail_unless(nc == sizeof msg - 1);
+
+}
+END_TEST
+
+
+START_TEST(huh)
+{
+#line 25
+    fail_unless(ALLOWED_AFTER_ALL);
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("Baz");
+    TCase *tc1_1 = tcase_create("Quux");
+    Suite *s2 = suite_create("Foo");
+    TCase *tc2_1 = tcase_create("Bar");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, quuux);
+    suite_add_tcase(s2, tc2_1);
+    tcase_add_test(tc2_1, huh);
+
+    srunner_add_suite(sr, s2);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/num_start_test_name/in b/checkmk/test/num_start_test_name/in
new file mode 100644 (file)
index 0000000..b750e06
--- /dev/null
@@ -0,0 +1,6 @@
+/* Ensure that test names starting with digits are refused. */
+
+# suite The Suite
+# tcase The Test Case
+# test 1nsane
+    fail_if(SANE);
diff --git a/checkmk/test/num_start_test_name/x_err b/checkmk/test/num_start_test_name/x_err
new file mode 100644 (file)
index 0000000..98f81e8
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 5: Malformed test name "1nsane" (must be a C identifier).
diff --git a/checkmk/test/num_start_test_name/x_output b/checkmk/test/num_start_test_name/x_output
new file mode 100644 (file)
index 0000000..eca31fb
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Ensure that test names starting with digits are refused. */
+
diff --git a/checkmk/test/pass_thru/in b/checkmk/test/pass_thru/in
new file mode 100644 (file)
index 0000000..012bc7d
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+ * While a line such as
+ *
+#define MY_VALUE    1
+ *
+ * will be passed; a line such as
+ *
+#suite "Sweet"
+ *
+ * will not be.
+ */
diff --git a/checkmk/test/pass_thru/x_err b/checkmk/test/pass_thru/x_err
new file mode 100644 (file)
index 0000000..f55516b
--- /dev/null
@@ -0,0 +1 @@
+checkmk: Expected at least one #test line.
diff --git a/checkmk/test/pass_thru/x_output b/checkmk/test/pass_thru/x_output
new file mode 100644 (file)
index 0000000..7193998
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/*
+ * While a line such as
+ *
+#define MY_VALUE    1
+ *
+ * will be passed; a line such as
+ *
+#line 9
+ *
+ * will not be.
+ */
diff --git a/checkmk/test/repeated_argument_tests/in b/checkmk/test/repeated_argument_tests/in
new file mode 100644 (file)
index 0000000..07947d4
--- /dev/null
@@ -0,0 +1,10 @@
+/* Fail when tests with identical name are detected */
+
+#test-loop(1,4) test1
+       ck_assert(1 == 1);
+#test-signal(-1) test2
+       ck_assert(1 == 1);
+#suite secondary
+#tcase second
+#test-loop-exit(1, 1, 5) test2
+       ck_assert(1 == 1);
diff --git a/checkmk/test/repeated_argument_tests/x_err b/checkmk/test/repeated_argument_tests/x_err
new file mode 100644 (file)
index 0000000..8f642cb
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 9: Test "test2" already exists.
diff --git a/checkmk/test/repeated_argument_tests/x_output b/checkmk/test/repeated_argument_tests/x_output
new file mode 100644 (file)
index 0000000..671308c
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Fail when tests with identical name are detected */
+
+START_TEST(test1)
+{
+#line 4
+       ck_assert(1 == 1);
+}
+END_TEST
+
+START_TEST(test2)
+{
+#line 6
+       ck_assert(1 == 1);
+}
+END_TEST
diff --git a/checkmk/test/repeated_suites/in b/checkmk/test/repeated_suites/in
new file mode 100644 (file)
index 0000000..c040a29
--- /dev/null
@@ -0,0 +1,10 @@
+/* Don't let suite names repeat. */
+
+# suite Halibut
+
+# tcase Salmon
+
+# test ella
+    fail_if(food_poisoned);
+
+# suite Halibut
diff --git a/checkmk/test/repeated_suites/x_err b/checkmk/test/repeated_suites/x_err
new file mode 100644 (file)
index 0000000..7680dc8
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 10: Suite "Halibut" already exists.
diff --git a/checkmk/test/repeated_suites/x_output b/checkmk/test/repeated_suites/x_output
new file mode 100644 (file)
index 0000000..0946b89
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Don't let suite names repeat. */
+
+
+
+START_TEST(ella)
+{
+#line 8
+    fail_if(food_poisoned);
+
diff --git a/checkmk/test/repeated_tcases/in b/checkmk/test/repeated_tcases/in
new file mode 100644 (file)
index 0000000..eafd237
--- /dev/null
@@ -0,0 +1,12 @@
+/* Don't let test case names repeat. */
+
+# suite Mozart
+
+# tcase Chopin
+
+# test sticks
+    fail_if(DEAD_COMPOSERS);
+
+# suite Rachmaninoff
+
+# tcase Chopin
diff --git a/checkmk/test/repeated_tcases/x_err b/checkmk/test/repeated_tcases/x_err
new file mode 100644 (file)
index 0000000..141eb10
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 12: Test Case "Chopin" already exists.
diff --git a/checkmk/test/repeated_tcases/x_output b/checkmk/test/repeated_tcases/x_output
new file mode 100644 (file)
index 0000000..cc800e8
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Don't let test case names repeat. */
+
+
+
+START_TEST(sticks)
+{
+#line 8
+    fail_if(DEAD_COMPOSERS);
+
+}
+END_TEST
+
diff --git a/checkmk/test/repeated_tests/in b/checkmk/test/repeated_tests/in
new file mode 100644 (file)
index 0000000..1f96ff3
--- /dev/null
@@ -0,0 +1,15 @@
+/* Can't use the same test name multiple times. */
+
+# suite Foo
+
+# tcase Bar
+
+# test repeat
+    fail_if(MISERABLY);
+
+# suite Baz
+
+# tcase Quux
+
+# test repeat
+    fail_if(DONT_TRY_TRY_AGAIN);
diff --git a/checkmk/test/repeated_tests/x_err b/checkmk/test/repeated_tests/x_err
new file mode 100644 (file)
index 0000000..fb9cf50
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 14: Test "repeat" already exists.
diff --git a/checkmk/test/repeated_tests/x_output b/checkmk/test/repeated_tests/x_output
new file mode 100644 (file)
index 0000000..21c1022
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Can't use the same test name multiple times. */
+
+
+
+START_TEST(repeat)
+{
+#line 8
+    fail_if(MISERABLY);
+
+}
+END_TEST
+
+
diff --git a/checkmk/test/single_test_line/in b/checkmk/test/single_test_line/in
new file mode 100644 (file)
index 0000000..b8da8dd
--- /dev/null
@@ -0,0 +1 @@
+# test test_name
diff --git a/checkmk/test/single_test_line/x_output b/checkmk/test/single_test_line/x_output
new file mode 100644 (file)
index 0000000..e335bb6
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+START_TEST(test_name)
+{
+#line 2
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("Core");
+    TCase *tc1_1 = tcase_create("Core");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, test_name);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/tcase_implied_repeat/in b/checkmk/test/tcase_implied_repeat/in
new file mode 100644 (file)
index 0000000..e80a15e
--- /dev/null
@@ -0,0 +1,18 @@
+/* Make sure we catch implied tcase repeats (via same name as suite) */
+
+# suite Lady
+
+# tcase Luck
+
+# test song
+    fail_unless("be a lady tonight");
+
+# suite Luck
+
+/* It's fine for a suite and tcase name to collide...
+   but the suite name implies a tcase name of the same value until we
+   override it. */
+
+# test uh_oh
+    /* Uh-oh! Now we're using the implied tcase Luck, which already
+     * exists! */
diff --git a/checkmk/test/tcase_implied_repeat/x_err b/checkmk/test/tcase_implied_repeat/x_err
new file mode 100644 (file)
index 0000000..cf3724d
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 16: Test Case "Luck" already exists.
diff --git a/checkmk/test/tcase_implied_repeat/x_output b/checkmk/test/tcase_implied_repeat/x_output
new file mode 100644 (file)
index 0000000..a8e1cb7
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* Make sure we catch implied tcase repeats (via same name as suite) */
+
+
+
+START_TEST(song)
+{
+#line 8
+    fail_unless("be a lady tonight");
+
+}
+END_TEST
+
+#line 12
+/* It's fine for a suite and tcase name to collide...
+   but the suite name implies a tcase name of the same value until we
+   override it. */
+
diff --git a/checkmk/test/test_after_main_post/in b/checkmk/test/test_after_main_post/in
new file mode 100644 (file)
index 0000000..d7cad0f
--- /dev/null
@@ -0,0 +1,22 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-post
+    return 0; /* Always report success. */
+
+# test uh_oh
+    fail("Phooey");
diff --git a/checkmk/test/test_after_main_post/x_err b/checkmk/test/test_after_main_post/x_err
new file mode 100644 (file)
index 0000000..fae513c
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 21: Cannot specify tests after main-pre or main-post.
diff --git a/checkmk/test/test_after_main_post/x_output b/checkmk/test/test_after_main_post/x_output
new file mode 100644 (file)
index 0000000..fc7b9d2
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    /* User-specified post-run code */
+#line 19
+    return 0; /* Always report success. */
+
diff --git a/checkmk/test/test_after_main_pre/in b/checkmk/test/test_after_main_pre/in
new file mode 100644 (file)
index 0000000..1bdecfd
--- /dev/null
@@ -0,0 +1,22 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+# main-pre
+    int declare_me = 0;
+
+# test uh_oh
+    fail("Phooey");
diff --git a/checkmk/test/test_after_main_pre/x_err b/checkmk/test/test_after_main_pre/x_err
new file mode 100644 (file)
index 0000000..fae513c
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 21: Cannot specify tests after main-pre or main-post.
diff --git a/checkmk/test/test_after_main_pre/x_output b/checkmk/test/test_after_main_pre/x_output
new file mode 100644 (file)
index 0000000..aa9e38e
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    /* User-specified pre-run code */
+#line 19
+    int declare_me = 0;
+
diff --git a/checkmk/test/test_chars/in b/checkmk/test/test_chars/in
new file mode 100644 (file)
index 0000000..6405228
--- /dev/null
@@ -0,0 +1,8 @@
+/* tests shouldn't allow non-identifier characters. */
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test test@me
+    fail_if(GOT_HERE);
diff --git a/checkmk/test/test_chars/x_err b/checkmk/test/test_chars/x_err
new file mode 100644 (file)
index 0000000..4660d56
--- /dev/null
@@ -0,0 +1 @@
+checkmk: in line 7: Malformed test name "test@me" (must be a C identifier).
diff --git a/checkmk/test/test_chars/x_output b/checkmk/test/test_chars/x_output
new file mode 100644 (file)
index 0000000..a84be49
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* tests shouldn't allow non-identifier characters. */
+
+
+
diff --git a/checkmk/test/trailing_ws/in b/checkmk/test/trailing_ws/in
new file mode 100644 (file)
index 0000000..ac6df5d
--- /dev/null
@@ -0,0 +1,16 @@
+/* A complete test example (with trailing whitespace) */
+
+#include <stdio.h>
+
+# suite The Suite   
+
+# tcase The Test Case  
+
+# test  the_test    
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/trailing_ws/x_output b/checkmk/test/trailing_ws/x_output
new file mode 100644 (file)
index 0000000..7822e90
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example (with trailing whitespace) */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/checkmk/test/ucn/in b/checkmk/test/ucn/in
new file mode 100644 (file)
index 0000000..565f6b0
--- /dev/null
@@ -0,0 +1,16 @@
+/* A complete test example */
+
+#include <stdio.h>
+
+# suite The Suite
+
+# tcase The Test Case
+
+# test  the_\u4ECA\u65E5\u306F_test
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
diff --git a/checkmk/test/ucn/x_output b/checkmk/test/ucn/x_output
new file mode 100644 (file)
index 0000000..3092d0a
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * DO NOT EDIT THIS FILE. Generated by checkmk.
+ * Edit the original source file "in" instead.
+ */
+
+#include <check.h>
+
+#line 1 "in"
+/* A complete test example */
+
+#include <stdio.h>
+
+
+
+START_TEST(the_\u4ECA\u65E5\u306F_test)
+{
+#line 10
+    int nc;
+    const char msg[] = "\n\n    Hello, world!\n";
+
+    nc = printf("%s", msg);
+    fail_unless(nc == (sizeof msg
+                                  - 1) /* for terminating NUL. */
+    );
+}
+END_TEST
+
+int main(void)
+{
+    Suite *s1 = suite_create("The Suite");
+    TCase *tc1_1 = tcase_create("The Test Case");
+    SRunner *sr = srunner_create(s1);
+    int nf;
+
+    suite_add_tcase(s1, tc1_1);
+    tcase_add_test(tc1_1, the_\u4ECA\u65E5\u306F_test);
+
+    srunner_run_all(sr, CK_ENV);
+    nf = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return nf == 0 ? 0 : 1;
+}
diff --git a/cmake/CheckHeaderDirent.cmake b/cmake/CheckHeaderDirent.cmake
new file mode 100644 (file)
index 0000000..e9a7ea8
--- /dev/null
@@ -0,0 +1,32 @@
+# - Check if the system has the specified type
+# CHECK_HEADER_DIRENT (HEADER1 HEARDER2 ...)
+#
+#  HEADER - the header(s) where the prototype should be declared
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
+#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+#  CMAKE_REQUIRED_INCLUDES = list of include directories
+# Copyright (c) 2009, Michihiro NAKAJIMA
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+INCLUDE(CheckTypeExists)
+
+MACRO (CHECK_HEADER_DIRENT)
+  CHECK_TYPE_EXISTS("DIR *" dirent.h     HAVE_DIRENT_H)
+  IF(NOT HAVE_DIRENT_H)
+    CHECK_TYPE_EXISTS("DIR *" sys/ndir.h  HAVE_SYS_NDIR_H)
+    IF(NOT HAVE_SYS_NDIR_H)
+      CHECK_TYPE_EXISTS("DIR *" ndir.h      HAVE_NDIR_H)
+      IF(NOT HAVE_NDIR_H)
+        CHECK_TYPE_EXISTS("DIR *" sys/dir.h   HAVE_SYS_DIR_H)
+      ENDIF(NOT HAVE_NDIR_H)
+    ENDIF(NOT HAVE_SYS_NDIR_H)
+  ENDIF(NOT HAVE_DIRENT_H)
+ENDMACRO (CHECK_HEADER_DIRENT)
+
diff --git a/cmake/CheckStructMember.cmake b/cmake/CheckStructMember.cmake
new file mode 100644 (file)
index 0000000..05ddb3a
--- /dev/null
@@ -0,0 +1,43 @@
+# - Check if the given struct or class has the specified member variable
+# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)
+#
+#  STRUCT - the name of the struct or class you are interested in
+#  MEMBER - the member which existence you want to check
+#  HEADER - the header(s) where the prototype should be declared
+#  VARIABLE - variable to store the result
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
+#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+#  CMAKE_REQUIRED_INCLUDES = list of include directories
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+INCLUDE(CheckCSourceCompiles)
+
+MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
+   SET(_INCLUDE_FILES)
+   FOREACH (it ${_HEADER})
+      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+   ENDFOREACH (it)
+
+   SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
+${_INCLUDE_FILES}
+int main()
+{
+   static ${_STRUCT} tmp;
+   if (sizeof(tmp.${_MEMBER}))
+      return 0;
+  return 0;
+}
+")
+   CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
+
+ENDMACRO (CHECK_STRUCT_MEMBER)
+
diff --git a/cmake/CheckTypeExists.cmake b/cmake/CheckTypeExists.cmake
new file mode 100644 (file)
index 0000000..b05234f
--- /dev/null
@@ -0,0 +1,42 @@
+# - Check if the system has the specified type
+# CHECK_TYPE_EXISTS (TYPE HEADER VARIABLE)
+#
+#  TYPE - the name of the type or struct or class you are interested in
+#  HEADER - the header(s) where the prototype should be declared
+#  VARIABLE - variable to store the result
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
+#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+#  CMAKE_REQUIRED_INCLUDES = list of include directories
+# Copyright (c) 2009, Michihiro NAKAJIMA
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+INCLUDE(CheckCSourceCompiles)
+
+MACRO (CHECK_TYPE_EXISTS _TYPE _HEADER _RESULT)
+   SET(_INCLUDE_FILES)
+   FOREACH (it ${_HEADER})
+      SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+   ENDFOREACH (it)
+
+   SET(_CHECK_TYPE_EXISTS_SOURCE_CODE "
+${_INCLUDE_FILES}
+int main()
+{
+   static ${_TYPE} tmp;
+   if (sizeof(tmp))
+      return 0;
+  return 0;
+}
+")
+   CHECK_C_SOURCE_COMPILES("${_CHECK_TYPE_EXISTS_SOURCE_CODE}" ${_RESULT})
+
+ENDMACRO (CHECK_TYPE_EXISTS)
+
diff --git a/cmake/check_stdint.h.in b/cmake/check_stdint.h.in
new file mode 100644 (file)
index 0000000..ab467c1
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _CHECK_CHECK_STDINT_H
+#define _CHECK_CHECK_STDINT_H 1
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
diff --git a/cmake/config.h.in b/cmake/config.h.in
new file mode 100644 (file)
index 0000000..aaa447f
--- /dev/null
@@ -0,0 +1,410 @@
+/*-*- mode:C; -*- */
+/* config.h.  Generated from build/cmake/config.h.in by cmake configure */
+/*
+ * Check: a unit test framework for C
+ *
+ * Copyright (C) 2011 Mateusz Loskot
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if defined(__osf__)
+# define _OSF_SOURCE
+#endif
+
+/*
+ * Ensure we have C99-style int64_t, etc, all defined.
+ */
+
+/* First, we need to know if the system has already defined them. */
+#cmakedefine HAVE_INT16_T
+#cmakedefine HAVE_INT32_T
+#cmakedefine HAVE_INT64_T
+#cmakedefine HAVE_INTMAX_T
+
+#cmakedefine HAVE_UINT8_T
+#cmakedefine HAVE_UINT16_T
+#cmakedefine HAVE_UINT32_T
+#cmakedefine HAVE_UINT64_T
+#cmakedefine HAVE_UINTMAX_T
+
+/* We might have the types we want under other spellings. */
+#cmakedefine HAVE___INT64
+#cmakedefine HAVE_U_INT64_T
+#cmakedefine HAVE_UNSIGNED___INT64
+
+/* The sizes of various standard integer types. */
+@SIZE_OF_SHORT_CODE@
+@SIZE_OF_INT_CODE@
+@SIZE_OF_LONG_CODE@
+@SIZE_OF_LONG_LONG_CODE@
+@SIZE_OF_UNSIGNED_SHORT_CODE@
+@SIZE_OF_UNSIGNED_CODE@
+@SIZE_OF_UNSIGNED_LONG_CODE@
+@SIZE_OF_UNSIGNED_LONG_LONG_CODE@
+
+/*
+ * If we lack int64_t, define it to the first of __int64, int, long, and long long
+ * that exists and is the right size.
+ */
+#if !defined(HAVE_INT64_T) && defined(HAVE___INT64)
+typedef __int64 int64_t;
+#define HAVE_INT64_T
+#endif
+
+#if !defined(HAVE_INT64_T) && SIZE_OF_INT == 8
+typedef int int64_t;
+#define HAVE_INT64_T
+#endif
+
+#if !defined(HAVE_INT64_T) && SIZE_OF_LONG == 8
+typedef long int64_t;
+#define HAVE_INT64_T
+#endif
+
+#if !defined(HAVE_INT64_T) && SIZE_OF_LONG_LONG == 8
+typedef long long int64_t;
+#define HAVE_INT64_T
+#endif
+
+#if !defined(HAVE_INT64_T)
+#error No 64-bit integer type was found.
+#endif
+
+/*
+ * Similarly for int32_t
+ */
+#if !defined(HAVE_INT32_T) && SIZE_OF_INT == 4
+typedef long int32_t;
+#define HAVE_INT32_T
+#endif
+
+#if !defined(HAVE_INT32_T) && SIZE_OF_LONG == 4
+typedef long int32_t;
+#define HAVE_INT32_T
+#endif
+
+#if !defined(HAVE_INT32_T)
+#error No 32-bit integer type was found.
+#endif
+
+/*
+ * Similarly for int16_t
+ */
+#if !defined(HAVE_INT16_T) && SIZE_OF_INT == 2
+typedef int int16_t;
+#define HAVE_INT16_T
+#endif
+
+#if !defined(HAVE_INT16_T) && SIZE_OF_SHORT == 2
+typedef short int16_t;
+#define HAVE_INT16_T
+#endif
+
+#if !defined(HAVE_INT16_T)
+#error No 16-bit integer type was found.
+#endif
+
+/*
+ * Similarly for uint64_t
+ */
+#if !defined(HAVE_UINT64_T) && defined(HAVE_UNSIGNED___INT64)
+typedef unsigned __int64 uint64_t;
+#define HAVE_UINT64_T
+#endif
+
+#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED == 8
+typedef unsigned uint64_t;
+#define HAVE_UINT64_T
+#endif
+
+#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG == 8
+typedef unsigned long uint64_t;
+#define HAVE_UINT64_T
+#endif
+
+#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG_LONG == 8
+typedef unsigned long long uint64_t;
+#define HAVE_UINT64_T
+#endif
+
+#if !defined(HAVE_UINT64_T)
+#error No 64-bit unsigned integer type was found.
+#endif
+
+
+/*
+ * Similarly for uint32_t
+ */
+#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED == 4
+typedef unsigned uint32_t;
+#define HAVE_UINT32_T
+#endif
+
+#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED_LONG == 4
+typedef unsigned long uint32_t;
+#define HAVE_UINT32_T
+#endif
+
+#if !defined(HAVE_UINT32_T)
+#error No 32-bit unsigned integer type was found.
+#endif
+
+/*
+ * Similarly for uint16_t
+ */
+#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED == 2
+typedef unsigned uint16_t;
+#define HAVE_UINT16_T
+#endif
+
+#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED_SHORT == 2
+typedef unsigned short uint16_t;
+#define HAVE_UINT16_T
+#endif
+
+#if !defined(HAVE_UINT16_T)
+#error No 16-bit unsigned integer type was found.
+#endif
+
+/*
+ * Similarly for uint8_t
+ */
+#if !defined(HAVE_UINT8_T)
+typedef unsigned char uint8_t;
+#define HAVE_UINT8_T
+#endif
+
+#if !defined(HAVE_UINT16_T)
+#error No 8-bit unsigned integer type was found.
+#endif
+
+/* Define intmax_t and uintmax_t if they are not already defined. */
+#if !defined(HAVE_INTMAX_T)
+typedef int64_t intmax_t;
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#endif
+
+#if !defined(HAVE_UINTMAX_T)
+typedef uint64_t uintmax_t;
+#endif
+
+/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_INT64_MAX 1
+
+/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_INT64_MIN 1
+
+/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_SIZE_MAX 1
+
+/* Define to 1 if you have the declaration of `SSIZE_MAX', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_SSIZE_MAX 1
+
+/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_UINT32_MAX 1
+
+/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you
+   don't. */
+#cmakedefine HAVE_DECL_UINT64_MAX 1
+
+/* Define to 1 if you have the <errno.h> header file. */
+#cmakedefine HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the `fork' function. */
+#cmakedefine HAVE_FORK 1
+
+/* Define to 1 if you have the `getpid' function. */
+#cmakedefine HAVE_GETPID 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#cmakedefine HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#cmakedefine HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#cmakedefine HAVE_DECL_LOCALTIME_R 1
+
+/* Define to 1 if you have the `localtime_s' function. */
+#cmakedefine HAVE_LOCALTIME_S 1
+
+/* Define to 1 if the system has the type `long long int'. */
+#cmakedefine HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `malloc' function. */
+#cmakedefine HAVE_MALLOC 1
+
+/* Define to 1 if you have the `realloc' function. */
+#cmakedefine HAVE_REALLOC 1
+
+/* Define to 1 if you have the `setenv' function. */
+#cmakedefine HAVE_DECL_SETENV 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#cmakedefine HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the 'sigaction' function. */
+#cmakedefine HAVE_SIGACTION 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#cmakedefine HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strdup' function. */
+#cmakedefine HAVE_DECL_STRDUP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strsignal' function. */
+#cmakedefine HAVE_DECL_STRSIGNAL 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#cmakedefine HAVE_TIME_H 1
+
+/* Define to 1 if the system has the type `unsigned long long'. */
+#cmakedefine HAVE_UNSIGNED_LONG_LONG 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#cmakedefine HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 if the system has the type `wchar_t'. */
+#cmakedefine HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the `_getpid' function. */
+#cmakedefine HAVE__GETPID 1
+
+/* Define to 1 if you have the `_localtime64_s' function. */
+#cmakedefine HAVE__LOCALTIME64_S 1
+
+/* Define to 1 if you have the `_strdup' function. */
+#cmakedefine HAVE__STRDUP 1
+
+/* Version number of Check */
+#cmakedefine CHECK_VERSION "${CHECK_MAJOR_VERSION}.${CHECK_MINOR_VERSION}.${CHECK_MICRO_VERSION}"
+
+/* The size of `wchar_t', as computed by sizeof. */
+#cmakedefine SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T}
+
+/* Define to 1 if strerror_r returns char *. */
+#cmakedefine STRERROR_R_CHAR_P 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#cmakedefine TIME_WITH_SYS_TIME 1
+
+/*
+ * Some platform requires a macro to use extension functions.
+ */
+#cmakedefine SAFE_TO_DEFINE_EXTENSIONS 1
+#ifdef SAFE_TO_DEFINE_EXTENSIONS
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+#endif /* SAFE_TO_DEFINE_EXTENSIONS */
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#cmakedefine _FILE_OFFSET_BITS ${_FILE_OFFSET_BITS}
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#cmakedefine _LARGEFILE_SOURCE 1
+
+/* Define for large files, on AIX-style hosts. */
+#cmakedefine _LARGE_FILES ${_LARGE_FILES}
+
+/* Define for Windows to use Windows 2000+ APIs. */
+#cmakedefine _WIN32_WINNT ${_WIN32_WINNT}
+#cmakedefine WINVER ${WINVER}
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#cmakedefine const ${const}
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine clockid_t ${clockid_t}
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine gid_t ${gid_t}
+
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+#cmakedefine id_t ${id_t}
+
+/* Define to `int' if <sys/types.h> does not define. */
+#cmakedefine mode_t ${mode_t}
+
+/* Define to `long long' if <sys/types.h> does not define. */
+#cmakedefine off_t ${off_t}
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine pid_t ${pid_t}
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#cmakedefine size_t ${size_t}
+
+/* Define to `int' if <sys/types.h> does not define. */
+#cmakedefine ssize_t ${ssize_t}
+
+/* Define to `int' if <sys/types.h> does not define. */
+#cmakedefine timer_t ${timer_t}
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine uid_t ${uid_t}
+
+/* Define to `int' if <sys/types.h> does not define. */
+#cmakedefine intptr_t ${intptr_t}
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#cmakedefine uintptr_t ${uintptr_t}
diff --git a/compile b/compile
new file mode 100755 (executable)
index 0000000..a85b723
--- /dev/null
+++ b/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""       $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv/,$2, in
+       *,$file_conv,*)
+         ;;
+       mingw/*)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin/*)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine/*)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+       -o)
+         # configure might choose to run compile as 'compile cc -o foo foo.c'.
+         eat=1
+         case $2 in
+           *.o | *.[oO][bB][jJ])
+             func_file_conv "$2"
+             set x "$@" -Fo"$file"
+             shift
+             ;;
+           *)
+             func_file_conv "$2"
+             set x "$@" -Fe"$file"
+             shift
+             ;;
+         esac
+         ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -I*)
+         func_file_conv "${1#-I}" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -l*)
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
+       -L*)
+         func_cl_dashL "${1#-L}"
+         ;;
+       -static)
+         shared=false
+         ;;
+       -Wl,*)
+         arg=${1#-Wl,}
+         save_ifs="$IFS"; IFS=','
+         for flag in $arg; do
+           IFS="$save_ifs"
+           linker_opts="$linker_opts $flag"
+         done
+         IFS="$save_ifs"
+         ;;
+       -Xlinker)
+         eat=1
+         linker_opts="$linker_opts $2"
+         ;;
+       -*)
+         set x "$@" "$1"
+         shift
+         ;;
+       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+         func_file_conv "$1"
+         set x "$@" -Tp"$file"
+         shift
+         ;;
+       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+         func_file_conv "$1" mingw
+         set x "$@" "$file"
+         shift
+         ;;
+       *)
+         set x "$@" "$1"
+         shift
+         ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+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 <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+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 's|^.*[\\/]||; s|^[a-zA-Z]:||; 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
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
similarity index 72%
rename from build-aux/config.guess
rename to config.guess
index f32079a..1659250 100755 (executable)
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2008-01-23'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2008-01-23'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches@gnu.org>.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
        # switched to ELF, *-*-netbsd* would select the old
        # object file format.  This provides both forward
@@ -154,23 +168,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # Note: NetBSD doesn't particularly care about the vendor
        # portion of the name.  We always set it to "unknown".
        sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+           /sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || \
+           echo unknown)`
        case "${UNAME_MACHINE_ARCH}" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
+           earmv*)
+               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+               machine=${arch}${endian}-unknown
+               ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
        # to ELF recently, or will in the future.
        case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+           arm*|earm*|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
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -180,7 +201,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                fi
                ;;
            *)
-               os=netbsd
+               os=netbsd
+               ;;
+       esac
+       # Determine ABI tags.
+       case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
                ;;
        esac
        # The OS release
@@ -193,13 +221,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                release='-gnu'
                ;;
            *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
                ;;
        esac
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
+       echo "${machine}-${os}${release}${abi}"
+       exit ;;
+    *:Bitrig:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
        exit ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
@@ -217,13 +249,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
        exit ;;
+    *:Sortix:*:*)
+       echo ${UNAME_MACHINE}-unknown-sortix
+       exit ;;
     alpha:OSF1:*:*)
        case $UNAME_RELEASE in
        *4.0)
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                ;;
        *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
                ;;
        esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +304,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # 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 ;;
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # Should we change UNAME_MACHINE based on the output of uname instead
@@ -295,12 +333,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo s390-ibm-zvmoe
        exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+       echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
        echo arm-unknown-riscos
        exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -324,14 +362,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
     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:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -375,23 +432,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+       exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
     m68k:machten:*:*)
        echo m68k-apple-machten${UNAME_RELEASE}
        exit ;;
@@ -461,8 +518,8 @@ EOF
        echo m88k-motorola-sysv3
        exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       # DG/UX returns AViiON for all architectures
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
        then
            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -475,7 +532,7 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
        exit ;;
@@ -532,15 +589,16 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
+       if [ -x /usr/bin/lslpp ] ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
@@ -575,52 +633,52 @@ EOF
            9000/[678][0-9][0-9])
                if [ -x /usr/bin/getconf ]; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+                   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
+                       esac ;;
+                   esac
                fi
                if [ "${HP_ARCH}" = "" ]; then
                    eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
+                   sed 's/^            //' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+               int main ()
+               {
+               #if defined(_SC_KERNEL_BITS)
+                   long bits = sysconf(_SC_KERNEL_BITS);
+               #endif
+                   long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
+                   switch (cpu)
+                       {
+                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+                       case CPU_PA_RISC2_0:
+               #if defined(_SC_KERNEL_BITS)
+                           switch (bits)
+                               {
+                               case 64: puts ("hppa2.0w"); break;
+                               case 32: puts ("hppa2.0n"); break;
+                               default: puts ("hppa2.0"); break;
+                               } break;
+               #else  /* !defined(_SC_KERNEL_BITS) */
+                           puts ("hppa2.0"); break;
+               #endif
+                       default: puts ("hppa1.0"); break;
+                       }
+                   exit (0);
+               }
 EOF
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -640,7 +698,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -711,22 +769,22 @@ EOF
        exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+       exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+       exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+       exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+       exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+       exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
@@ -750,14 +808,14 @@ EOF
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -769,34 +827,39 @@ EOF
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit ;;
     *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       case ${UNAME_PROCESSOR} in
            amd64)
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
            *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
        esac
        exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
+    *:MINGW64*:*)
+       echo ${UNAME_MACHINE}-pc-mingw64
+       exit ;;
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
+    *:MSYS*:*)
+       echo ${UNAME_MACHINE}-pc-msys
+       exit ;;
     i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
        exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
-       case ${UNAME_MACHINE} in
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -806,6 +869,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-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
@@ -826,210 +892,160 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    aarch64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    aarch64_be:Linux:*:*)
+       UNAME_MACHINE=aarch64_be
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         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 -q ld.so.1
+       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        else
-           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+           else
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+           fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+       exit ;;
+    e2k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    hexagon:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    i*86:Linux:*:*)
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    mips:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips
-       #undef mipsel
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
+       CPU=${UNAME_MACHINE}
        #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; }
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; 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
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-${LIBC}
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+    or32:Linux:*:* | or1k*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-${LIBC}
        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}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-${LIBC}
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-${LIBC}
+       exit ;;
+    ppc64le:Linux:*:*)
+       echo powerpc64le-unknown-linux-${LIBC}
+       exit ;;
+    ppcle:Linux:*:*)
+       echo powerpcle-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    i*86: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 <features.h>
-       #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
@@ -1037,11 +1053,11 @@ EOF
        echo i386-sequent-sysv4
        exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+       # Unixware is an offshoot of SVR4, but it has its own version
+       # number series starting with 2...
+       # I am not positive that other SVR4 systems won't match this,
        # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+       # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit ;;
     i*86:OS/2:*:*)
@@ -1058,7 +1074,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1073,7 +1089,7 @@ EOF
        fi
        exit ;;
     i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
@@ -1101,10 +1117,13 @@ EOF
        exit ;;
     pc:*:*:*)
        # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit ;;
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
+       exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit ;;
@@ -1139,8 +1158,18 @@ EOF
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && 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; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1153,7 +1182,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1173,10 +1202,10 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+       echo i586-unisys-sysv4
+       exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
@@ -1202,11 +1231,11 @@ EOF
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv${UNAME_RELEASE}
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+       exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit ;;
@@ -1216,6 +1245,12 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    x86_64:Haiku:*:*)
+       echo x86_64-unknown-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1242,9 +1277,31 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
+           fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1258,7 +1315,10 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1303,13 +1363,13 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+       echo mips-sei-seiux${UNAME_RELEASE}
        exit ;;
     *:DragonFly:*:*)
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;
     *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
        case "${UNAME_MACHINE}" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
@@ -1324,158 +1384,13 @@ EOF
     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 <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#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 <sys/param.h>
-  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 <sys/param.h>
-#  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
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
        exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
+    x86_64:VMkernel:*:*)
+       echo ${UNAME_MACHINE}-unknown-esx
        exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
+esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
index 99772be..be615cc 100644 (file)
@@ -1,32 +1,41 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* "Regular expressions are supported and enabled" */
+#undef ENABLE_REGEX
+
 /* Subunit protocol result output */
 #undef ENABLE_SUBUNIT
 
-/* Define to 1 if you have the declaration of `fileno', and to 0 if you don't.
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
    */
-#undef HAVE_DECL_FILENO
+#undef HAVE_DECL_ALARM
 
-/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you
+/* Define to 1 if you have the declaration of `clock_gettime', and to 0 if you
    don't. */
-#undef HAVE_DECL_LOCALTIME_R
+#undef HAVE_DECL_CLOCK_GETTIME
 
-/* Define to 1 if you have the declaration of `pipe', and to 0 if you don't.
-   */
-#undef HAVE_DECL_PIPE
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLINE
 
-/* Define to 1 if you have the declaration of `putenv', and to 0 if you don't.
-   */
-#undef HAVE_DECL_PUTENV
+/* Define to 1 if you have the declaration of `gettimeofday', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETTIMEOFDAY
+
+/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_LOCALTIME_R
 
 /* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
    */
 #undef HAVE_DECL_SETENV
 
-/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
-   */
-#undef HAVE_DECL_SLEEP
-
 /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
    */
 #undef HAVE_DECL_STRDUP
    don't. */
 #undef HAVE_DECL_STRSIGNAL
 
-/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you
+/* Define to 1 if you have the declaration of `timer_create', and to 0 if you
    don't. */
-#undef HAVE_DECL_UNSETENV
+#undef HAVE_DECL_TIMER_CREATE
+
+/* Define to 1 if you have the declaration of `timer_delete', and to 0 if you
+   don't. */
+#undef HAVE_DECL_TIMER_DELETE
+
+/* Define to 1 if you have the declaration of `timer_settime', and to 0 if you
+   don't. */
+#undef HAVE_DECL_TIMER_SETTIME
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define to 1 if you have the `fileno' function. */
-#undef HAVE_FILENO
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if you have the `getline' function. */
+#undef HAVE_GETLINE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if the system has the type `intmax_t'. */
+#undef HAVE_INTMAX_T
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the `subunit' library (-lsubunit). */
-#undef HAVE_LIBSUBUNIT
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+#undef HAVE_LIBRT
+
+/* Define to 1 if you have the `localeconv' function. */
+#undef HAVE_LOCALECONV
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
 
 /* Define to 1 if you have the `localtime_r' function. */
 #undef HAVE_LOCALTIME_R
 
+/* Define to 1 if the system has the type `long double'. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the system has the type 'long long int'. */
+#undef HAVE_LONG_LONG_INT
+
 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
    to 0 otherwise. */
 #undef HAVE_MALLOC
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define to 1 if you have the `pipe' function. */
-#undef HAVE_PIPE
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
 
 /* Define if you have POSIX threads libraries and header files. */
 #undef HAVE_PTHREAD
 
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#undef HAVE_PTRDIFF_T
 
 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
    and to 0 otherwise. */
 #undef HAVE_REALLOC
 
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
+/* Define to 1 if you have the `regcomp' function. */
+#undef HAVE_REGCOMP
+
+/* "Regular expressions are supported" */
+#undef HAVE_REGEX
+
+/* Define to 1 if you have the `regexec' function. */
+#undef HAVE_REGEXEC
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if you have the `setitimer' function. */
+#undef HAVE_SETITIMER
 
-/* Define to 1 if you have the `sleep' function. */
-#undef HAVE_SLEEP
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have a C99 compliant 'snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
 
 /* Define to 1 if you have the <stddef.h> header file. */
 #undef HAVE_STDDEF_H
 /* Define to 1 if you have the `strsignal' function. */
 #undef HAVE_STRSIGNAL
 
+/* Define to 1 if `it_interval' is a member of `struct itimerspec'. */
+#undef HAVE_STRUCT_ITIMERSPEC_IT_INTERVAL
+
+/* Define to 1 if `it_value' is a member of `struct itimerspec'. */
+#undef HAVE_STRUCT_ITIMERSPEC_IT_VALUE
+
+/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
+
+/* Define to 1 if `thousands_sep' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_THOUSANDS_SEP
+
+/* Define to 1 if `tv_nsec' is a member of `struct timespec'. */
+#undef HAVE_STRUCT_TIMESPEC_TV_NSEC
+
+/* Define to 1 if `tv_sec' is a member of `struct timespec'. */
+#undef HAVE_STRUCT_TIMESPEC_TV_SEC
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
 #undef HAVE_SYS_WAIT_H
 
+/* Define to 1 if you have the `timer_create' function. */
+#undef HAVE_TIMER_CREATE
+
+/* Define to 1 if you have the `timer_delete' function. */
+#undef HAVE_TIMER_DELETE
+
+/* Define to 1 if you have the `timer_settime' function. */
+#undef HAVE_TIMER_SETTIME
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if the system has the type `uintmax_t'. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#undef HAVE_UINTPTR_T
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if you have the `unsetenv' function. */
-#undef HAVE_UNSETENV
+/* Define to 1 if the system has the type 'unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
+/* Define to 1 if you have a C99 compliant 'vsnprintf' function. */
+#undef HAVE_VSNPRINTF
 
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
 
 /* Name of package */
 #undef PACKAGE
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
    your system. */
 #undef PTHREAD_CREATE_JOINABLE
 
+/* The size of `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
 /* The size of `int', as computed by sizeof. */
 #undef SIZEOF_INT
 
 /* The size of `short', as computed by sizeof. */
 #undef SIZEOF_SHORT
 
+/* The size of `void*', as computed by sizeof. */
+#undef SIZEOF_VOIDP
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* "Need to define the itimerspec structure" */
+#undef STRUCT_ITIMERSPEC_DEFINITION_MISSING
+
+/* "Need to define the timespec structure" */
+#undef STRUCT_TIMESPEC_DEFINITION_MISSING
+
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #undef TIME_WITH_SYS_TIME
 
 /* Define to 1 if you need to in order for `stat' and other things to work. */
 #undef _POSIX_SOURCE
 
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* clockid_t */
+#undef clockid_t
+
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
+/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
+   not define. */
+#undef intmax_t
+
 /* Define to rpl_malloc if the replacement function should be used. */
 #undef malloc
 
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
+
+/* Define to rpl_snprintf if the replacement function should be used. */
+#undef snprintf
+
+/* timer_t */
+#undef timer_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
+   do not define. */
+#undef uintmax_t
+
+/* Define to the type of an unsigned integer type wide enough to hold a
+   pointer, if such a type exists, and if the system does not define it. */
+#undef uintptr_t
+
+/* Define to rpl_vsnprintf if the replacement function should be used. */
+#undef vsnprintf
similarity index 82%
rename from build-aux/config.sub
rename to config.sub
index 6759825..1acc966 100755 (executable)
@@ -1,44 +1,40 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2008-01-16'
+timestamp='2015-08-20'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Please send patches to <config-patches@gnu.org>.
 #
 # 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.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # 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.
@@ -72,8 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,12 +115,18 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -148,10 +149,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze*)
                os=
                basic_machine=$1
                ;;
+       -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -166,10 +170,10 @@ case $os in
                os=-chorusos
                basic_machine=$1
                ;;
-       -chorusrdb)
-               os=-chorusrdb
+       -chorusrdb)
+               os=-chorusrdb
                basic_machine=$1
-               ;;
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -214,6 +218,12 @@ case $os in
        -isc*)
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
+       -lynx*178)
+               os=-lynxos178
+               ;;
+       -lynx*5)
+               os=-lynxos5
+               ;;
        -lynx*)
                os=-lynxos
                ;;
@@ -238,59 +248,91 @@ case $basic_machine in
        # Some are omitted here because they have special meanings below.
        1750a | 580 \
        | a29k \
+       | aarch64 | aarch64_be \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | arc | arceb \
+       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+       | avr | avr32 \
+       | ba \
+       | be32 | be64 \
        | bfin \
-       | c4x | clipper \
+       | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | fido | fr30 | frv \
+       | e2k | epiphany \
+       | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
+       | le32 | le64 \
+       | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep \
+       | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
        | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa32r6 | mipsisa32r6el \
        | mipsisa64 | mipsisa64el \
        | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64r6 | mipsisa64r6el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | moxie \
        | mt \
        | msp430 \
-       | nios | nios2 \
+       | nds32 | nds32le | nds32be \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | or32 \
+       | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
+       | riscv32 | riscv64 \
+       | rl78 | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
+       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+       | visium \
        | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | x86 | xc16x | xstormy16 | xtensa \
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       leon|leon[3-9])
+               basic_machine=sparc-$basic_machine
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -300,6 +342,21 @@ case $basic_machine in
                basic_machine=mt-unknown
                ;;
 
+       strongarm | thumb | xscale)
+               basic_machine=arm-unknown
+               ;;
+       xgate)
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       xscaleeb)
+               basic_machine=armeb-unknown
+               ;;
+
+       xscaleel)
+               basic_machine=armel-unknown
+               ;;
+
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
@@ -314,64 +371,85 @@ case $basic_machine in
        # Recognize the basic CPU types with company name.
        580-* \
        | a29k-* \
+       | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | ba-* \
+       | be32-* | be64-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
+       | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
+       | e2k-* | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
+       | le32-* | le64-* \
+       | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | microblaze-* | microblazeel-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
        | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa32r6-* | mipsisa32r6el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64r6-* | mipsisa64r6el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
-       | nios-* | nios2-* \
+       | nds32-* | nds32le-* | nds32be-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
+       | open8-* \
+       | or1k*-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | riscv32-* | riscv64-* \
+       | rl78-* | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+       | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile*-* \
        | tron-* \
-       | v850-* | v850e-* | vax-* \
+       | ubicom32-* \
+       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+       | vax-* \
+       | visium-* \
        | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
                ;;
        # Recognize the basic CPU types without company name, with glob match.
        xtensa*)
@@ -393,7 +471,7 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
-       abacus)
+       abacus)
                basic_machine=abacus-unknown
                ;;
        adobe68k)
@@ -439,6 +517,13 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
+        asmjs)
+               basic_machine=asmjs-unknown
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -455,10 +540,27 @@ case $basic_machine in
                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
                os=-linux
                ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
+       cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -487,7 +589,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -526,6 +628,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -641,7 +747,6 @@ case $basic_machine in
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
                ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
@@ -680,6 +785,9 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       leon-*|leon[3-9]-*)
+               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+               ;;
        m68knommu)
                basic_machine=m68k-unknown
                os=-linux
@@ -699,8 +807,15 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+       microblaze*)
+               basic_machine=microblaze-xilinx
+               ;;
+       mingw64)
+               basic_machine=x86_64-pc
+               os=-mingw64
+               ;;
        mingw32)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-mingw32
                ;;
        mingw32ce)
@@ -728,6 +843,10 @@ case $basic_machine in
                basic_machine=powerpc-unknown
                os=-morphos
                ;;
+       moxiebox)
+               basic_machine=moxie-unknown
+               os=-moxiebox
+               ;;
        msdos)
                basic_machine=i386-pc
                os=-msdos
@@ -735,10 +854,18 @@ case $basic_machine in
        ms1-*)
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
+       msys)
+               basic_machine=i686-pc
+               os=-msys
+               ;;
        mvs)
                basic_machine=i370-ibm
                os=-mvs
                ;;
+       nacl)
+               basic_machine=le32-unknown
+               os=-nacl
+               ;;
        ncr3000)
                basic_machine=i486-ncr
                os=-sysv4
@@ -803,6 +930,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -885,9 +1018,10 @@ case $basic_machine in
                ;;
        power)  basic_machine=power-ibm
                ;;
-       ppc)    basic_machine=powerpc-unknown
+       ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle | ppc-le | powerpc-little)
                basic_machine=powerpcle-unknown
@@ -912,7 +1046,11 @@ case $basic_machine in
                basic_machine=i586-unknown
                os=-pw32
                ;;
-       rdos)
+       rdos | rdos64)
+               basic_machine=x86_64-pc
+               os=-rdos
+               ;;
+       rdos32)
                basic_machine=i386-pc
                os=-rdos
                ;;
@@ -981,6 +1119,9 @@ case $basic_machine in
                basic_machine=i860-stratus
                os=-sysv4
                ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        sun2)
                basic_machine=m68000-sun
                ;;
@@ -1037,20 +1178,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
        tile*)
-               basic_machine=tile-unknown
+               basic_machine=$basic_machine-unknown
                os=-linux-gnu
                ;;
        tx39)
@@ -1120,6 +1249,9 @@ case $basic_machine in
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
+       xscale-* | xscalee[bl]-*)
+               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               ;;
        ymp)
                basic_machine=ymp-cray
                os=-unicos
@@ -1128,6 +1260,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1166,7 +1302,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1213,9 +1349,12 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+       # First match some system type aliases
+       # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+       -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1236,29 +1375,31 @@ case $os in
        # 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* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* | -cloudabi* | -sortix* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* \
              | -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* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1297,7 +1438,7 @@ case $os in
        -opened*)
                os=-openedition
                ;;
-        -os400*)
+       -os400*)
                os=-os400
                ;;
        -wince*)
@@ -1346,7 +1487,7 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
-        -tpf*)
+       -tpf*)
                os=-tpf
                ;;
        -triton*)
@@ -1382,12 +1523,14 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
+       -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1410,10 +1553,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+       score-*)
                os=-elf
                ;;
-        spu-*)
+       spu-*)
                os=-elf
                ;;
        *-acorn)
@@ -1425,8 +1568,23 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-        c4x-* | tic4x-*)
-               os=-coff
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       c8051-*)
+               os=-elf
+               ;;
+       hexagon-*)
+               os=-elf
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1446,14 +1604,11 @@ case $basic_machine in
                ;;
        m68000-sun)
                os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
                ;;
        m68*-cisco)
                os=-aout
                ;;
-        mep-*)
+       mep-*)
                os=-elf
                ;;
        mips*-cisco)
@@ -1480,7 +1635,7 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-knuth)
+       *-knuth)
                os=-mmixware
                ;;
        *-wec)
@@ -1585,7 +1740,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index 733ed0a..8d3f89e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,20 +1,22 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for Check 0.9.8.
+# Generated by GNU Autoconf 2.69 for Check 0.12.0.
 #
 # Report bugs to <check-devel at lists dot sourceforge dot net>.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## 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
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  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
-
 as_nl='
 '
 export as_nl
@@ -46,7 +40,13 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -57,7 +57,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 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
@@ -96,15 +89,16 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+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
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -116,12 +110,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); 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
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
@@ -133,7 +131,302 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+        /*)
+          for as_base in sh bash ksh sh5; do
+            # Try only shells that exist, to save several forks.
+            as_shell=$as_dir/$as_base
+            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+          done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and check-devel at
+$0: lists dot sourceforge dot net about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_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 ||
+$as_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" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -147,8 +440,12 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
@@ -168,566 +465,115 @@ $as_echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# 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
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # 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" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  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
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # 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
 }
 
-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
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_ret_success; then
-  :
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+if (echo >conf$$.file) 2>/dev/null; then
+  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 -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 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
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
+# 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'"
 
-      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=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-fi
+SHELL=${CONFIG_SHELL-/bin/sh}
 
 
-:
-_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=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
-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 bug-autoconf@gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  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" ||
-    { $as_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 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  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
-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$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-$*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-          test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-         # Cool, printf works
-         :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-         export CONFIG_SHELL
-         SHELL="$CONFIG_SHELL"
-         export SHELL
-         ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        else
-         # maybe with a smaller string...
-         prev=:
-
-         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-           then
-             break
-           fi
-           prev="$cmd"
-         done
-
-         if test "$prev" != 'sed 50q "$0"'; then
-           echo_test_string=`eval $prev`
-           export echo_test_string
-           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-         else
-           # Oops.  We lost completely, so just stick with echo.
-           ECHO=echo
-         fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-exec 7<&0 </dev/null 6>&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`
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
 #
 # Initializations.
@@ -740,14 +586,14 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='Check'
 PACKAGE_TARNAME='check'
-PACKAGE_VERSION='0.9.8'
-PACKAGE_STRING='Check 0.9.8'
+PACKAGE_VERSION='0.12.0'
+PACKAGE_STRING='Check 0.12.0'
 PACKAGE_BUGREPORT='check-devel at lists dot sourceforge dot net'
+PACKAGE_URL=''
 
 ac_unique_file="src/check.c"
 ac_config_libobj_dir=lib
@@ -787,34 +633,53 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
-PTHREAD_CFLAGS
-PTHREAD_LIBS
-PTHREAD_CC
-acx_pthread_config
+ac_header_list=
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+AWK_GSUB_DBL_BSLASH
+INSTALL_CHECKMK_FALSE
+INSTALL_CHECKMK_TRUE
+AWK_PATH
+HAVE_FORK
 LIBOBJS
+ENABLE_REGEX
+HAVE_REGEX
 SUBUNIT_FALSE
 SUBUNIT_TRUE
+LIBSUBUNIT_PC
 ENABLE_SUBUNIT
+LIBSUBUNIT_LIBS
+LIBSUBUNIT_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+acx_pthread_config
+USE_FILTERDIFF_FALSE
+USE_FILTERDIFF_TRUE
+FILTERDIFF
 TEX
 GENHTML
 LCOV
 GCOV
+LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
 LIPO
 NMEDIT
 DSYMUTIL
-lt_ECHO
+MANIFEST_TOOL
 RANLIB
-AR
+DLLTOOL
 OBJDUMP
 NM
 ac_ct_DUMPBIN
 DUMPBIN
 LD
 FGREP
-SED
 host_os
 host_vendor
 host_cpu
@@ -824,7 +689,10 @@ build_vendor
 build_cpu
 build
 LIBTOOL
+ac_ct_AR
+AR
 LN_S
+SED
 NO_TIMEOUT_TESTS_FALSE
 NO_TIMEOUT_TESTS_TRUE
 ENABLE_GCOV_FALSE
@@ -835,15 +703,30 @@ CHECK_VERSION
 CHECK_MICRO_VERSION
 CHECK_MINOR_VERSION
 CHECK_MAJOR_VERSION
+EGREP
+GREP
+CPP
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
 am__quote
 am__include
 DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -867,16 +750,6 @@ am__isrc
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
-EGREP
-GREP
-CPP
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
 target_alias
 host_alias
 build_alias
@@ -896,6 +769,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -907,6 +781,7 @@ bindir
 program_transform_name
 prefix
 exec_prefix
+PACKAGE_URL
 PACKAGE_BUGREPORT
 PACKAGE_STRING
 PACKAGE_VERSION
@@ -917,15 +792,21 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 enable_dependency_tracking
 enable_gcov
 enable_timeout_tests
 enable_subunit
+enable_fork
+enable_snprintf_replacement
+enable_timer_replacement
 enable_shared
 enable_static
 with_pic
 enable_fast_install
+with_aix_soname
 with_gnu_ld
+with_sysroot
 enable_libtool_lock
 '
       ac_precious_vars='build_alias
@@ -936,7 +817,14 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
-CPP'
+CPP
+LT_SYS_LIBRARY_PATH
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+LIBSUBUNIT_CFLAGS
+LIBSUBUNIT_LIBS
+AWK_PATH'
 
 
 # Initialize some variables set by options.
@@ -975,6 +863,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -999,8 +888,9 @@ do
   fi
 
   case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1045,8 +935,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1072,8 +961,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1228,6 +1116,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1277,8 +1174,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1294,8 +1190,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1325,17 +1220,17 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
     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 &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
@@ -1344,7 +1239,7 @@ Try \`$0 --help' for more information." >&2
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1352,15 +1247,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1369,7 +1262,7 @@ fi
 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
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1383,8 +1276,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1398,8 +1290,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1414,11 +1304,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1457,13 +1345,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1489,7 +1375,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Check 0.9.8 to adapt to many kinds of systems.
+\`configure' configures Check 0.12.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1503,7 +1389,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1529,6 +1415,7 @@ Fine tuning of the installation directories:
   --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]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1559,7 +1446,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Check 0.9.8:";;
+     short | recursive ) echo "Configuration of Check 0.12.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1567,12 +1454,25 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --enable-gcov           turn on test coverage [default=no]
   --enable-timeout-tests  turn on timeout tests [default=yes]
   --enable-subunit        enable support for the subunit test protocol
                           [default=autodetect]
+  --enable-fork           enable support for fork [default=autodetect]
+  --enable-snprintf-replacement
+                          enable check snprintf replacement, (even if the
+                          system provides a C99 compliant version)
+                          [default=autodetect]
+  --enable-timer-replacement
+                          enable check timer replacement, (even if the system
+                          provides timer_create, timer_settime, and
+                          timer_delete) [default=autodetect]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
@@ -1582,9 +1482,14 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic              try to use only PIC/non-PIC objects [default=use
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-aix-soname=aix|svr4|both
+                          shared library versioning (aka "SONAME") variant to
+                          provide on AIX, [default=aix].
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
+                          compiler's sysroot if not specified).
 
 Some influential environment variables:
   CC          C compiler command
@@ -1592,9 +1497,21 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
+  LT_SYS_LIBRARY_PATH
+              User-defined run-time library search path.
+  PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
+  LIBSUBUNIT_CFLAGS
+              C compiler flags for LIBSUBUNIT, overriding pkg-config
+  LIBSUBUNIT_LIBS
+              linker flags for LIBSUBUNIT, overriding pkg-config
+  AWK_PATH    Awk interpreter command
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Check configure 0.9.8
-generated by GNU Autoconf 2.63
+Check configure 0.12.0
+generated by GNU Autoconf 2.69
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _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 Check $as_me 0.9.8, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-  $ $0 $@
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-_ACEOF
-exec 5>>config.log
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-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`
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+} # ac_fn_c_try_cpp
 
-/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`
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-_ASUNAME
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------------------------------------- ##
+## Report this to check-devel at lists dot sourceforge dot net ##
+## ----------------------------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} >&5
+} # ac_fn_c_check_header_mongrel
 
-cat >&5 <<_ACEOF
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+} # ac_fn_c_try_run
 
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_header_compile
 
-# 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=`$as_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; }
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# 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
+       ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-    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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $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
+} # ac_fn_c_try_link
 
-    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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
 
-    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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       $as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_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
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
+#undef $2
 
-# Predefined preprocessor variables.
+/* 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 $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_func
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$4=yes"
+else
+  eval "$4=no"
+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
+eval ac_res=\$$4
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_member
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+        return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+           return 0;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_type
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
 
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
 else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
 fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
 
-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
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
 else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
+  ac_retval=1
 fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
 
-# 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,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_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
-       # differences in whitespace do not lead to failure.
-       ac_old_val_w=`echo x $ac_old_val`
-       ac_new_val_w=`echo x $ac_new_val`
-       if test "$ac_old_val_w" != "$ac_new_val_w"; then
-         { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-         ac_cache_corrupted=:
-       else
-         { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-         eval $ac_var=\$ac_old_val
-       fi
-       { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-       { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_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
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
+} # ac_fn_c_compute_int
 
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+        'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0;
+return test_array [0];
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  case $ac_type in #(
+  uint$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
 
+else
+  break
+fi
+     done
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_find_uintX_t
 
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
+} # ac_fn_c_check_decl
+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 Check $as_me 0.12.0, which was
+generated by GNU Autoconf 2.69.  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=.
+    $as_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append 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
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
 
-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
+# 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
 
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; 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
 
-CHECK_MAJOR_VERSION=0
-CHECK_MINOR_VERSION=9
-CHECK_MICRO_VERSION=8
-CHECK_VERSION=$CHECK_MAJOR_VERSION.$CHECK_MINOR_VERSION.$CHECK_MICRO_VERSION
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
 
-# unique source file --- primitive safety check
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
 
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_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'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
 
-# place where extra autoconf macros are kept
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
 
+$as_echo "/* confdefs.h */" > confdefs.h
 
-# place where portability library functions are kept
+# 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
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+as_fn_append ac_header_list " time.h"
+as_fn_append ac_header_list " stdarg.h"
+# 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,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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
+       # differences in whitespace do not lead to failure.
+       ac_old_val_w=`echo x $ac_old_val`
+       ac_new_val_w=`echo x $ac_new_val`
+       if test "$ac_old_val_w" != "$ac_new_val_w"; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+         ac_cache_corrupted=:
+       else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+         eval $ac_var=\$ac_old_val
+       fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_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.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+CHECK_MAJOR_VERSION=0
+CHECK_MINOR_VERSION=12
+CHECK_MICRO_VERSION=0
+CHECK_VERSION=$CHECK_MAJOR_VERSION.$CHECK_MINOR_VERSION.$CHECK_MICRO_VERSION
+
+# unique source file --- primitive safety check
+
+
+# place where extra autoconf macros are kept
+
+
+# place where portability library functions are kept
+
+
+# really severe build strictness
+am__api_version='1.15'
 
-# place to put some extra build scripts installed
 ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -2076,9 +2726,7 @@ for ac_dir in build-aux "$srcdir"/build-aux; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2090,1328 +2738,981 @@ 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.
 
 
-
-# define things like _GNU_SOURCE appropriately
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+# 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.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&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
+  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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
+    # 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 as_fn_executable_p "$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
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
+         fi
+       fi
+      done
+    done
+    ;;
+esac
 
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+  done
 IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+rm -rf conftest.one conftest.two conftest.dir
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
+    # 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
-else
-  CC="$ac_cv_prog_CC"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+# 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'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# 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 (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     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
+     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".
+       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+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 $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  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_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&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
+  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_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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          as_fn_executable_p "$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
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
 
-    test -n "$CC" && break
-  done
+  test -d ./--version && rmdir ./--version
+  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.
+    MKDIR_P="$ac_install_sh -d"
+  fi
 fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+  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_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$ac_ct_CC" && break
+  test -n "$AWK" && break
 done
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&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
-    CC=$ac_ct_CC
-  fi
+rm -f conftest.make
 fi
-
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
 
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
 
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_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;;
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  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='check'
+ VERSION='0.12.0'
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
 _ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+# Some tools Automake needs.
 
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
 
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_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 | *.dSYM | *.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
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-fi
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
 
-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.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_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
-$as_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
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
-rm -f -r a.out a.out.dSYM 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.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_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
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
 
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_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 | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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.  */
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
 
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
 
-fi
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$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=
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  $as_echo_n "(cached) " >&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 <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Change to using into-in-builddir in the future:
+#AM_INIT_AUTOMAKE([info-in-builddir -Wall -Werror gnits 1.14])
 
+# define things like _GNU_SOURCE appropriately
+# From patch 2803433, request system extensions to generate 64-bit safe code
+DEPDIR="${am__leading_dot}deps"
 
-fi
+ac_config_commands="$ac_config_commands depfiles"
 
-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)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
 esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+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
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&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
-  $as_echo_n "(cached) " >&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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
 
-  # Broken: fails on valid input.
-continue
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
 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 <ac_nonexistent.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 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
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
-  CPP=$ac_cv_prog_CPP
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  ac_cv_prog_CPP=$CPP
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#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;;
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  :
+    CC=$ac_ct_CC
+  fi
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
+  CC="$ac_cv_prog_CC"
 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 <ac_nonexistent.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f conftest.err conftest.$ac_ext
 
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 as_fn_executable_p "$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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 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
-
 
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$GREP"; then
-  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
+  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_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
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_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
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
+    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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  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
+  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_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
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_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
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
   done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
+IFS=$as_save_IFS
 
-      $ac_path_EGREP_found && break 3
-    done
-  done
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
 done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
   fi
-else
-  ac_cv_path_EGREP=$EGREP
 fi
 
-   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
 
 
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
 int
 main ()
@@ -3421,407 +3722,325 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_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
-  $as_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 <string.h>
-
-_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 <stdlib.h>
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 | *.dSYM | *.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=
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
 else
-  ac_cv_header_stdc=no
+  ac_file=''
 fi
-rm -f conftest*
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
 
-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
-  :
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#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
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
 int
 main ()
 {
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
 
-# 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
 
-#include <$ac_header>
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_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"
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
 else
   $as_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
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-
-done
-
-
-
-  if test "${ac_cv_header_minix_config_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
-$as_echo_n "checking for minix/config.h... " >&6; }
-if test "${ac_cv_header_minix_config_h+set}" = set; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-$as_echo "$ac_cv_header_minix_config_h" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
-$as_echo_n "checking minix/config.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <minix/config.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
-$as_echo_n "checking minix/config.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <minix/config.h>
+  ;
+  return 0;
+}
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ----------------------------------------------------------- ##
-## Report this to check-devel at lists dot sourceforge dot net ##
-## ----------------------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
-$as_echo_n "checking for minix/config.h... " >&6; }
-if test "${ac_cv_header_minix_config_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
 else
-  ac_cv_header_minix_config_h=$ac_header_preproc
+  ac_compiler_gnu=no
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-$as_echo "$ac_cv_header_minix_config_h" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-if test "x$ac_cv_header_minix_config_h" = x""yes; then
-  MINIX=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
 else
-  MINIX=
+  GCC=
 fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-  if test "$MINIX" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_SOURCE 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_1_SOURCE 2
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _MINIX 1
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  fi
-
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
-  { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
-  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#        define __EXTENSIONS__ 1
-         $ac_includes_default
 int
 main ()
 {
@@ -3830,691 +4049,775 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_safe_to_define___extensions__=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_safe_to_define___extensions__=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    cat >>confdefs.h <<\_ACEOF
-#define __EXTENSIONS__ 1
-_ACEOF
-
-  cat >>confdefs.h <<\_ACEOF
-#define _ALL_SOURCE 1
-_ACEOF
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* 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;
+}
 
-  cat >>confdefs.h <<\_ACEOF
-#define _GNU_SOURCE 1
-_ACEOF
+/* 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];
 
-  cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
+/* 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];
 
-  cat >>confdefs.h <<\_ACEOF
-#define _TANDEM_SOURCE 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"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+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)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+fi
 
-# really severe build strictness
-am__api_version='1.10'
+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
 
-# 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.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  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
-           rm -rf conftest.one conftest.two conftest.dir
-           echo one > conftest.one
-           echo two > conftest.two
-           mkdir conftest.dir
-           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-             test -s conftest.one && test -s conftest.two &&
-             test -s conftest.dir/conftest.one &&
-             test -s conftest.dir/conftest.two
-           then
-             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-             break 3
-           fi
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-
-done
-IFS=$as_save_IFS
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-rm -rf conftest.one conftest.two conftest.dir
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
 fi
-  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
 fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+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
 
-# 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}'
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_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
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&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".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_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
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
+  cd ..
+  rm -rf conftest.dir
 else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+  am_cv_CC_dependencies_compiler_type=none
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "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 $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-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=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
 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
-
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
 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
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-$as_echo "$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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&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
+      # 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
-  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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
 
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  # Broken: fails on valid input.
+continue
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-  test -n "$AWK" && break
 done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
 
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
 _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
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
 fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
 
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
 else
-  am__leading_dot=_
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-rmdir .tst 2>/dev/null
 
-DEPDIR="${am__leading_dot}deps"
+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_config_commands="$ac_config_commands depfiles"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  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"
+      as_fn_executable_p "$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
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_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
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    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
 
-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.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&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
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
 fi
 
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
 
-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
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  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"
+      as_fn_executable_p "$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
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_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
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    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
 
-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
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
+else
+  ac_cv_path_EGREP=$EGREP
 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
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
 
 
-# Define the identity of the package.
- PACKAGE='check'
- VERSION='0.9.8'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
+int
+main ()
+{
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
 
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
 _ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
 
-# 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}"}
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
 
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+fi
 
-# 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
+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
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#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
+if ac_fn_c_try_run "$LINENO"; then :
+
 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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
 else
-  STRIP="$ac_cv_prog_STRIP"
+  MINIX=
 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.
+  if test "$MINIX" = yes; then
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
 
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
 
 
+$as_echo "#define _MINIX 1" >>confdefs.h
 
-depcc="$CC"   am_compiler_list=
+  fi
 
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    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
+#         define __EXTENSIONS__ 1
+          $ac_includes_default
+int
+main ()
+{
 
-  cd ..
-  rm -rf conftest.dir
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
 else
-  am_cv_CC_dependencies_compiler_type=none
+  ac_cv_safe_to_define___extensions__=no
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
 
- 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
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
 
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
 
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
 
 
-# FIXME: find the other places this stuff is used
 
 
 
@@ -4522,15 +4825,53 @@ fi
 
 
 # Configure options.
+# allow `./configure --enable-silent-rules' and `make V=0'
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 
 # Check whether --enable-gcov was given.
-if test "${enable_gcov+set}" = set; then
+if test "${enable_gcov+set}" = set; then :
   enableval=$enable_gcov; case "${enableval}" in
   yes) enable_gcov=true ;;
   no)  enable_gcov=false ;;
-  *)   { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gcov" >&5
-$as_echo "$as_me: error: bad value ${enableval} for --enable-gcov" >&2;}
-   { (exit 1); exit 1; }; } ;;
+  *)   as_fn_error $? "bad value ${enableval} for --enable-gcov" "$LINENO" 5 ;;
 esac
 else
   enable_gcov=false
@@ -4538,10 +4879,8 @@ fi
 
 
 if test x$enable_gcov = xtrue ; then
-  if test -n "$GCC"; then
-    { { $as_echo "$as_me:$LINENO: error: gcov only works if gcc is used" >&5
-$as_echo "$as_me: error: gcov only works if gcc is used" >&2;}
-   { (exit 1); exit 1; }; }
+  if test x"$GCC" != xyes; then
+    as_fn_error $? "gcov only works if gcc is used" "$LINENO" 5
   fi
 
   GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
@@ -4561,13 +4900,11 @@ fi
 
 
 # Check whether --enable-timeout-tests was given.
-if test "${enable_timeout_tests+set}" = set; then
+if test "${enable_timeout_tests+set}" = set; then :
   enableval=$enable_timeout_tests; case "${enableval}" in
   yes) enable_timeout_tests=true ;;
   no)  enable_timeout_tests=false ;;
-  *)   { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-timeout-tests" >&5
-$as_echo "$as_me: error: bad value ${enableval} for --enable-timeout-tests" >&2;}
-   { (exit 1); exit 1; }; } ;;
+  *)   as_fn_error $? "bad value ${enableval} for --enable-timeout-tests" "$LINENO" 5 ;;
 esac
 else
   enable_timeout_tests=true
@@ -4584,7 +4921,7 @@ fi
 
 
 # Check whether --enable-subunit was given.
-if test "${enable_subunit+set}" = set; then
+if test "${enable_subunit+set}" = set; then :
   enableval=$enable_subunit; case "${enableval}" in
   yes)
     enable_subunit=true
@@ -4592,29 +4929,131 @@ if test "${enable_subunit+set}" = set; then
     ;;
   no)
     enable_subunit=false
-    echoo "Disabled subunit support"
+    echo "Disabled subunit support"
     ;;
   autodetect)
     echo "Subunit support will enable automatically."
     ;;
-  *)   { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-subunit" >&5
-$as_echo "$as_me: error: bad value ${enableval} for --enable-subunit" >&2;}
-   { (exit 1); exit 1; }; } ;;
+  *)   as_fn_error $? "bad value ${enableval} for --enable-subunit" "$LINENO" 5 ;;
+esac
+else
+  echo "Subunit support will enable automatically."
+ enable_subunit=autodetect
+fi
+
+
+# Check whether --enable-fork was given.
+if test "${enable_fork+set}" = set; then :
+  enableval=$enable_fork; case "${enableval}" in
+  yes) enable_fork=true ;;
+  no)  enable_fork=false ;;
+  *)   as_fn_error $? "bad value ${enableval} for --enable-fork" "$LINENO" 5 ;;
+esac
+else
+  enable_fork=true
+fi
+
+
+# Check whether --enable-snprintf-replacement was given.
+if test "${enable_snprintf_replacement+set}" = set; then :
+  enableval=$enable_snprintf_replacement; case "${enableval}" in
+  yes) enable_snprintf_replacement=true ;;
+  *)   as_fn_error $? "bad value ${enableval} for --enable-snprintf-replacement" "$LINENO" 5 ;;
+esac
+else
+  enable_snprintf_replacement=autodetect
+fi
+
+
+# Check whether --enable-timer-replacement was given.
+if test "${enable_timer_replacement+set}" = set; then :
+  enableval=$enable_timer_replacement; case "${enableval}" in
+  yes) enable_timer_replacement=true ;;
+  *)   as_fn_error $? "bad value ${enableval} for --enable-timer-replacement" "$LINENO" 5 ;;
+esac
+else
+  enable_timer_replacement=autodetect
+fi
+
+
+
+# Checks for programs.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
 else
-  echo "Subunit support will enable automatically."
- enable_subunit=autodetect
+  ac_cv_path_SED=$SED
 fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
 
-# Checks for programs.
 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -4625,24 +5064,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
 $as_echo "$AWK" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4658,9 +5097,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4671,24 +5110,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4698,9 +5137,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -4711,24 +5150,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4737,7 +5176,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -4751,9 +5190,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4764,24 +5203,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4791,9 +5230,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4805,18 +5244,18 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
@@ -4835,10 +5274,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4850,9 +5289,9 @@ if test -z "$CC"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -4863,24 +5302,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4894,9 +5333,9 @@ if test -z "$CC"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -4907,24 +5346,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4937,7 +5376,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -4948,62 +5387,42 @@ fi
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -5017,37 +5436,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_compiler_gnu=no
+  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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
 if test $ac_compiler_gnu = yes; then
   GCC=yes
@@ -5056,20 +5454,16 @@ else
 fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&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
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -5080,35 +5474,11 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
 else
-  $as_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
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -5119,36 +5489,12 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-       ac_c_werror_flag=$ac_save_c_werror_flag
+else
+  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
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -5159,42 +5505,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
-else
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
 $as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
@@ -5211,23 +5532,18 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -5279,307 +5595,423 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+  if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_c89=$ac_arg
+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)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_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
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
 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)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$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
 
-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
 
 # Automake wants this for per-target CFLAGS
-if test "x$CC" != xcc; then
-  { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
 fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
-                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+
+# for non-POSIX archivers like the one on OS X
+# use m4_ifdef to work on older automake (1.11)
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar lib "link -lib"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
-  eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
 fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "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
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
 fi
 
 
-# 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.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar lib "link -lib"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  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=.
-  # 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
-           rm -rf conftest.one conftest.two conftest.dir
-           echo one > conftest.one
-           echo two > conftest.two
-           mkdir conftest.dir
-           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-             test -s conftest.one && test -s conftest.two &&
-             test -s conftest.dir/conftest.one &&
-             test -s conftest.dir/conftest.two
-           then
-             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-             break 3
-           fi
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
 IFS=$as_save_IFS
 
-rm -rf conftest.one conftest.two conftest.dir
-
 fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
   else
-    # 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
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$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}'
+: ${AR=ar}
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+   am_cv_ar_interface=ar
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+  (eval $am_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+  ;;
+esac
 
 case `pwd` in
   *\ * | *\    *)
-    { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
 esac
 
 
 
-macro_version='2.2.6'
-macro_revision='1.3012'
+macro_version='2.4.6'
+macro_revision='2.4.6'
 
 
 
@@ -5593,39 +6025,31 @@ macro_revision='1.3012'
 
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -5641,28 +6065,24 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -5678,9 +6098,78 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
+
+case $ECHO in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -5688,7 +6177,7 @@ else
        ac_script="$ac_script$as_nl$ac_script"
      done
      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     $as_unset ac_script || ac_script=
+     { ac_script=; unset ac_script;}
      if test -z "$SED"; then
   ac_path_SED_found=false
   # Loop through the user's path and test for each of PROGNAME-LIST
@@ -5697,10 +6186,10 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in sed gsed; do
+    for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+      as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
 case `"$ac_path_SED" --version 2>&1` in
@@ -5717,7 +6206,7 @@ case `"$ac_path_SED" --version 2>&1` in
     $as_echo '' >> "conftest.nl"
     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_SED_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_SED="$ac_path_SED"
@@ -5732,19 +6221,17 @@ esac
       $ac_path_SED_found && break 3
     done
   done
-done
+  done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_SED"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
   fi
 else
   ac_cv_path_SED=$SED
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
 $as_echo "$ac_cv_path_SED" >&6; }
  SED="$ac_cv_path_SED"
   rm -f conftest.sed
@@ -5762,9 +6249,9 @@ Xsed="$SED -e 1s/^X//"
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -5778,10 +6265,10 @@ 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 fgrep; do
+    for ac_prog in fgrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+      as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 case `"$ac_path_FGREP" --version 2>&1` in
@@ -5798,7 +6285,7 @@ case `"$ac_path_FGREP" --version 2>&1` in
     $as_echo 'FGREP' >> "conftest.nl"
     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_FGREP="$ac_path_FGREP"
@@ -5813,12 +6300,10 @@ esac
       $ac_path_FGREP_found && break 3
     done
   done
-done
+  done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_FGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_FGREP=$FGREP
@@ -5826,7 +6311,7 @@ fi
 
    fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
 $as_echo "$ac_cv_path_FGREP" >&6; }
  FGREP="$ac_cv_path_FGREP"
 
@@ -5852,20 +6337,20 @@ test -z "$GREP" && GREP=grep
 
 
 # Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
 else
   with_gnu_ld=no
 fi
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5879,7 +6364,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -5890,56 +6375,54 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+elif test yes = "$with_gnu_ld"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
-  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
+       test no != "$with_gnu_ld" && break
        ;;
       *)
-       test "$with_gnu_ld" != yes && break
+       test yes != "$with_gnu_ld" && break
        ;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi
 fi
 
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
-  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
-test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -5952,7 +6435,7 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
@@ -5964,40 +6447,45 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then
+if ${lt_cv_path_NM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
        # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
        #   nm: unknown option "B" ignored
        # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
+       # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+       case $build_os in
+       mingw*) lt_bad_file=conftest.nm/nofile ;;
+       *) lt_bad_file=/dev/null ;;
+       esac
+       case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+       *$lt_bad_file* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
-         break
+         break 2
          ;;
        *)
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
-           break
+           break 2
            ;;
          *)
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -6008,25 +6496,28 @@ else
        esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
 $as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in dumpbin "link -dump"
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+if ${ac_cv_prog_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DUMPBIN"; then
@@ -6037,24 +6528,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 DUMPBIN=$ac_cv_prog_DUMPBIN
 if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
 $as_echo "$DUMPBIN" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6064,13 +6555,13 @@ fi
 fi
 if test -z "$DUMPBIN"; then
   ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  for ac_prog in dumpbin "link -dump"
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DUMPBIN"; then
@@ -6081,24 +6572,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
 if test -n "$ac_ct_DUMPBIN"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
 $as_echo "$ac_ct_DUMPBIN" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6111,7 +6602,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -6119,9 +6610,18 @@ esac
   fi
 fi
 
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols -headers"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
 
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -6131,37 +6631,37 @@ test -z "$NM" && NM=nm
 
 
 
-{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then
+if ${lt_cv_nm_interface+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:6141: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6144: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6147: output\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
   fi
   rm -f conftest*
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
 $as_echo "$lt_cv_nm_interface" >&6; }
 
 # find the maximum length of command line arguments
-{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -6190,13 +6690,18 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -6215,6 +6720,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -6241,22 +6751,23 @@ else
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+             test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -6274,11 +6785,11 @@ else
 
 fi
 
-if test -n $lt_cv_sys_max_cmd_len ; then
-  { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+if test -n "$lt_cv_sys_max_cmd_len"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: none" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
 $as_echo "none" >&6; }
 fi
 max_cmd_len=$lt_cv_sys_max_cmd_len
@@ -6292,30 +6803,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 
-{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
@@ -6347,14 +6834,88 @@ esac
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
 $as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then
+if ${lt_cv_ld_reload_flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_reload_flag='-r'
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
 $as_echo "$lt_cv_ld_reload_flag" >&6; }
 reload_flag=$lt_cv_ld_reload_flag
 case $reload_flag in
@@ -6363,9 +6924,14 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test yes != "$GCC"; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -6383,9 +6949,9 @@ esac
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+if ${ac_cv_prog_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OBJDUMP"; then
@@ -6396,24 +6962,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 OBJDUMP=$ac_cv_prog_OBJDUMP
 if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
 $as_echo "$OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6423,9 +6989,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
   ac_ct_OBJDUMP=$OBJDUMP
   # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OBJDUMP"; then
@@ -6436,24 +7002,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
 if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
 $as_echo "$ac_ct_OBJDUMP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6462,7 +7028,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -6482,9 +7048,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
-{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then
+if ${lt_cv_deplibs_check_method+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -6493,13 +7059,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[4-9]*)
@@ -6530,12 +7096,13 @@ mingw* | pw32*)
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -6561,7 +7128,7 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
+haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -6573,11 +7140,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -6598,8 +7165,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -6621,8 +7188,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -6675,11 +7242,29 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
 $as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -6695,12 +7280,165 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
 if test -n "$ac_tool_prefix"; then
-  # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
@@ -6711,36 +7449,40 @@ 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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  { $as_echo "$as_me:$LINENO: result: $AR" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
 $as_echo "$AR" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
+    test -n "$AR" && break
+  done
 fi
-if test -z "$ac_cv_prog_AR"; then
+if test -z "$AR"; then
   ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
@@ -6751,48 +7493,108 @@ 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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_AR=$ac_cv_prog_ac_ct_AR
 if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
 $as_echo "$ac_ct_AR" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
+
+  test -n "$ac_ct_AR" && break
+done
+
   if test "x$ac_ct_AR" = x; then
     AR="false"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
   fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  AR="$ac_cv_prog_AR"
-fi
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test 0 -eq "$ac_status"; then
+       # Ensure the archiver fails upon bogus file names.
+       rm -f conftest.$ac_objext libconftest.a
+       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+       if test 0 -ne "$ac_status"; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
 
+if test no = "$lt_cv_ar_at_file"; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
 
 
 
@@ -6803,9 +7605,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -6816,24 +7618,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
 $as_echo "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6843,9 +7645,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -6856,24 +7658,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
 $as_echo "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6882,7 +7684,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -6902,9 +7704,9 @@ test -z "$STRIP" && STRIP=:
 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -6915,24 +7717,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
 $as_echo "$RANLIB" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6942,9 +7744,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -6955,24 +7757,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
 $as_echo "$ac_ct_RANLIB" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -6981,7 +7783,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -7005,16 +7807,28 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+  bitrig* | openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
 
 
 
@@ -7059,9 +7873,9 @@ compiler=$CC
 
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7083,7 +7897,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[ABCDEGRST]'
   fi
   ;;
@@ -7116,14 +7930,44 @@ case `$NM -V 2>&1` in
   symcode='[ABCDGIRSTW]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -7141,24 +7985,29 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -7177,18 +8026,18 @@ void nm_test_func(void){}
 int main(){nm_test_var='a';nm_test_func();return(0);}
 _LT_EOF
 
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -7200,6 +8049,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -7211,7 +8072,7 @@ _LT_EOF
          cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -7219,7 +8080,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
          cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -7237,19 +8098,19 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
          # Now try linking the two files.
          mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
+         lt_globsym_save_LIBS=$LIBS
+         lt_globsym_save_CFLAGS=$CFLAGS
+         LIBS=conftstm.$ac_objext
          CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
+         LIBS=$lt_globsym_save_LIBS
+         CFLAGS=$lt_globsym_save_CFLAGS
        else
          echo "cannot find nm_test_func in $nlist" >&5
        fi
@@ -7266,7 +8127,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -7279,13 +8140,33 @@ 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
-  { $as_echo "$as_me:$LINENO: result: failed" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
 $as_echo "failed" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: ok" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
 $as_echo "ok" >&6; }
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 
 
 
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+   if test yes = "$GCC"; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+  ac_path_lt_DD_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in dd; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+      $ac_path_lt_DD_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_lt_DD"; then
+    :
+  fi
+else
+  ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
 # Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
+if test "${enable_libtool_lock+set}" = set; then :
   enableval=$enable_libtool_lock;
 fi
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-       HPUX_IA64_MODE="32"
+       HPUX_IA64_MODE=32
        ;;
       *ELF-64*)
-       HPUX_IA64_MODE="64"
+       HPUX_IA64_MODE=64
        ;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 7341 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -melf32bsmip"
@@ -7373,15 +8375,56 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+       emul="${emul}32"
+       ;;
+      *64-bit*)
+       emul="${emul}64"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+       emul="${emul}btsmip"
+       ;;
+      *LSB*)
+       emul="${emul}ltsmip"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+       emul="${emul}n32"
+       ;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
     case `/usr/bin/file conftest.o` in
       *32-bit*)
        case $host in
@@ -7389,9 +8432,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
-         ppc64-*linux*|powerpc64-*linux*)
+         powerpc64le-*linux*)
+           LD="${LD-ld} -m elf32lppclinux"
+           ;;
+         powerpc64-*linux*)
            LD="${LD-ld} -m elf32ppclinux"
            ;;
          s390x-*linux*)
@@ -7410,7 +8463,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
          x86_64-*linux*)
            LD="${LD-ld} -m elf_x86_64"
            ;;
-         ppc*-*linux*|powerpc*-*linux*)
+         powerpcle-*linux*)
+           LD="${LD-ld} -m elf64lppc"
+           ;;
+         powerpc-*linux*)
            LD="${LD-ld} -m elf64ppc"
            ;;
          s390*-*linux*|s390*-*tpf*)
@@ -7428,11 +8484,11 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
+if ${lt_cv_cc_needs_belf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=c
@@ -7441,11 +8497,7 @@ 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
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -7456,38 +8508,13 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_c_try_link "$LINENO"; then :
   lt_cv_cc_needs_belf=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       lt_cv_cc_needs_belf=no
+  lt_cv_cc_needs_belf=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
      ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7495,25 +8522,39 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
 $as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
+*-*solaris*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*|x86_64-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD=${LD-ld}_sol2
+        fi
+        ;;
       *)
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
          LD="${LD-ld} -64"
@@ -7527,7 +8568,124 @@ sparc*-*solaris*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
 
 
   case $host_os in
@@ -7535,9 +8693,9 @@ need_locks="$enable_libtool_lock"
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DSYMUTIL"; then
@@ -7548,24 +8706,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 DSYMUTIL=$ac_cv_prog_DSYMUTIL
 if test -n "$DSYMUTIL"; then
-  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
 $as_echo "$DSYMUTIL" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7575,9 +8733,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
   ac_ct_DSYMUTIL=$DSYMUTIL
   # Extract the first word of "dsymutil", so it can be a program name with args.
 set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DSYMUTIL"; then
@@ -7588,24 +8746,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
 if test -n "$ac_ct_DSYMUTIL"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
 $as_echo "$ac_ct_DSYMUTIL" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7614,7 +8772,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -7627,9 +8785,9 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then
+if ${ac_cv_prog_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NMEDIT"; then
@@ -7640,24 +8798,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 NMEDIT=$ac_cv_prog_NMEDIT
 if test -n "$NMEDIT"; then
-  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
 $as_echo "$NMEDIT" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7667,9 +8825,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then
   ac_ct_NMEDIT=$NMEDIT
   # Extract the first word of "nmedit", so it can be a program name with args.
 set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_NMEDIT"; then
@@ -7680,24 +8838,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
 if test -n "$ac_ct_NMEDIT"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
 $as_echo "$ac_ct_NMEDIT" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7706,7 +8864,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -7719,9 +8877,9 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then
+if ${ac_cv_prog_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LIPO"; then
@@ -7732,24 +8890,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 LIPO=$ac_cv_prog_LIPO
 if test -n "$LIPO"; then
-  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
 $as_echo "$LIPO" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7759,9 +8917,9 @@ if test -z "$ac_cv_prog_LIPO"; then
   ac_ct_LIPO=$LIPO
   # Extract the first word of "lipo", so it can be a program name with args.
 set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_LIPO"; then
@@ -7772,24 +8930,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
 if test -n "$ac_ct_LIPO"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
 $as_echo "$ac_ct_LIPO" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7798,7 +8956,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -7811,9 +8969,9 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then
+if ${ac_cv_prog_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL"; then
@@ -7824,24 +8982,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 OTOOL=$ac_cv_prog_OTOOL
 if test -n "$OTOOL"; then
-  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
 $as_echo "$OTOOL" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7851,9 +9009,9 @@ if test -z "$ac_cv_prog_OTOOL"; then
   ac_ct_OTOOL=$OTOOL
   # Extract the first word of "otool", so it can be a program name with args.
 set dummy otool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL"; then
@@ -7864,24 +9022,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
 if test -n "$ac_ct_OTOOL"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
 $as_echo "$ac_ct_OTOOL" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7890,7 +9048,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -7903,9 +9061,9 @@ fi
     if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then
+if ${ac_cv_prog_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL64"; then
@@ -7916,24 +9074,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 OTOOL64=$ac_cv_prog_OTOOL64
 if test -n "$OTOOL64"; then
-  { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
 $as_echo "$OTOOL64" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7943,9 +9101,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then
   ac_ct_OTOOL64=$OTOOL64
   # Extract the first word of "otool64", so it can be a program name with args.
 set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL64"; then
@@ -7956,24 +9114,24 @@ 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
 if test -n "$ac_ct_OTOOL64"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
 $as_echo "$ac_ct_OTOOL64" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -7982,7 +9140,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -8018,13 +9176,13 @@ fi
 
 
 
-    { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
 $as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
        # By default we will add the -single_module flag. You can override
        # by either setting the environment variable LT_MULTI_MODULE
        # non-empty at configure time, or by adding -multi_module to the
@@ -8036,7 +9194,13 @@ else
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+       # If there is a non-empty error log, and "single_module"
+       # appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+         cat conftest.err >&5
+       # Otherwise, if the output was created with a 0 exit code from
+       # the compiler, it worked.
+       elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&5
@@ -8045,22 +9209,19 @@ else
        rm -f conftest.*
       fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
-    { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
       save_LDFLAGS=$LDFLAGS
       echo "_main" > conftest.sym
       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -8071,71 +9232,81 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_c_try_link "$LINENO"; then :
   lt_cv_ld_exported_symbols_list=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       LDFLAGS=$save_LDFLAGS
 
-       lt_cv_ld_exported_symbols_list=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-       LDFLAGS="$save_LDFLAGS"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+       cat conftest.err >&5
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+       lt_cv_ld_force_load=yes
+      else
+       cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
        10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[012]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       10.[012][,.]*)
+         _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
        10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -8143,62 +9314,48 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     ;;
   esac
 
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
 
 for ac_header in dlfcn.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_DLFCN_H 1
 _ACEOF
 
 fi
@@ -8207,6 +9364,8 @@ done
 
 
 
+
+
 # Set options
 
 
@@ -8218,7 +9377,7 @@ done
 
 
             # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then
+if test "${enable_shared+set}" = set; then :
   enableval=$enable_shared; p=${PACKAGE-default}
     case $enableval in
     yes) enable_shared=yes ;;
@@ -8226,14 +9385,14 @@ if test "${enable_shared+set}" = set; then
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_shared=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8249,7 +9408,7 @@ fi
 
 
   # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then
+if test "${enable_static+set}" = set; then :
   enableval=$enable_static; p=${PACKAGE-default}
     case $enableval in
     yes) enable_static=yes ;;
@@ -8257,14 +9416,14 @@ if test "${enable_static+set}" = set; then
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_static=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8281,15 +9440,28 @@ fi
 
 
 # Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then
-  withval=$with_pic; pic_mode="$withval"
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for lt_pkg in $withval; do
+       IFS=$lt_save_ifs
+       if test "X$lt_pkg" = "X$lt_p"; then
+         pic_mode=yes
+       fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
 else
   pic_mode=default
 fi
 
 
-test -z "$pic_mode" && pic_mode=default
-
 
 
 
@@ -8297,7 +9469,7 @@ test -z "$pic_mode" && pic_mode=default
 
 
   # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
+if test "${enable_fast_install+set}" = set; then :
   enableval=$enable_fast_install; p=${PACKAGE-default}
     case $enableval in
     yes) enable_fast_install=yes ;;
@@ -8305,14 +9477,14 @@ if test "${enable_fast_install+set}" = set; then
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_fast_install=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8326,11 +9498,63 @@ fi
 
 
 
+  shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+  withval=$with_aix_soname; case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname
+else
+  if ${lt_cv_with_aix_soname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_with_aix_soname=aix
+fi
+
+    with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+
+
+
+
+
+
 
 
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8359,6 +9583,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -8374,13 +9603,13 @@ test -z "$LN_S" && LN_S="ln -s"
 
 
 
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then
+if ${lt_cv_objdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -f .libs 2>/dev/null
@@ -8393,7 +9622,7 @@ else
 fi
 rmdir .libs 2>/dev/null
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
 $as_echo "$lt_cv_objdir" >&6; }
 objdir=$lt_cv_objdir
 
@@ -8408,60 +9637,30 @@ _ACEOF
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -8470,15 +9669,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 test -z "$LD" && LD=ld
 test -z "$ac_objext" && ac_objext=o
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
 # Only perform the check for file, if the check method requires it
@@ -8486,29 +9678,29 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+    if test -f "$ac_dir/${ac_tool_prefix}file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         MAGIC_CMD=$lt_cv_path_MAGIC_CMD
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
            :
@@ -8531,18 +9723,18 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -8552,29 +9744,29 @@ fi
 
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
-    { $as_echo "$as_me:$LINENO: checking for file" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
 $as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+    if test -f "$ac_dir/file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         MAGIC_CMD=$lt_cv_path_MAGIC_CMD
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
            :
@@ -8597,18 +9789,18 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -8624,7 +9816,7 @@ esac
 
 # Use C for the default configuration in the libtool script
 
-lt_save_CC="$CC"
+lt_save_CC=$CC
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8686,18 +9878,23 @@ if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+if test yes = "$GCC"; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
   $as_echo_n "(cached) " >&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"
+   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -8707,15 +9904,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8710: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8714: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_rtti_exceptions=yes
@@ -8724,10 +9921,10 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
     :
@@ -8744,20 +9941,19 @@ fi
 lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
-{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     lt_prog_compiler_wl='-Wl,'
     lt_prog_compiler_static='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        lt_prog_compiler_static='-Bstatic'
       fi
+      lt_prog_compiler_pic='-fPIC'
       ;;
 
     amigaos*)
@@ -8768,8 +9964,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -8785,6 +9981,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+       lt_prog_compiler_static='$wl-static'
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -8793,6 +9994,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -8835,12 +10042,21 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl='-Xlinker '
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
       lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        lt_prog_compiler_static='-Bstatic'
       else
@@ -8848,10 +10064,29 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        lt_prog_compiler_wl='-Wl,-Wl,,'
+        lt_prog_compiler_pic='-PIC'
+        lt_prog_compiler_static='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+       lt_prog_compiler_static='$wl-static'
+       ;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -8867,7 +10102,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        ;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      lt_prog_compiler_static='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -8876,9 +10111,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
        lt_prog_compiler_wl='-Wl,'
        lt_prog_compiler_pic='-KPIC'
@@ -8897,7 +10132,19 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='--shared'
        lt_prog_compiler_static='--static'
        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+       # NAG Fortran compiler
+       lt_prog_compiler_wl='-Wl,-Wl,,'
+       lt_prog_compiler_pic='-PIC'
+       lt_prog_compiler_static='-Bstatic'
+       ;;
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fPIC'
+       lt_prog_compiler_static='-static'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
        # which looks to be a dead project)
        lt_prog_compiler_wl='-Wl,'
@@ -8909,25 +10156,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static='-non_shared'
         ;;
-      xl*)
-       # IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
        lt_prog_compiler_wl='-Wl,'
        lt_prog_compiler_pic='-qpic'
        lt_prog_compiler_static='-qstaticlink'
        ;;
       *)
        case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl=''
+         ;;
+       *Sun\ F* | *Sun*Fortran*)
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl='-Qoption ld '
+         ;;
        *Sun\ C*)
          # Sun C 5.9
          lt_prog_compiler_pic='-KPIC'
          lt_prog_compiler_static='-Bstatic'
          lt_prog_compiler_wl='-Wl,'
          ;;
-       *Sun\ F*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         lt_prog_compiler_pic='-KPIC'
+        *Intel*\ [CF]*Compiler*)
+         lt_prog_compiler_wl='-Wl,'
+         lt_prog_compiler_pic='-fPIC'
+         lt_prog_compiler_static='-static'
+         ;;
+       *Portland\ Group*)
+         lt_prog_compiler_wl='-Wl,'
+         lt_prog_compiler_pic='-fpic'
          lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl=''
          ;;
        esac
        ;;
@@ -8959,7 +10221,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-KPIC'
       lt_prog_compiler_static='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
        lt_prog_compiler_wl='-Qoption ld ';;
       *)
        lt_prog_compiler_wl='-Wl,';;
@@ -8979,7 +10241,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/necthen
        lt_prog_compiler_pic='-Kconform_pic'
        lt_prog_compiler_static='-Bstatic'
       fi
@@ -9008,7 +10270,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic=
     ;;
@@ -9016,27 +10278,31 @@ case $host_os in
     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
 #
 if test -n "$lt_prog_compiler_pic"; then
-  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -9046,15 +10312,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9049: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9053: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works=yes
@@ -9063,10 +10329,10 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
     case $lt_prog_compiler_pic in
      "" | " "*) ;;
      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
 
 
 
+
+
+
+
+
 #
 # Check to make sure the static flag actually works.
 #
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9102,7 +10373,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works=yes
@@ -9112,13 +10383,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
     :
 else
     lt_prog_compiler_static=
@@ -9130,9 +10401,9 @@ fi
 
 
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -9151,16 +10422,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9154: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9158: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -9177,7 +10448,7 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
@@ -9185,9 +10456,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -9206,16 +10477,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9209: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9213: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -9232,16 +10503,16 @@ else
    $RM conftest*
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
   hard_links=yes
   $RM conftest*
@@ -9249,11 +10520,11 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -9265,7 +10536,7 @@ fi
 
 
 
-  { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
   runpath_var=
@@ -9281,7 +10552,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -9297,9 +10567,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9314,7 +10584,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -9322,30 +10592,60 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu | gnu*)
+    link_all_deplibs=no
+    ;;
   esac
 
   ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test yes = "$with_gnu_ld"; then
+    case $host_os in
+      aix*)
+       # The AIX port of GNU ld has always aspired to compatibility
+       # with the native linker.  However, as the warning in the GNU ld
+       # block says, versions before 2.19.5* couldn't really create working
+       # shared libraries, regardless of the interface used.
+       case `$LD -v 2>&1` in
+         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+         *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+         *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+         *)
+           lt_use_gnu_ld_interface=yes
+           ;;
+       esac
+       ;;
+      *)
+       lt_use_gnu_ld_interface=yes
+       ;;
+    esac
+  fi
+
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+    export_dynamic_flag_spec='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -9357,15 +10657,16 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
        ld_shlibs=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -9375,7 +10676,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -9391,7 +10692,7 @@ _LT_EOF
        allow_undefined_flag=unsupported
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
        # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
        ld_shlibs=no
       fi
@@ -9401,61 +10702,97 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
+      export_dynamic_flag_spec='$wl--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file, use it as
+       # is; otherwise, prepend EXPORTS...
+       archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
        ld_shlibs=no
       fi
       ;;
 
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
+      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+      export_dynamic_flag_spec='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
        case $cc_basename in
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
        esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
+        && test no = "$tmp_diet"
       then
-       tmp_addflag=
+       tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag'
          ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+       pgf77* | pgf90* | pgf95* | pgfortran*)
+                                       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -9466,39 +10803,47 @@ _LT_EOF
        lf95*)                          # Lahey Fortran 8.1
          whole_archive_flag_spec=
          tmp_sharedflag='--shared' ;;
-       xl[cC]*)                        # IBM XL C 8.0 on PPC (deal with xlf below)
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
+       xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
          tmp_sharedflag='-qmkshrobj'
          tmp_addflag= ;;
+       nvcc*)  # Cuda Compiler Driver 2.2
+         whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+         compiler_needs_object=yes
+         ;;
        esac
        case `$CC -V 2>&1 | sed 5q` in
        *Sun\ C*)                       # Sun C 5.9
-         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          compiler_needs_object=yes
          tmp_sharedflag='-G' ;;
        *Sun\ F*)                       # Sun Fortran 8.3
          tmp_sharedflag='-G' ;;
        esac
-       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
        case $cc_basename in
-       xlf*)
+       tcc*)
+         export_dynamic_flag_spec='-rdynamic'
+         ;;
+       xlf* | bgf* | bgxlf* | mpixlf*)
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
          whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-         hardcode_libdir_flag_spec=
-         hardcode_libdir_flag_spec_ld='-rpath $libdir'
-         archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
+         hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+         archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+         if test yes = "$supports_anon_versioning"; then
            archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
          ;;
        esac
@@ -9512,8 +10857,8 @@ _LT_EOF
        archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        wlarc=
       else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -9531,8 +10876,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        ld_shlibs=no
       fi
@@ -9544,7 +10889,7 @@ _LT_EOF
        ld_shlibs=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -9559,9 +10904,9 @@ _LT_EOF
          # DT_RUNPATH tag from executables and libraries.  But doing so
          # requires that you compile everything twice, which is a pain.
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+           hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
          else
            ld_shlibs=no
          fi
@@ -9578,15 +10923,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        ld_shlibs=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs" = no; then
+    if test no = "$ld_shlibs"; then
       runpath_var=
       hardcode_libdir_flag_spec=
       export_dynamic_flag_spec=
@@ -9602,7 +10947,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
        # Neither direct hardcoding nor static linking is supported with a
        # broken collect2.
        hardcode_direct=unsupported
@@ -9610,32 +10955,57 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # On IA64, the linker does run time linking by default, so we don't
        # have to do anything special.
        aix_use_runtimelinking=no
        exp_sym_flag='-Bexport'
-       no_entry_flag=""
+       no_entry_flag=
       else
        # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+       # Without the "-l" option, or with the "-B" option, AIX nm treats
+       # weak defined symbols like other global defined symbols, whereas
+       # GNU nm marks them as "W".
+       # While the 'weak' keyword is ignored in the Export File, we need
+       # it in the Import File for the 'aix-soname' feature, so we have
+       # to replace the "-B" option with "-P" for AIX nm.
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
        else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
        # Test if we are trying to use run time linking or normal
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
+       # have runtime linking enabled, and use it for executables.
+       # For shared libraries, we enable/disable runtime linking
+       # depending on the kind of the shared library created -
+       # when "with_aix_soname,aix_use_runtimelinking" is:
+       # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "aix,yes"  lib.so          shared, rtl:yes, for executables
+       #            lib.a           static archive
+       # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+       #            lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a(lib.so.V) shared, rtl:no
+       # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a           static archive
        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
          for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
            aix_use_runtimelinking=yes
            break
          fi
          done
+         if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+           # With aix-soname=svr4, we create the lib.so.V shared archives only,
+           # so we don't have lib.a shared libs to link our executables.
+           # We have to force runtime linking in this case.
+           aix_use_runtimelinking=yes
+           LDFLAGS="$LDFLAGS -Wl,-brtl"
+         fi
          ;;
        esac
 
@@ -9654,13 +11024,21 @@ _LT_EOF
       hardcode_direct_absolute=yes
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
+      file_list_spec='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+       # The Import File defines what to hardcode.
+       hardcode_direct=no
+       hardcode_direct_absolute=no
+       ;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
        case $host_os in aix4.[012]|aix4.[012].*)
        # We only want to do this on AIX 4.2 and lower, the check
        # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
+         collect2name=`$CC -print-prog-name=collect2`
          if test -f "$collect2name" &&
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
          then
@@ -9679,111 +11057,101 @@ _LT_EOF
          ;;
        esac
        shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
+       if test yes = "$aix_use_runtimelinking"; then
+         shared_flag="$shared_flag "'$wl-G'
        fi
-       link_all_deplibs=no
+       # Need to ensure runtime linking is disabled for the traditional
+       # shared library, or the linker may eventually find shared libraries
+       # /with/ Import File - we do not want to mix them.
+       shared_flag_aix='-shared'
+       shared_flag_svr4='-shared $wl-G'
       else
        # not using gcc
-       if test "$host_cpu" = ia64; then
+       if test ia64 = "$host_cpu"; then
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
        # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
        else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
+         if test yes = "$aix_use_runtimelinking"; then
+           shared_flag='$wl-G'
          else
-           shared_flag='${wl}-bM:SRE'
+           shared_flag='$wl-bM:SRE'
          fi
+         shared_flag_aix='$wl-bM:SRE'
+         shared_flag_svr4='$wl-G'
        fi
       fi
 
-      export_dynamic_flag_spec='${wl}-bexpall'
+      export_dynamic_flag_spec='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
        # Warning - without using the other runtime loading flags (-brtl),
        # -berok will link without error, but may produce a broken library.
        allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $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
+        if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=/usr/lib:/lib
+  fi
 
 fi
 
-rm -rf conftest.dSYM
-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
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+       if test ia64 = "$host_cpu"; then
+         hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
          allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
        else
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+        if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -9794,62 +11162,59 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_link "$LINENO"; then :
 
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=/usr/lib:/lib
+  fi
 
 fi
 
-rm -rf conftest.dSYM
-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
+  aix_libpath=$lt_cv_aix_libpath_
+fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec='$convenience'
+         no_undefined_flag=' $wl-bernotok'
+         allow_undefined_flag=' $wl-berok'
+         if test yes = "$with_gnu_ld"; then
+           # We only use this code for GNU lds that support --whole-archive.
+           whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+         else
+           # Exported symbols can be pulled into shared objects from archives
+           whole_archive_flag_spec='$convenience'
+         fi
          archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+         archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+         # -brtl affects multiple linker settings, -berok does not and is overridden later
+         compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+         if test svr4 != "$with_aix_soname"; then
+           # This is similar to how AIX traditionally builds its shared libraries.
+           archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+         fi
+         if test aix != "$with_aix_soname"; then
+           archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+         else
+           # used by -dlpreopen to get the symbols
+           archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+         fi
+         archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
        fi
       fi
       ;;
@@ -9858,7 +11223,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -9878,20 +11243,65 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
+      case $cc_basename in
+      cl*)
+       # Native MSVC
+       hardcode_libdir_flag_spec=' '
+       allow_undefined_flag=unsupported
+       always_export_symbols=yes
+       file_list_spec='@'
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=.dll
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+       archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[   ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([     ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
+       # The linker will not automatically build a static lib if we build a DLL.
+       # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+       enable_shared_with_static_runtimes=yes
+       exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+       # Don't use ranlib
+       old_postinstall_cmds='chmod 644 $oldlib'
+       postlink_cmds='lt_outputfile="@OUTPUT@"~
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
+       ;;
+      *)
+       # Assume MSVC wrapper
+       hardcode_libdir_flag_spec=' '
+       allow_undefined_flag=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=.dll
+       # FIXME: Setting linknames here is a bad hack.
+       archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       old_archive_from_new_cmds='true'
+       # FIXME: Should let the user specify the lib program.
+       old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       enable_shared_with_static_runtimes=yes
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -9901,19 +11311,24 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+  else
+    whole_archive_flag_spec=''
+  fi
   link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
+  allow_undefined_flag=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
@@ -9927,10 +11342,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -9943,7 +11354,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -9952,41 +11363,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       hardcode_shlibpath_var=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+       archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_direct=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
+      export_dynamic_flag_spec='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+       archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_flag_spec_ld='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
        hardcode_libdir_separator=:
        hardcode_direct=yes
        hardcode_direct_absolute=yes
-       export_dynamic_flag_spec='${wl}-E'
+       export_dynamic_flag_spec='$wl-E'
        # hardcode_minus_L: Not really in the search PATH,
        # but as the default location of the library.
        hardcode_minus_L=yes
@@ -9994,33 +11404,72 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
        case $host_cpu in
        hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       else
        case $host_cpu in
        hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+
+         # Older versions of the 11.00 compiler do not understand -b yet
+         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler__b=no
+   save_LDFLAGS=$LDFLAGS
+   LDFLAGS="$LDFLAGS -b"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler__b=yes
+       fi
+     else
+       lt_cv_prog_compiler__b=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
          ;;
        esac
       fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+       hardcode_libdir_flag_spec='$wl+b $wl$libdir'
        hardcode_libdir_separator=:
 
        case $host_cpu in
@@ -10031,7 +11480,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        *)
          hardcode_direct=yes
          hardcode_direct_absolute=yes
-         export_dynamic_flag_spec='${wl}-E'
+         export_dynamic_flag_spec='$wl-E'
 
          # hardcode_minus_L: Not really in the search PATH,
          # but as the default location of the library.
@@ -10042,61 +11491,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
        # Try to use the -exported_symbol ld option, if it does not
        # work, assume that -exports_file does not work either and
        # implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat >conftest.$ac_ext <<_ACEOF
-int foo(void) {}
+       # This should be the same for all languages, so no per-tag cache variable.
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS=$LDFLAGS
+          LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo (void) { 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_irix_exported_symbol=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+  lt_cv_irix_exported_symbol=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+       if test yes = "$lt_cv_irix_exported_symbol"; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+       fi
+       link_all_deplibs=no
       else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       inherit_rpath=yes
       link_all_deplibs=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       ld_shlibs=yes
+       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      esac
+      ;;
+
     netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -10111,7 +11558,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     newsos6)
       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_shlibpath_var=no
       ;;
@@ -10119,27 +11566,19 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
        hardcode_direct=yes
        hardcode_shlibpath_var=no
        hardcode_direct_absolute=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-         export_dynamic_flag_spec='${wl}-E'
+         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+         hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+         export_dynamic_flag_spec='$wl-E'
        else
-         case $host_os in
-          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            hardcode_libdir_flag_spec='-R$libdir'
-            ;;
-          *)
-            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-            ;;
-         esac
+         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         hardcode_libdir_flag_spec='$wl-rpath,$libdir'
        fi
       else
        ld_shlibs=no
@@ -10150,33 +11589,53 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+       archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
        allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       ;;
 
     osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+       allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+       archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+       hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       else
        allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
        archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10187,24 +11646,24 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 
     solaris*)
       no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       wlarc='$wl'
+       archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
        archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
          wlarc=''
-         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
          archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
          ;;
        *)
-         wlarc='${wl}'
-         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         wlarc='$wl'
+         archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
          archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
          ;;
        esac
       fi
@@ -10214,11 +11673,11 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
        # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but understands '-z linker_flag'.  GCC discards it without '$wl',
        # but is careful enough not to reorder.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       if test yes = "$GCC"; then
+         whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
        else
          whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
        fi
@@ -10228,10 +11687,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
        # Use $CC to link under sequent, because it throws in some extra .o
        # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
        archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -10280,43 +11739,43 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
+      no_undefined_flag='$wl-z,text'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
+      no_undefined_flag='$wl-z,text'
+      allow_undefined_flag='$wl-z,nodefs'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_flag_spec='$wl-R,$libdir'
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
+      export_dynamic_flag_spec='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -10331,18 +11790,18 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       export_dynamic_flag_spec='${wl}-Blargedynsym'
+       export_dynamic_flag_spec='$wl-Blargedynsym'
        ;;
       esac
     fi
   fi
 
-{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
 $as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
 
@@ -10368,7 +11827,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -10377,46 +11836,52 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  $as_echo "$as_me:$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
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$lt_prog_compiler_wl
+         pic_flag=$lt_prog_compiler_pic
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$allow_undefined_flag
+         allow_undefined_flag=
+         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
-  $as_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*
-      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+         then
+           lt_cv_archive_cmds_need_lc=no
+         else
+           lt_cv_archive_cmds_need_lc=yes
+         fi
+         allow_undefined_flag=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
       ;;
     esac
   fi
@@ -10574,52 +12039,61 @@ esac
 
 
 
-
-
-
-
-
-  { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
+  case $host_os in
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
+  esac
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -10629,14 +12103,20 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[lt_foo]++; }
   if (lt_freq[lt_foo] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -10653,56 +12133,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
           echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+          echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
        :
       else
        can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -10712,27 +12244,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -10744,16 +12276,17 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -10769,37 +12302,84 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH 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.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        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}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -10809,8 +12389,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -10820,18 +12400,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -10839,25 +12415,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -10876,13 +12453,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -10899,14 +12479,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -10914,8 +12495,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -10924,20 +12505,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -10948,16 +12531,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
+       if test yes = "$lt_cv_prog_gnu_ld"; then
+               version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
        fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -10976,8 +12559,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -10986,26 +12569,47 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+        LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -11016,52 +12620,33 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
-  shlibpath_overrides_runpath=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
 
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -11091,12 +12676,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -11105,8 +12690,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -11115,58 +12700,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  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
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -11174,11 +12769,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -11188,145 +12783,768 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      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 | sysv4.3*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      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 # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=sco
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test yes = "$with_gnu_ld"; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    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'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test yes = "$hardcode_automatic"; then
+
+  # We can hardcode non-existent directories.
+  if test no != "$hardcode_direct" &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+     test no != "$hardcode_minus_L"; 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test relink = "$hardcode_action" ||
+   test yes = "$inherit_rpath"; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+  if test yes != "$enable_dlopen"; 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* | cegcc*)
+    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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else
+
+    lt_cv_dlopen=dyld
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
 
-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
-  ;;
+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
-  shlibpath_overrides_runpath=yes
-  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'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    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'
-  ;;
+    ;;
 
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  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}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
 
-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
-  ;;
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+  lt_cv_dlopen=shl_load
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+  lt_cv_dlopen=dlopen
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-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"
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+/* 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
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
 fi
 
 
+fi
 
 
+fi
 
 
+fi
 
 
+fi
 
+    ;;
+  esac
 
+  if test no = "$lt_cv_dlopen"; then
+    enable_dlopen=no
+  else
+    enable_dlopen=yes
+  fi
 
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && 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"
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+         if test yes = "$cross_compiling"; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
 
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
+#include <stdio.h>
 
+#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
 
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
 
+int fnord () { return 42; }
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
 
+    if test yes = "$lt_cv_dlopen_self"; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+         if test yes = "$cross_compiling"; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
 
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
+#include <stdio.h>
 
+#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
 
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
 
+int fnord () { return 42; }
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$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
 
 
 
 
 
 
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&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"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "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"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
 
 
 
 
 
 
+  # Report what library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test no = "$can_build_shared" && enable_shared=no
 
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test yes = "$enable_shared" && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
 
+  aix[4-9]*)
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;                  # shared object as lib.so file only
+      yes,svr4,*) ;;                   # shared object as lib.so archive member only
+      yes,*) enable_static=no ;;       # shared object in lib.a archive as well
+      esac
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test yes = "$enable_shared" || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
 
 
 
 
+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
 
 
 
 
 
 
-  { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
-   test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
 
-  # We can hardcode non-existent 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_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
-{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
 
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; 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_config_commands="$ac_config_commands libtool"
 
 
 
 
-  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=
+# Only expand once:
 
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
 
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
 
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
+# initialize libtool to build .la files
 
-  darwin*)
-  # if libdl is installed we need to link against it
-    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# add these options to CFLAGS if the compiler supports them
 
-       ac_cv_lib_dl_dlopen=no
-fi
+# Do not use the -ansi flag, currently there is a bug in MinGW/MinGW-w64
+# which prevents Check from compiling. Add after this is resolved:
+#    sourceforge.net/p/mingw/bugs/2024
+#AX_CFLAGS_WARN_ALL_ANSI
+# Do not use the -pedantic flag, as on solaris it has a different
+# meaning than on gcc. Using the flag causes the build to fail.
 
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""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
 
-    ;;
 
-  *)
-    { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
-$as_echo_n "checking for shl_load... " >&6; }
-if test "${ac_cv_func_shl_load+set}" = set; then
+  flag=`echo "-Wextra" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wextra flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wextra flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&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 <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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
 
-#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
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wextra"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
 
 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_shl_load=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_shl_load=no
+      eval "ax_cv_c_check_flag_$flag=no"
+
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$save_CFLAGS"
+
+    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
+
+
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-$as_echo "$ac_cv_func_shl_load" >&6; }
-if test "x$ac_cv_func_shl_load" = x""yes; then
-  lt_cv_dlopen="shl_load"
-else
-  { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  $as_echo_n "(cached) " >&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.  */
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -Wextra"
 
-/* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dld_shl_load=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_dld_shl_load=no
-fi
+    :
+
 
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
-$as_echo_n "checking for dlopen... " >&6; }
-if test "${ac_cv_func_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&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 <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dlopen=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_dlopen=no
-fi
+  flag=`echo "-Wstrict-prototypes" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-$as_echo "$ac_cv_func_dlopen" >&6; }
-if test "x$ac_cv_func_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wstrict-prototypes flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wstrict-prototypes flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&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
+
+
+    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
+
+
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wstrict-prototypes"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dl_dlopen=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_dl_dlopen=no
+      eval "ax_cv_c_check_flag_$flag=no"
+
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$save_CFLAGS"
+
+    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
+
+
 
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -Wstrict-prototypes"
+
 else
-  { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+
+    :
+
+
+fi
+
+
+
+
+
+
+  flag=`echo "-Wmissing-prototypes" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wmissing-prototypes flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wmissing-prototypes flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&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
+
+
+    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
+
+
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wmissing-prototypes"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_svld_dlopen=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_svld_dlopen=no
+      eval "ax_cv_c_check_flag_$flag=no"
+
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$save_CFLAGS"
+
+    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
+
+
 
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -Wmissing-prototypes"
+
 else
-  { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+
+    :
+
+
+fi
+
+
+
+
+
+
+  flag=`echo "-Wwrite-strings" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wwrite-strings flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wwrite-strings flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&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
+
+
+    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
+
+
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wwrite-strings"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dld_dld_link=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_dld_dld_link=no
-fi
+      eval "ax_cv_c_check_flag_$flag=no"
 
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+    CFLAGS="$save_CFLAGS"
+
+    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
 
 
 fi
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
 
-fi
+    :
+    CFLAGS="$CFLAGS -Wwrite-strings"
 
+else
 
-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"
 
-    { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then
+  flag=`echo "-Wno-variadic-macros" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wno-variadic-macros flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wno-variadic-macros flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&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 <<_LT_EOF
-#line 12022 "configure"
-#include "confdefs.h"
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
 
-#include <stdio.h>
+    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
 
-#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
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wno-variadic-macros"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-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 ());
+int
+main ()
+{
 
-  return status;
+  ;
+  return 0;
 }
-_LT_EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_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
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
+else
+
+      eval "ax_cv_c_check_flag_$flag=no"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$save_CFLAGS"
+
+    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
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -Wno-variadic-macros"
+
+else
+
+    :
+
+
 fi
-rm -fr conftest*
 
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-$as_echo "$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\"
-      { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then
+
+
+
+  flag=`echo "-Wimport" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wimport flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wimport flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&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 <<_LT_EOF
-#line 12118 "configure"
-#include "confdefs.h"
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
 
-#include <stdio.h>
+    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
 
-#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
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wimport"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-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 ());
+int
+main ()
+{
 
-  return status;
+  ;
+  return 0;
 }
-_LT_EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_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
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
+else
+
+      eval "ax_cv_c_check_flag_$flag=no"
+
 fi
-rm -fr conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+    CFLAGS="$save_CFLAGS"
+
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
-    fi
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -Wimport"
+
+else
+
+    :
 
-  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
 
 
 
 
 
+  flag=`echo "-Wfatal-errors" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wfatal-errors flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wfatal-errors flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
 
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wfatal-errors"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+      eval "ax_cv_c_check_flag_$flag=yes"
 
-striplib=
-old_striplib=
-{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&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"
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "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"
-      { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
+
+      eval "ax_cv_c_check_flag_$flag=no"
+
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+    CFLAGS="$save_CFLAGS"
 
+    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
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
 
+    :
+    CFLAGS="$CFLAGS -Wfatal-errors"
 
+else
 
+    :
 
 
+fi
 
-  # Report which library types will actually be built
-  { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
-  { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
 
-  { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
 
-  # 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
-    ;;
 
-  aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
 
-  { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
 
+  flag=`echo "-Wformat=2" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wformat=2 flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wformat=2 flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
 
-fi
-ac_ext=c
+    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"
 
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Wformat=2"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
+else
 
+      eval "ax_cv_c_check_flag_$flag=no"
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+    CFLAGS="$save_CFLAGS"
 
+    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
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
 
+    :
+    CFLAGS="$CFLAGS -Wformat=2"
 
+else
 
+    :
 
-        ac_config_commands="$ac_config_commands libtool"
 
+fi
 
 
 
-# Only expand once:
 
 
 
-# add these options to CFLAGS if the compiler supports them
+  flag=`echo "-Winit-self" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
-{ $as_echo "$as_me:$LINENO: checking CFLAGS for maximum ansi warnings" >&5
-$as_echo_n "checking CFLAGS for maximum ansi warnings... " >&6; }
-if test "${ac_cv_cflags_warn_all_ansi+set}" = set; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Winit-self flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Winit-self flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_cflags_warn_all_ansi="no, unknown"
 
- ac_ext=c
+
+    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_save_CFLAGS="$CFLAGS"
-# IRIX C compiler:
-#      -use_readonly_const is the default for IRIX C,
-#       puts them into .rodata, but they are copied later.
-#       need to be "-G0 -rdatashared" for strictmode but
-#       I am not sure what effect that has really.         - guidod
-for ac_arg in "-pedantic  % -Wall -ansi -pedantic"          "-xstrconst % -v -Xc"                         "-std1      % -verbose -w0 -warnprotos -std1"    " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"    " % -ansi -ansiE -fullwarn"                   "+ESlit     % +w1 -Aa"                        "-Xc        % -pvctl,fullmsg -Xc"           "-h conform % -h msglevel 2 -h conform"       #
-do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -Winit-self"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 int
 main ()
 {
-return 0;
+
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_cflags_warn_all_ansi=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+      eval "ax_cv_c_check_flag_$flag=yes"
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
+      eval "ax_cv_c_check_flag_$flag=no"
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
- CFLAGS="$ac_save_CFLAGS"
- ac_ext=c
+
+    CFLAGS="$save_CFLAGS"
+
+    ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cflags_warn_all_ansi" >&5
-$as_echo "$ac_cv_cflags_warn_all_ansi" >&6; }
-case ".$ac_cv_cflags_warn_all_ansi" in
-     .ok|.ok,*)  ;;
-   .|.no|.no,*)
- ;;
-   *)
-   if echo " $CFLAGS " | grep " $ac_cv_cflags_warn_all_ansi " 2>&1 >/dev/null
-   then { ($as_echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_warn_all_ansi") >&5
-  (: CFLAGS does contain $ac_cv_cflags_warn_all_ansi) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-   else { ($as_echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_warn_all_ansi\"") >&5
-  (: CFLAGS="$CFLAGS $ac_cv_cflags_warn_all_ansi") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-                      CFLAGS="$CFLAGS $ac_cv_cflags_warn_all_ansi"
-   fi
- ;;
-esac
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -Winit-self"
+
+else
+
+    :
 
 
+fi
 
 
 
 
-  flag=`echo "-Wextra" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wextra flag" >&5
-$as_echo_n "checking whether the C compiler accepts the -Wextra flag... " >&6; }
-if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then
+
+  flag=`echo "-Wmissing-include-dirs" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wmissing-include-dirs flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wmissing-include-dirs flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -12463,15 +14378,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
     save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Wextra"
-    cat >conftest.$ac_ext <<_ACEOF
-
-      /* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    CFLAGS="$CFLAGS -Wmissing-include-dirs"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 int
 main ()
 {
@@ -12481,36 +14392,15 @@ main ()
 }
 
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
 
       eval "ax_cv_c_check_flag_$flag=yes"
 
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
 
       eval "ax_cv_c_check_flag_$flag=no"
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     CFLAGS="$save_CFLAGS"
@@ -12524,15 +14414,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 fi
-ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 
-  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
 
     :
-    CFLAGS="$CFLAGS -Wextra"
+    CFLAGS="$CFLAGS -Wmissing-include-dirs"
 
 else
 
 
 
 
+  flag=`echo "-Wswitch-default" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
-  flag=`echo "-Wstrict-prototypes" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
-
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wstrict-prototypes flag" >&5
-$as_echo_n "checking whether the C compiler accepts the -Wstrict-prototypes flag... " >&6; }
-if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wswitch-default flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wswitch-default flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -12564,15 +14452,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
     save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Wstrict-prototypes"
-    cat >conftest.$ac_ext <<_ACEOF
-
-      /* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    CFLAGS="$CFLAGS -Wswitch-default"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 int
 main ()
 {
@@ -12582,36 +14466,15 @@ main ()
 }
 
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
 
       eval "ax_cv_c_check_flag_$flag=yes"
 
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
 
       eval "ax_cv_c_check_flag_$flag=no"
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     CFLAGS="$save_CFLAGS"
@@ -12625,15 +14488,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 fi
-ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 
-  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
 
     :
-    CFLAGS="$CFLAGS -Wstrict-prototypes"
+    CFLAGS="$CFLAGS -Wswitch-default"
 
 else
 
 
 
 
+  flag=`echo "-Wunknown-pragmas" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
-  flag=`echo "-Wmissing-prototypes" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
-
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wmissing-prototypes flag" >&5
-$as_echo_n "checking whether the C compiler accepts the -Wmissing-prototypes flag... " >&6; }
-if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -Wunknown-pragmas flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -Wunknown-pragmas flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -12665,15 +14526,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
     save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Wmissing-prototypes"
-    cat >conftest.$ac_ext <<_ACEOF
-
-      /* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    CFLAGS="$CFLAGS -Wunknown-pragmas"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 int
 main ()
 {
@@ -12683,36 +14540,15 @@ main ()
 }
 
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
 
       eval "ax_cv_c_check_flag_$flag=yes"
 
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
 
       eval "ax_cv_c_check_flag_$flag=no"
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     CFLAGS="$save_CFLAGS"
@@ -12726,15 +14562,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 fi
-ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 
-  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
 
     :
-    CFLAGS="$CFLAGS -Wmissing-prototypes"
+    CFLAGS="$CFLAGS -Wunknown-pragmas"
 
 else
 
@@ -12743,17 +14578,21 @@ else
 
 fi
 
+# The following flag is to enable C99 support on AIX, which is
+# necessary for variable macros in check.h
+case "${host_os}" in
+    *aix*)
+    if ! test "$GCC" = "yes"; then
 
 
 
 
 
+  flag=`echo "-qlanglvl=stdc99" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
 
-  flag=`echo "-Wwrite-strings" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
-
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wwrite-strings flag" >&5
-$as_echo_n "checking whether the C compiler accepts the -Wwrite-strings flag... " >&6; }
-if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts the -qlanglvl=stdc99 flag" >&5
+$as_echo_n "checking whether the C compiler accepts the -qlanglvl=stdc99 flag... " >&6; }
+if eval \${ax_cv_c_check_flag_$flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -12766,15 +14605,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
     save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Wwrite-strings"
-    cat >conftest.$ac_ext <<_ACEOF
-
-      /* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    CFLAGS="$CFLAGS -qlanglvl=stdc99"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 int
 main ()
 {
@@ -12784,36 +14619,15 @@ main ()
 }
 
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+if ac_fn_c_try_compile "$LINENO"; then :
 
       eval "ax_cv_c_check_flag_$flag=yes"
 
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
 
       eval "ax_cv_c_check_flag_$flag=no"
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     CFLAGS="$save_CFLAGS"
@@ -12827,2660 +14641,2245 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 fi
-ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then
-
-    :
-    CFLAGS="$CFLAGS -Wwrite-strings"
-
+eval ac_res=\$ax_cv_c_check_flag_$flag
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then :
+
+    :
+    CFLAGS="$CFLAGS -qlanglvl=stdc99"
+
+else
+
+    :
+
+
+fi
+
+    fi
+    ;;
+    *)
+    ;;
+esac
+
+for ac_prog in gcov
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_GCOV+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GCOV"; then
+  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GCOV="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+GCOV=$ac_cv_prog_GCOV
+if test -n "$GCOV"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
+$as_echo "$GCOV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$GCOV" && break
+done
+test -n "$GCOV" || GCOV="false"
+
+for ac_prog in lcov
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LCOV+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LCOV"; then
+  ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LCOV="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LCOV=$ac_cv_prog_LCOV
+if test -n "$LCOV"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
+$as_echo "$LCOV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$LCOV" && break
+done
+test -n "$LCOV" || LCOV="false"
+
+for ac_prog in genhtml
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_GENHTML+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GENHTML"; then
+  ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GENHTML="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+GENHTML=$ac_cv_prog_GENHTML
+if test -n "$GENHTML"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
+$as_echo "$GENHTML" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$GENHTML" && break
+done
+test -n "$GENHTML" || GENHTML="false"
+
+for ac_prog in tex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_TEX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$TEX"; then
+  ac_cv_prog_TEX="$TEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_TEX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+TEX=$ac_cv_prog_TEX
+if test -n "$TEX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEX" >&5
+$as_echo "$TEX" >&6; }
 else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    :
 
+  test -n "$TEX" && break
+done
+test -n "$TEX" || TEX="false"
 
+if test "$TEX" = "false"; then
+    # Make it [somewhat] clear to maintainers that tex is missing. Not an error
+    # though because 'make install' (which users need) does not build the docs
+    # anyway.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: tex not installed: cannot rebuild HTML documentation." >&5
+$as_echo "$as_me: WARNING: tex not installed: cannot rebuild HTML documentation." >&2;}
 fi
+for ac_prog in filterdiff
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_FILTERDIFF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$FILTERDIFF"; then
+  ac_cv_prog_FILTERDIFF="$FILTERDIFF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_FILTERDIFF="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+FILTERDIFF=$ac_cv_prog_FILTERDIFF
+if test -n "$FILTERDIFF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILTERDIFF" >&5
+$as_echo "$FILTERDIFF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+  test -n "$FILTERDIFF" && break
+done
+test -n "$FILTERDIFF" || FILTERDIFF="false"
 
+if test "$FILTERDIFF" = "false"; then
+    # Make it [somewhat] clear to maintainers that filterdiff is missing.
+    # This is not an error, but will prevent builds from being
+    # reproducible.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: filterdiff not installed; build will not be reproducible." >&5
+$as_echo "$as_me: WARNING: filterdiff not installed; build will not be reproducible." >&2;}
+fi
 
+ if test x"$FILTERDIFF" = x"filterdiff"; then
+  USE_FILTERDIFF_TRUE=
+  USE_FILTERDIFF_FALSE='#'
+else
+  USE_FILTERDIFF_TRUE='#'
+  USE_FILTERDIFF_FALSE=
+fi
 
 
-  flag=`echo "-Wno-variadic-macros" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+# Checks for pthread implementation.
 
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler accepts the -Wno-variadic-macros flag" >&5
-$as_echo_n "checking whether the C compiler accepts the -Wno-variadic-macros flag... " >&6; }
-if { as_var=ax_cv_c_check_flag_$flag; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
 
 
-    ac_ext=c
+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
 
+acx_pthread_ok=no
 
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Wno-variadic-macros"
-    cat >conftest.$ac_ext <<_ACEOF
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
 
-      /* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* 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 pthread_join ();
 int
 main ()
 {
-
+return pthread_join ();
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 "ax_cv_c_check_flag_$flag=yes"
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-      eval "ax_cv_c_check_flag_$flag=no"
-
+if ac_fn_c_try_link "$LINENO"; then :
+  acx_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-    CFLAGS="$save_CFLAGS"
-
-    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
-
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
 
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
 
-fi
-ac_res=`eval 'as_val=${'ax_cv_c_check_flag_$flag'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 
-  if eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"; then
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
 
-    :
-    CFLAGS="$CFLAGS -Wno-variadic-macros"
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
 
-else
+case "${host_cpu}-${host_os}" in
+        *solaris*)
 
-    :
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
 
+        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+        ;;
+esac
 
-fi
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
 
+        case $flag in
+                none)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+                ;;
 
+                -*)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
 
-for ac_prog in gcov
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+               pthread-config)
+               # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_GCOV+set}" = set; then
+if ${ac_cv_prog_acx_pthread_config+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GCOV"; then
-  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
+  if test -n "$acx_pthread_config"; then
+  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # 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_GCOV="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_acx_pthread_config="yes"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
+  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
 fi
 fi
-GCOV=$ac_cv_prog_GCOV
-if test -n "$GCOV"; then
-  { $as_echo "$as_me:$LINENO: result: $GCOV" >&5
-$as_echo "$GCOV" >&6; }
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$GCOV" && break
-done
-test -n "$GCOV" || GCOV="false"
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+               ;;
 
-for ac_prog in lcov
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LCOV+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LCOV"; then
-  ac_cv_prog_LCOV="$LCOV" # 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_LCOV="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+                *)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
 
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  acx_pthread_ok=yes
 fi
-fi
-LCOV=$ac_cv_prog_LCOV
-if test -n "$LCOV"; then
-  { $as_echo "$as_me:$LINENO: result: $LCOV" >&5
-$as_echo "$LCOV" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 
-  test -n "$LCOV" && break
-done
-test -n "$LCOV" || LCOV="false"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
 
-for ac_prog in genhtml
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_GENHTML+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$GENHTML"; then
-  ac_cv_prog_GENHTML="$GENHTML" # 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_GENHTML="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
 done
-IFS=$as_save_IFS
-
 fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+       attr_name=unknown
+       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr=$attr; return attr;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  attr_name=$attr; break
 fi
-GENHTML=$ac_cv_prog_GENHTML
-if test -n "$GENHTML"; then
-  { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5
-$as_echo "$GENHTML" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+       done
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
 
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
 
-  test -n "$GENHTML" && break
-done
-test -n "$GENHTML" || GENHTML="false"
+        fi
 
-for ac_prog in tex
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+        flag=no
+        case "${host_cpu}-${host_os}" in
+            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with xlc_r or cc_r
+       if test x"$GCC" != xyes; then
+          for ac_prog in xlc_r cc_r
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_TEX+set}" = set; then
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$TEX"; then
-  ac_cv_prog_TEX="$TEX" # Let the user override the test.
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_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_TEX="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PTHREAD_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
-TEX=$ac_cv_prog_TEX
-if test -n "$TEX"; then
-  { $as_echo "$as_me:$LINENO: result: $TEX" >&5
-$as_echo "$TEX" >&6; }
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$TEX" && break
+  test -n "$PTHREAD_CC" && break
 done
-test -n "$TEX" || TEX="false"
+test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
 
-if test -n "$TEX"; then
-    # Make it [somewhat] clear to maintainers that tex is missing. Not an error
-    # though because 'make install' (which users need) does not build the docs
-    # anyway.
-    { $as_echo "$as_me:$LINENO: WARNING: tex not installed: cannot rebuild HTML documentation." >&5
-$as_echo "$as_me: WARNING: tex not installed: cannot rebuild HTML documentation." >&2;}
+        else
+          PTHREAD_CC=$CC
+       fi
+else
+        PTHREAD_CC="$CC"
 fi
 
-# Checks for libraries.
-
-# Checks for header files.
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&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 <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
 
-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 <string.h>
+$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
 
-_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*
+        acx_pthread_ok=no
 
 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 $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 <stdlib.h>
-
-_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
+CC="$PTHREAD_CC"
 
-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
-  :
+# Check if floor is in the math library, and if so add -lm to LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
+$as_echo_n "checking for floor in -lm... " >&6; }
+if ${ac_cv_lib_m_floor+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#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)))
+/* 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 floor ();
 int
 main ()
 {
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
+return floor ();
+  ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_floor=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
+  ac_cv_lib_m_floor=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
+$as_echo "$ac_cv_lib_m_floor" >&6; }
+if test "x$ac_cv_lib_m_floor" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
 _ACEOF
 
+  LIBS="-lm $LIBS"
+
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if test "${ac_cv_header_sys_wait_h+set}" = set; then
+
+# Check if clock_gettime, timer_create, timer_settime, and timer_delete are available in lib rt, and if so,
+# add -lrt to LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime, timer_create, timer_settime, timer_delete in -lrt" >&5
+$as_echo_n "checking for clock_gettime, timer_create, timer_settime, timer_delete in -lrt... " >&6; }
+if ${ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
 
+/* 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 clock_gettime, timer_create, timer_settime, timer_delete ();
 int
 main ()
 {
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+return clock_gettime, timer_create, timer_settime, timer_delete ();
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_sys_wait_h=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_sys_wait_h=no
+  ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-if test $ac_cv_header_sys_wait_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_WAIT_H 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete" >&5
+$as_echo "$ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime__timer_create__timer_settime__timer_delete" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
 _ACEOF
 
+  LIBS="-lrt $LIBS"
+
 fi
 
 
+# check that struct timespec is defined in time.h. If not, we need to
+# define it in libcompat.h. Note the optional inclusion of pthread.h.
+# On MinGW and MinGW-w64, the pthread.h file contains the timespec
+# definition.
+ac_fn_c_check_member "$LINENO" "struct timespec" "tv_sec" "ac_cv_member_struct_timespec_tv_sec" "
+#include <time.h>
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
 
+"
+if test "x$ac_cv_member_struct_timespec_tv_sec" = xyes; then :
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TIMESPEC_TV_SEC 1
+_ACEOF
 
 
+else
 
+cat >>confdefs.h <<_ACEOF
+#define STRUCT_TIMESPEC_DEFINITION_MISSING 1
+_ACEOF
 
-for ac_header in fcntl.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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>
+ac_fn_c_check_member "$LINENO" "struct timespec" "tv_nsec" "ac_cv_member_struct_timespec_tv_nsec" "
+#include <time.h>
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+
+"
+if test "x$ac_cv_member_struct_timespec_tv_nsec" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TIMESPEC_TV_NSEC 1
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+cat >>confdefs.h <<_ACEOF
+#define STRUCT_TIMESPEC_DEFINITION_MISSING 1
+_ACEOF
+
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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>
+# check that struct itimerspec is defined in time.h. If not, we need to
+# define it in libcompat.h.  Note the optional inclusion of pthread.h.
+# On MinGW and MinGW-w64, the pthread.h file contains the itimerspec
+# definition.
+ac_fn_c_check_member "$LINENO" "struct itimerspec" "it_interval" "ac_cv_member_struct_itimerspec_it_interval" "
+#include <time.h>
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+
+"
+if test "x$ac_cv_member_struct_itimerspec_it_interval" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ITIMERSPEC_IT_INTERVAL 1
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+cat >>confdefs.h <<_ACEOF
+#define STRUCT_ITIMERSPEC_DEFINITION_MISSING 1
+_ACEOF
+
 fi
+ac_fn_c_check_member "$LINENO" "struct itimerspec" "it_value" "ac_cv_member_struct_itimerspec_it_value" "
+#include <time.h>
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+
+"
+if test "x$ac_cv_member_struct_itimerspec_it_value" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ITIMERSPEC_IT_VALUE 1
+_ACEOF
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ----------------------------------------------------------- ##
-## Report this to check-devel at lists dot sourceforge dot net ##
-## ----------------------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+cat >>confdefs.h <<_ACEOF
+#define STRUCT_ITIMERSPEC_DEFINITION_MISSING 1
 _ACEOF
 
 fi
 
-done
-
 
-if test xfalse != x"$enable_subunit"; then
-
-{ $as_echo "$as_me:$LINENO: checking for subunit_test_start in -lsubunit" >&5
-$as_echo_n "checking for subunit_test_start in -lsubunit... " >&6; }
-if test "${ac_cv_lib_subunit_subunit_test_start+set}" = set; then
+# Checks for header files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsubunit  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.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 subunit_test_start ();
 int
 main ()
 {
-return subunit_test_start ();
+
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_subunit_subunit_test_start=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_subunit_subunit_test_start=no
+  ac_cv_header_stdc=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_subunit_subunit_test_start" >&5
-$as_echo "$ac_cv_lib_subunit_subunit_test_start" >&6; }
-if test "x$ac_cv_lib_subunit_subunit_test_start" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSUBUNIT 1
-_ACEOF
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
 
-  LIBS="-lsubunit $LIBS"
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
 
 else
-  case "$enable_subunit" in
- autodetect)
-   enable_subunit=false
-   ;;
- true)
-   { { $as_echo "$as_me:$LINENO: error: libsubunit is required for subunit protocol support. The homepage for subunit is https://launchpad.net/subunit/" >&5
-$as_echo "$as_me: error: libsubunit is required for subunit protocol support. The homepage for subunit is https://launchpad.net/subunit/" >&2;}
-   { (exit 1); exit 1; }; }
-   ;;
- esac
-
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
 fi
-if test xfalse != x"$enable_subunit"; then
-if test "${ac_cv_header_subunit_child_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for subunit/child.h" >&5
-$as_echo_n "checking for subunit/child.h... " >&6; }
-if test "${ac_cv_header_subunit_child_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_subunit_child_h" >&5
-$as_echo "$ac_cv_header_subunit_child_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking subunit/child.h usability" >&5
-$as_echo_n "checking subunit/child.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-#include <subunit/child.h>
+#include <stdlib.h>
+
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
 
-       ac_header_compiler=no
+else
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+fi
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking subunit/child.h presence" >&5
-$as_echo_n "checking subunit/child.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <subunit/child.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#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
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+#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
+if ac_fn_c_try_run "$LINENO"; then :
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: subunit/child.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: subunit/child.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: subunit/child.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: subunit/child.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: subunit/child.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: subunit/child.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: subunit/child.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: subunit/child.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: subunit/child.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ----------------------------------------------------------- ##
-## Report this to check-devel at lists dot sourceforge dot net ##
-## ----------------------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for subunit/child.h" >&5
-$as_echo_n "checking for subunit/child.h... " >&6; }
-if test "${ac_cv_header_subunit_child_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_subunit_child_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_subunit_child_h" >&5
-$as_echo "$ac_cv_header_subunit_child_h" >&6; }
-
+  ac_cv_header_stdc=no
 fi
-if test "x$ac_cv_header_subunit_child_h" = x""yes; then
-  :
-else
-  case "$enable_subunit" in
- autodetect)
-   enable_subunit=false
-   ;;
- true)
-   { { $as_echo "$as_me:$LINENO: error: The header subunit/child.h could not be succesfully included and is required for subunit protocol support. The homepage for subunit is https://launchpad.net/subunit/" >&5
-$as_echo "$as_me: error: The header subunit/child.h could not be succesfully included and is required for subunit protocol support. The homepage for subunit is https://launchpad.net/subunit/" >&2;}
-   { (exit 1); exit 1; }; }
-   ;;
- esac
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
-if test xfalse = x"$enable_subunit"; then
-ENABLE_SUBUNIT="0"
-else
-ENABLE_SUBUNIT="1"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define ENABLE_SUBUNIT $ENABLE_SUBUNIT
-_ACEOF
-
-
- if test x"$enable_subunit" != "xfalse"; then
-  SUBUNIT_TRUE=
-  SUBUNIT_FALSE='#'
-else
-  SUBUNIT_TRUE='#'
-  SUBUNIT_FALSE=
 fi
 
-
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+if ${ac_cv_header_sys_wait_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
 
 int
 main ()
 {
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_c_const=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_sys_wait_h=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_c_const=no
+  ac_cv_header_sys_wait_h=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+if test $ac_cv_header_sys_wait_h = yes; then
+
+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
-cat >>confdefs.h <<\_ACEOF
-#define const /**/
+fi
+
+for ac_header in fcntl.h stddef.h stdlib.h string.h sys/time.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
-$as_echo_n "checking for pid_t... " >&6; }
-if test "${ac_cv_type_pid_t+set}" = set; then
+done
+
+# ------ AX CREATE STDINT H -------------------------------------
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5
+$as_echo_n "checking for stdint types... " >&6; }
+ac_stdint_h=`echo check_stdint.h`
+# try to shortcircuit - if the default include path of the compiler
+# can find a "stdint.h" header then we assume that all compilers can.
+if ${ac_cv_header_stdint_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_type_pid_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
+old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
+old_CFLAGS="$CFLAGS"     ; CFLAGS=""
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <stdint.h>
 int
 main ()
 {
-if (sizeof (pid_t))
-       return 0;
+int_least32_t v = 0;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_stdint_result="(assuming C99 compatible system)"
+ ac_cv_header_stdint_t="stdint.h";
+else
+  ac_cv_header_stdint_t=""
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then
+CFLAGS="-std=c99"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <stdint.h>
 int
 main ()
 {
-if (sizeof ((pid_t)))
-         return 0;
+int_least32_t v = 0;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  :
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&5
+$as_echo "$as_me: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&2;}
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+CXXFLAGS="$old_CXXFLAGS"
+CPPFLAGS="$old_CPPFLAGS"
+CFLAGS="$old_CFLAGS"
+fi
+
+
+v="... $ac_cv_header_stdint_h"
+if test "$ac_stdint_h" = "stdint.h" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5
+$as_echo "(are you sure you want them in ./stdint.h?)" >&6; }
+elif test "$ac_stdint_h" = "inttypes.h" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5
+$as_echo "(are you sure you want them in ./inttypes.h?)" >&6; }
+elif test "_$ac_cv_header_stdint_t" = "_" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5
+$as_echo "(putting them into $ac_stdint_h)$v" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_header_stdint="$ac_cv_header_stdint_t"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5
+$as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; }
+fi
+
+if test "_$ac_cv_header_stdint_t" = "_" ; then # cannot shortcircuit..
+
+
+inttype_headers=`echo  | sed -e 's/,/ /g'`
+
+ac_cv_stdint_result="(no helpful system typedefs seen)"
 
-       ac_cv_type_pid_t=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5
+$as_echo_n "checking for stdint uintptr_t... " >&6; }
+if ${ac_cv_header_stdint_x+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+  for i in    stdint.h inttypes.h sys/inttypes.h $inttype_headers
+  do
+   unset ac_cv_type_uintptr_t
+   unset ac_cv_type_uint64_t
+   ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i>
+"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+  ac_cv_header_stdint_x=$i
+else
+  continue
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i>
+"
+if test "x$ac_cv_type_uint64_t" = xyes; then :
+  and64="/uint64_t"
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  and64=""
+fi
 
+   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)"
+ break
+  done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5
+$as_echo_n "checking for stdint uintptr_t... " >&6; }
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5
+$as_echo "$ac_cv_header_stdint_x" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5
+$as_echo_n "checking for stdint uint32_t... " >&6; }
+if ${ac_cv_header_stdint_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+  for i in    inttypes.h sys/inttypes.h stdint.h $inttype_headers
+  do
+   unset ac_cv_type_uint32_t
+   unset ac_cv_type_uint64_t
+   ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i>
+"
+if test "x$ac_cv_type_uint32_t" = xyes; then :
+  ac_cv_header_stdint_o=$i
+else
+  continue
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-$as_echo "$ac_cv_type_pid_t" >&6; }
-if test "x$ac_cv_type_pid_t" = x""yes; then
-  :
+
+   ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i>
+"
+if test "x$ac_cv_type_uint64_t" = xyes; then :
+  and64="/uint64_t"
 else
+  and64=""
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
+   ac_cv_stdint_result="(seen uint32_t$and64 in $i)"
+ break
+   break;
+  done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5
+$as_echo_n "checking for stdint uint32_t... " >&6; }
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5
+$as_echo "$ac_cv_header_stdint_o" >&6; }
+
+fi
+
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+if test "_$ac_cv_header_stdint_o" = "_" ; then
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5
+$as_echo_n "checking for stdint u_int32_t... " >&6; }
+if ${ac_cv_header_stdint_u+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+  for i in    sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do
+   unset ac_cv_type_u_int32_t
+   unset ac_cv_type_u_int64_t
+   ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i>
+"
+if test "x$ac_cv_type_u_int32_t" = xyes; then :
+  ac_cv_header_stdint_u=$i
+else
+  continue
+fi
+
+   ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i>
+"
+if test "x$ac_cv_type_u_int64_t" = xyes; then :
+  and64="/u_int64_t"
+else
+  and64=""
+fi
+
+   ac_cv_stdint_result="(seen u_int32_t$and64 in $i)"
+ break
+   break;
+  done
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5
+$as_echo_n "checking for stdint u_int32_t... " >&6; }
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5
+$as_echo "$ac_cv_header_stdint_u" >&6; }
+
+fi fi
 
-{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
-$as_echo_n "checking for size_t... " >&6; }
-if test "${ac_cv_type_size_t+set}" = set; then
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5
+$as_echo_n "checking for stdint datatype model... " >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5
+$as_echo "(..)" >&6; }
+
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
+$as_echo_n "checking size of char... " >&6; }
+if ${ac_cv_sizeof_char+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_type_size_t=no
-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
-int
-main ()
-{
-if (sizeof (size_t))
-       return 0;
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  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
-int
-main ()
-{
-if (sizeof ((size_t)))
-         return 0;
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  :
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char"        "$ac_includes_default"; then :
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test "$ac_cv_type_char" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (char)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_char=0
+   fi
+fi
 
-       ac_cv_type_size_t=yes
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
+$as_echo "$ac_cv_sizeof_char" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_short" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_short=0
+   fi
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-$as_echo "$ac_cv_type_size_t" >&6; }
-if test "x$ac_cv_type_size_t" = x""yes; then
-  :
-else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
 
 cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
+#define SIZEOF_SHORT $ac_cv_sizeof_short
 _ACEOF
 
-fi
 
-{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
   $as_echo_n "(cached) " >&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 <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
 
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_time=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_time=no
+  if test "$ac_cv_type_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_int=0
+   fi
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
 _ACEOF
 
-fi
 
-{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if test "${ac_cv_struct_tm+set}" = set; then
+   # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&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 <sys/types.h>
-#include <time.h>
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
 
-int
-main ()
-{
-struct tm tm;
-                                    int *p = &tm.tm_sec;
-                                    return !p;
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_struct_tm=time.h
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_struct_tm=sys/time.h
+  if test "$ac_cv_type_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long=0
+   fi
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define TM_IN_SYS_TIME 1
-_ACEOF
 
-fi
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
 
 
-# The cast to long int works around a bug in the HP C Compiler
+   # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
+$as_echo_n "checking size of void*... " >&6; }
+if ${ac_cv_sizeof_voidp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
-test_array [0] = 0
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_lo=0 ac_mid=0
-  while :; do
-    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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
+else
+  if test "$ac_cv_type_voidp" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void*)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_voidp=0
+   fi
+fi
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=$ac_mid; break
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
+$as_echo "$ac_cv_sizeof_voidp" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
+_ACEOF
+
+
+   ac_cv_char_data_model=""
+   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
+   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
+   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
+   ac_cv_long_data_model=""
+   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
+   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
+   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking data model" >&5
+$as_echo_n "checking data model... " >&6; }
+   case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
+    122/242)     ac_cv_data_model="IP16"  ; n="standard 16bit machine" ;;
+    122/244)     ac_cv_data_model="LP32"  ; n="standard 32bit machine" ;;
+    122/*)       ac_cv_data_model="i16"   ; n="unusual int16 model" ;;
+    124/444)     ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
+    124/488)     ac_cv_data_model="LP64"  ; n="standard 64bit unixish" ;;
+    124/448)     ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
+    124/*)       ac_cv_data_model="i32"   ; n="unusual int32 model" ;;
+    128/888)     ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
+    128/*)       ac_cv_data_model="i64"   ; n="unusual int64 model" ;;
+    222/*2)      ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
+    333/*3)      ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
+    444/*4)      ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
+    666/*6)      ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
+    888/*8)      ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
+    222/*|333/*|444/*|666/*|888/*) :
+                 ac_cv_data_model="iDSP"  ; n="unusual dsptype" ;;
+     *)          ac_cv_data_model="none"  ; n="very unusual model" ;;
+   esac
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_data_model ($ac_cv_long_data_model, $n)" >&5
+$as_echo "$ac_cv_data_model ($ac_cv_long_data_model, $n)" >&6; }
+
+fi
+
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_x"
+elif  test "_$ac_cv_header_stdint_o" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_o"
+elif  test "_$ac_cv_header_stdint_u" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_u"
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+   ac_cv_header_stdint="stddef.h"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5
+$as_echo_n "checking for extra inttypes in chosen header... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5
+$as_echo "($ac_cv_header_stdint)" >&6; }
+unset ac_cv_type_int_least32_t
+unset ac_cv_type_int_fast32_t
+ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint>
+"
+if test "x$ac_cv_type_int_least32_t" = xyes; then :
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
+ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint>
+"
+if test "x$ac_cv_type_int_fast32_t" = xyes; then :
+
+fi
+
+ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint>
+"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
+
+fi
+
+
+fi # shortcircut to system "stdint.h"
+# ------------------ PREPARE VARIABLES ------------------------------
+if test "$GCC" = "yes" ; then
+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_stdint_message="using $CC"
+fi
 
-       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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
-test_array [0] = 0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5
+$as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; }
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
-test_array [0] = 0
+# ----------------- DONE inttypes.h checks START header -------------
+ac_config_commands="$ac_config_commands $ac_stdint_h"
 
-  ;
-  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;;
+
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_lo=$ac_mid; break
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-       ac_lo= ac_hi=
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 0
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
+fi
+if test x"$enable_subunit" != "xfalse" && test x"$enable_subunit" != "xtrue"; then :
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+       if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsubunit\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsubunit") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_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_hi=$ac_mid
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  :
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  enable_subunit=false
+fi
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
+if test x"$enable_subunit" != "xfalse"; then :
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi ;;
-esac
-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
-static long int longval () { return (long int) (sizeof (int)); }
-static unsigned long int ulongval () { return (long int) (sizeof (int)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
 
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (int))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (int))))
-       return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (int))))
-       return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSUBUNIT" >&5
+$as_echo_n "checking for LIBSUBUNIT... " >&6; }
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+if test -n "$LIBSUBUNIT_CFLAGS"; then
+    pkg_cv_LIBSUBUNIT_CFLAGS="$LIBSUBUNIT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsubunit\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsubunit") 2>&5
   ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBSUBUNIT_CFLAGS=`$PKG_CONFIG --cflags "libsubunit" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LIBSUBUNIT_LIBS"; then
+    pkg_cv_LIBSUBUNIT_LIBS="$LIBSUBUNIT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsubunit\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsubunit") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_int=`cat conftest.val`
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LIBSUBUNIT_LIBS=`$PKG_CONFIG --libs "libsubunit" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi
+  pkg_failed=yes
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
+ else
+    pkg_failed=untried
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
 
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
 
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then
-  $as_echo_n "(cached) " >&6
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
-test_array [0] = 0
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               LIBSUBUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsubunit" 2>&1`
+        else
+               LIBSUBUNIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsubunit" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$LIBSUBUNIT_PKG_ERRORS" >&5
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_lo=0 ac_mid=0
-  while :; do
-    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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
-test_array [0] = 0
+       as_fn_error $? "Package requirements (libsubunit) were not met:
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=$ac_mid; break
+$LIBSUBUNIT_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LIBSUBUNIT_CFLAGS
+and LIBSUBUNIT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LIBSUBUNIT_CFLAGS
+and LIBSUBUNIT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       LIBSUBUNIT_CFLAGS=$pkg_cv_LIBSUBUNIT_CFLAGS
+       LIBSUBUNIT_LIBS=$pkg_cv_LIBSUBUNIT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
+fi
+if test "xfalse" = x"$enable_subunit"; then
+ENABLE_SUBUNIT="0"
+LIBSUBUNIT_PC=""
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ENABLE_SUBUNIT="1"
+LIBSUBUNIT_PC="libsubunit"
+fi
 
-       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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
-test_array [0] = 0
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_SUBUNIT $ENABLE_SUBUNIT
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
+
+ if test x"$enable_subunit" != "xfalse"; then
+  SUBUNIT_TRUE=
+  SUBUNIT_FALSE='#'
+else
+  SUBUNIT_TRUE='#'
+  SUBUNIT_FALSE=
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_lo= ac_hi=
+# Check for POSIX regular expressions support.
+for ac_header in regex.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default"
+if test "x$ac_cv_header_regex_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_REGEX_H 1
+_ACEOF
+ HAVE_REGEX_H=1
+else
+  HAVE_REGEX_H=0
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
-test_array [0] = 0
 
-  ;
-  return 0;
-}
+if test "x$HAVE_REGEX_H" = "x1"; then
+    for ac_func in regcomp regexec
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=$ac_mid
+ HAVE_REGEX=1
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  HAVE_REGEX=0
+fi
+done
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
+else
+    HAVE_REGEX=0
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_short=$ac_lo;;
-'') if test "$ac_cv_type_short" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_short=0
-   fi ;;
-esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_REGEX $HAVE_REGEX
+_ACEOF
+
+
+if test "x$HAVE_REGEX" = "x1"; then
+    ENABLE_REGEX="1"
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+    ENABLE_REGEX="0"
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_REGEX $ENABLE_REGEX
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (short)); }
-static unsigned long int ulongval () { return (long int) (sizeof (short)); }
-#include <stdio.h>
-#include <stdlib.h>
+
 int
 main ()
 {
 
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (short))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (short))))
-       return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (short))))
-       return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
 
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_short=`cat conftest.val`
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_short" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_short=0
-   fi
+  ac_cv_c_const=no
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.val
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
 
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
 
+else
 
 cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
+#define pid_t int
 _ACEOF
 
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
-test_array [0] = 0
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_link "$LINENO"; then :
 
-       ac_lo=`expr $ac_mid + 1`
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid + 1`
+else
+  ac_cv_type_unsigned_long_long_int=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
 
-       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
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
-test_array [0] = 0
+  fi
 
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 0
-
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_lo=$ac_mid; break
+if ac_fn_c_try_run "$LINENO"; then :
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-       ac_hi=`expr '(' $ac_mid ')' - 1`
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       ac_mid=`expr 2 '*' $ac_mid`
+        fi
+      fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  test $ac_cv_type_long_long_int = yes \
+       && ac_type='long long int' \
+       || ac_type='long int'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
 
-       ac_lo= ac_hi=
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintmax_t" = xyes; then :
+
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+
+else
+  test $ac_cv_type_unsigned_long_long_int = yes \
+       && ac_type='unsigned long long int' \
+       || ac_type='unsigned long int'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT32_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+;;
+  esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 0
-
+if ((struct tm *) 0)
+return 0;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_hi=$ac_mid
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_time=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
-       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi ;;
-esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if ${ac_cv_struct_tm+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long)); }
-#include <stdio.h>
-#include <stdlib.h>
+#include <sys/types.h>
+#include <time.h>
+
 int
 main ()
 {
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (long))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (long))))
-       return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long))))
-       return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
+struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long=`cat conftest.val`
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_tm=time.h
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
 
-( exit $ac_status )
-if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+fi
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
+
+else
+  if test "$ac_cv_type_int" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
    else
-     ac_cv_sizeof_long=0
+     ac_cv_sizeof_int=0
    fi
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
 
 
 
 cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
+#define SIZEOF_INT $ac_cv_sizeof_int
 _ACEOF
 
 
-
-# Checks for library functions.
-
-for ac_header in stdlib.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
   $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test "$ac_cv_type_short" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_short=0
+   fi
+fi
 
-       ac_header_compiler=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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>
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
 
-  ac_header_preproc=no
+else
+  if test "$ac_cv_type_long" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_long=0
+   fi
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+# The following two checks will attempt to include pthread.h. The
+# reason is MinGW and MinGW-w64 have been known to put the time
+# related definitions in the pthread headers. Without include
+# pthread.h, these checks may mistakenly fail to find the
+# definitions.
+ac_fn_c_check_type "$LINENO" "clockid_t" "ac_cv_type_clockid_t" "
+$ac_includes_default
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+
+"
+if test "x$ac_cv_type_clockid_t" = xyes; then :
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ----------------------------------------------------------- ##
-## Report this to check-devel at lists dot sourceforge dot net ##
-## ----------------------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+
+$as_echo "#define clockid_t int" >>confdefs.h
+
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+
+ac_fn_c_check_type "$LINENO" "timer_t" "ac_cv_type_timer_t" "
+$ac_includes_default
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+
+"
+if test "x$ac_cv_type_timer_t" = xyes; then :
+
+else
+
+$as_echo "#define timer_t int" >>confdefs.h
 
 fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+
+
+# Checks for library functions.
+for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_STDLIB_H 1
 _ACEOF
 
 fi
 
 done
 
-{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then :
   ac_cv_func_malloc_0_nonnull=no
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
@@ -15496,55 +16895,24 @@ return ! malloc (0);
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
   ac_cv_func_malloc_0_nonnull=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_malloc_0_nonnull=no
+  ac_cv_func_malloc_0_nonnull=no
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MALLOC 1
-_ACEOF
+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
 
 else
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_MALLOC 0
-_ACEOF
+  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
 
    case " $LIBOBJS " in
   *" malloc.$ac_objext "* ) ;;
@@ -15553,178 +16921,32 @@ _ACEOF
 esac
 
 
-cat >>confdefs.h <<\_ACEOF
-#define malloc rpl_malloc
-_ACEOF
+$as_echo "#define malloc rpl_malloc" >>confdefs.h
 
 fi
 
 
-
-
 for ac_header in stdlib.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ----------------------------------------------------------- ##
-## Report this to check-devel at lists dot sourceforge dot net ##
-## ----------------------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_STDLIB_H 1
 _ACEOF
 
 fi
 
 done
 
-{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
-if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
+if ${ac_cv_func_realloc_0_nonnull+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then :
   ac_cv_func_realloc_0_nonnull=no
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
@@ -15740,55 +16962,24 @@ return ! realloc (0, 0);
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
   ac_cv_func_realloc_0_nonnull=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_realloc_0_nonnull=no
+  ac_cv_func_realloc_0_nonnull=no
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
-if test $ac_cv_func_realloc_0_nonnull = yes; then
+if test $ac_cv_func_realloc_0_nonnull = yes; then :
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_REALLOC 1
-_ACEOF
+$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
 
 else
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_REALLOC 0
-_ACEOF
+  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
 
    case " $LIBOBJS " in
   *" realloc.$ac_objext "* ) ;;
@@ -15797,1186 +16988,1159 @@ _ACEOF
 esac
 
 
-cat >>confdefs.h <<\_ACEOF
-#define realloc rpl_realloc
-_ACEOF
+$as_echo "#define realloc rpl_realloc" >>confdefs.h
 
 fi
 
 
 
+# Check if the timer_create(), timer_settime(), and timer_delete()
+# functions on the system are available and suitable, or need to be
+# replaced with Check's replacement of these functions.
 
 
 
+  for ac_header in $ac_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
+fi
 
+done
 
 
 
 
-for ac_func in fileno localtime_r pipe putenv setenv sleep strdup strsignal unsetenv
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&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 <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#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
+  if test "xtrue" != x"$enable_timer_replacement"; then
+         ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
+if test "x$ac_cv_func_timer_create" = xyes; then :
+  hw_cv_librt_timers=yes
+else
+  hw_cv_librt_timers=no
+fi
 
+         if test "$hw_cv_librt_timers" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if timer_create is supported on the system" >&5
+$as_echo_n "checking if timer_create is supported on the system... " >&6; }
+if ${hw_cv_librt_timers_posix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  hw_cv_librt_timers_posix=autodetect
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_TIME_H
+                         #include <time.h>
+                         #endif
+              #include <errno.h>
+                         static int test_timer_create()
+                         {
+                timer_t timerid;
+                if(timer_create(CLOCK_REALTIME, NULL, &timerid) != 0)
+                {
+                    /*
+                      On this system, although the function is available,
+                      no meaningful implementation is provided.
+                    */
+                    if(errno == ENOSYS)
+                    {
+                        return 1;
+                    }
+                }
+                return 0;
+                         }
 int
 main ()
 {
-return $ac_func ();
+return test_timer_create();
   ;
   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;;
+if ac_fn_c_try_run "$LINENO"; then :
+  hw_cv_librt_timers_posix=yes
+else
+  hw_cv_librt_timers_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_librt_timers_posix" >&5
+$as_echo "$hw_cv_librt_timers_posix" >&6; }
+else
+  hw_cv_librt_timers_posix=no
+fi
+  else
+      hw_cv_librt_timers_posix=no
+  fi
+
+  # If the system does not have a POSIX timer_create(), then use
+  # Check's reimplementation of the timer_* calls
+  if test "$hw_cv_librt_timers_posix" = no; then :
+
+  if test "x$_hw_cv_librt_timers_replace_done" != xyes; then :
+  case " $LIBOBJS " in
+  *" timer_create.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timer_create.$ac_objext"
+ ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+
+     case " $LIBOBJS " in
+  *" timer_settime.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timer_settime.$ac_objext"
+ ;;
+esac
+
+     case " $LIBOBJS " in
+  *" timer_delete.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timer_delete.$ac_objext"
+ ;;
+esac
+
+    _hw_cv_librt_timers_replace_done=yes
+fi
+
+fi
+
+  # If we are cross compiling, do the normal check for the
+  # timer_* calls.
+  if test "$hw_cv_librt_timers_posix" = autodetect; then :
+  ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
+if test "x$ac_cv_func_timer_create" = xyes; then :
+  $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case " $LIBOBJS " in
+  *" timer_create.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timer_create.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
+if test "x$ac_cv_func_timer_settime" = xyes; then :
+  $as_echo "#define HAVE_TIMER_SETTIME 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" timer_settime.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timer_settime.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "timer_delete" "ac_cv_func_timer_delete"
+if test "x$ac_cv_func_timer_delete" = xyes; then :
+  $as_echo "#define HAVE_TIMER_DELETE 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" timer_delete.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS timer_delete.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+     ac_fn_c_check_decl "$LINENO" "timer_create" "ac_cv_have_decl_timer_create" "$ac_includes_default"
+if test "x$ac_cv_have_decl_timer_create" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TIMER_CREATE $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "timer_settime" "ac_cv_have_decl_timer_settime" "$ac_includes_default"
+if test "x$ac_cv_have_decl_timer_settime" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TIMER_SETTIME $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "timer_delete" "ac_cv_have_decl_timer_delete" "$ac_includes_default"
+if test "x$ac_cv_have_decl_timer_delete" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TIMER_DELETE $ac_have_decl
+_ACEOF
+
+fi
+
+
+# The following checks will replace missing functions from libcompat
+ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm"
+if test "x$ac_cv_func_alarm" = xyes; then :
+  $as_echo "#define HAVE_ALARM 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" alarm.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS alarm.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes; then :
+  $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" clock_gettime.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS clock_gettime.$ac_objext"
+ ;;
+esac
 
-       eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
+if test "x$ac_cv_func_getline" = xyes; then :
+  $as_echo "#define HAVE_GETLINE 1" >>confdefs.h
 
 else
   case " $LIBOBJS " in
-  *" $ac_func.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+  *" getline.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getline.$ac_objext"
  ;;
 esac
 
 fi
-done
 
+ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
+if test "x$ac_cv_func_gettimeofday" = xyes; then :
+  $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
 
-{ $as_echo "$as_me:$LINENO: checking whether fileno is declared" >&5
-$as_echo_n "checking whether fileno is declared... " >&6; }
-if test "${ac_cv_have_decl_fileno+set}" = set; then
-  $as_echo_n "(cached) " >&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
-int
-main ()
-{
-#ifndef fileno
-  (void) fileno;
-#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;;
+  case " $LIBOBJS " in
+  *" gettimeofday.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
+ ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_fileno=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_fileno=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fileno" >&5
-$as_echo "$ac_cv_have_decl_fileno" >&6; }
-if test "x$ac_cv_have_decl_fileno" = x""yes; then
+ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
+if test "x$ac_cv_func_localtime_r" = xyes; then :
+  $as_echo "#define HAVE_LOCALTIME_R 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FILENO 1
-_ACEOF
+else
+  case " $LIBOBJS " in
+  *" localtime_r.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS localtime_r.$ac_objext"
+ ;;
+esac
 
+fi
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FILENO 0
-_ACEOF
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes; then :
+  $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
 
+else
+  case " $LIBOBJS " in
+  *" strdup.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
+ ;;
+esac
 
 fi
-{ $as_echo "$as_me:$LINENO: checking whether localtime_r is declared" >&5
-$as_echo_n "checking whether localtime_r is declared... " >&6; }
-if test "${ac_cv_have_decl_localtime_r+set}" = set; then
-  $as_echo_n "(cached) " >&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
-int
-main ()
-{
-#ifndef localtime_r
-  (void) localtime_r;
-#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_localtime_r=yes
+ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
+if test "x$ac_cv_func_strsignal" = xyes; then :
+  $as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h
+
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case " $LIBOBJS " in
+  *" strsignal.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strsignal.$ac_objext"
+ ;;
+esac
 
-       ac_cv_have_decl_localtime_r=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_localtime_r" >&5
-$as_echo "$ac_cv_have_decl_localtime_r" >&6; }
-if test "x$ac_cv_have_decl_localtime_r" = x""yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOCALTIME_R 1
+#define HAVE_DECL_ALARM $ac_have_decl
 _ACEOF
-
-
+ac_fn_c_check_decl "$LINENO" "clock_gettime" "ac_cv_have_decl_clock_gettime" "$ac_includes_default"
+if test "x$ac_cv_have_decl_clock_gettime" = xyes; then :
+  ac_have_decl=1
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOCALTIME_R 0
-_ACEOF
-
-
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:$LINENO: checking whether pipe is declared" >&5
-$as_echo_n "checking whether pipe is declared... " >&6; }
-if test "${ac_cv_have_decl_pipe+set}" = set; then
-  $as_echo_n "(cached) " >&6
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CLOCK_GETTIME $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getline" = xyes; then :
+  ac_have_decl=1
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE $ac_have_decl
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef pipe
-  (void) pipe;
-#endif
+ac_fn_c_check_decl "$LINENO" "gettimeofday" "ac_cv_have_decl_gettimeofday" "$ac_includes_default"
+if test "x$ac_cv_have_decl_gettimeofday" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETTIMEOFDAY $ac_have_decl
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_pipe=yes
+ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
+  ac_have_decl=1
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_have_decl=0
+fi
 
-       ac_cv_have_decl_pipe=no
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOCALTIME_R $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strsignal" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_pipe" >&5
-$as_echo "$ac_cv_have_decl_pipe" >&6; }
-if test "x$ac_cv_have_decl_pipe" = x""yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PIPE 1
+#define HAVE_DECL_STRSIGNAL $ac_have_decl
 _ACEOF
 
 
+# The following checks are to only detect if the functions exist, but
+# not replace them
+ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_setenv" = xyes; then :
+  ac_have_decl=1
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PIPE 0
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETENV $ac_have_decl
 _ACEOF
 
 
-fi
-{ $as_echo "$as_me:$LINENO: checking whether putenv is declared" >&5
-$as_echo_n "checking whether putenv is declared... " >&6; }
-if test "${ac_cv_have_decl_putenv+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+for ac_func in setitimer
+do :
+  ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
+if test "x$ac_cv_func_setitimer" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SETITIMER 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef putenv
-  (void) putenv;
-#endif
 
-  ;
-  return 0;
-}
+fi
+done
+
+
+# Checks for functions not available in Windows
+if test "xtrue" = x"$enable_fork"; then
+       for ac_func in fork
+do :
+  ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
+if test "x$ac_cv_func_fork" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FORK 1
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_putenv=yes
+ HAVE_FORK=1
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_putenv=no
+  HAVE_FORK=0
 fi
+done
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+       HAVE_FORK=0
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_putenv" >&5
-$as_echo "$ac_cv_have_decl_putenv" >&6; }
-if test "x$ac_cv_have_decl_putenv" = x""yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PUTENV 1
+for ac_func in sigaction
+do :
+  ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
+if test "x$ac_cv_func_sigaction" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGACTION 1
 _ACEOF
 
+fi
+done
 
-else
+for ac_func in mkstemp
+do :
+  ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
+if test "x$ac_cv_func_mkstemp" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PUTENV 0
+#define HAVE_MKSTEMP 1
 _ACEOF
 
+fi
+done
+
+
+# Check if the system's snprintf (and its variations) are C99 compliant.
+# If they are not, use the version in libcompat.
 
+
+
+
+
+
+
+  if test "xtrue" != x"$enable_snprintf_replacement"; then
+         ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
+if test "x$ac_cv_func_vsnprintf" = xyes; then :
+  hw_cv_func_vsnprintf=yes
+else
+  hw_cv_func_vsnprintf=no
 fi
-{ $as_echo "$as_me:$LINENO: checking whether setenv is declared" >&5
-$as_echo_n "checking whether setenv is declared... " >&6; }
-if test "${ac_cv_have_decl_setenv+set}" = set; then
+
+         if test "$hw_cv_func_vsnprintf" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
+$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
+if ${hw_cv_func_vsnprintf_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  if test "$cross_compiling" = yes; then :
+  hw_cv_func_vsnprintf_c99=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#if HAVE_STDARG_H
+                         #include <stdarg.h>
+                         #endif
+                         #include <stdio.h>
+                         static int testprintf(char *buf, size_t size, const char *format, ...)
+                         {
+                               int result;
+                               va_list ap;
+                               va_start(ap, format);
+                               result = vsnprintf(buf, size, format, ap);
+                               va_end(ap);
+                               return result;
+                         }
 int
 main ()
 {
-#ifndef setenv
-  (void) setenv;
-#endif
-
+char buf[43];
+                         if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+                                 testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+                                 buf[0] != 'T' || buf[3] != '\0')
+                               return 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_setenv=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  hw_cv_func_vsnprintf_c99=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  hw_cv_func_vsnprintf_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-       ac_cv_have_decl_setenv=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
+$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
+else
+  hw_cv_func_snprintf_c99=no
+fi
+         if test "$hw_cv_func_vsnprintf_c99" = yes; then :
+
+$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_setenv" >&5
-$as_echo "$ac_cv_have_decl_setenv" >&6; }
-if test "x$ac_cv_have_decl_setenv" = x""yes; then
+  else
+      hw_cv_func_vsnprintf_c99=no
+  fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SETENV 1
-_ACEOF
+  if test "$hw_cv_func_vsnprintf_c99" = no; then :
 
+$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
 
-else
+    for ac_header in inttypes.h locale.h stddef.h stdint.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SETENV 0
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-
 fi
-{ $as_echo "$as_me:$LINENO: checking whether sleep is declared" >&5
-$as_echo_n "checking whether sleep is declared... " >&6; }
-if test "${ac_cv_have_decl_sleep+set}" = set; then
-  $as_echo_n "(cached) " >&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
-int
-main ()
-{
-#ifndef sleep
-  (void) sleep;
-#endif
 
-  ;
-  return 0;
-}
+done
+
+    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_sleep=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_sleep=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sleep" >&5
-$as_echo "$ac_cv_have_decl_sleep" >&6; }
-if test "x$ac_cv_have_decl_sleep" = x""yes; then
+ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SLEEP 1
+#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
 _ACEOF
 
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SLEEP 0
-_ACEOF
+fi
 
 
-fi
-{ $as_echo "$as_me:$LINENO: checking whether strdup is declared" >&5
-$as_echo_n "checking whether strdup is declared... " >&6; }
-if test "${ac_cv_have_decl_strdup+set}" = set; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if ${ac_cv_type_long_double+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  if test "$GCC" = yes; then
+       ac_cv_type_long_double=yes
+     else
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+/* The Stardent Vistra knows sizeof (long double), but does
+                not support it.  */
+             long double foo = 0.0L;
 int
 main ()
 {
-#ifndef strdup
-  (void) strdup;
-#endif
+static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+             sizeof (double) <= sizeof (long double))];
+test_array [0] = 0;
+return test_array [0];
 
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_strdup=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_long_double=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl_strdup=no
+  ac_cv_type_long_double=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5
-$as_echo "$ac_cv_have_decl_strdup" >&6; }
-if test "x$ac_cv_have_decl_strdup" = x""yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
+$as_echo "$ac_cv_type_long_double" >&6; }
+  if test $ac_cv_type_long_double = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRDUP 1
-_ACEOF
+$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
 
+  fi
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRDUP 0
-_ACEOF
 
 
-fi
-{ $as_echo "$as_me:$LINENO: checking whether strsignal is declared" >&5
-$as_echo_n "checking whether strsignal is declared... " >&6; }
-if test "${ac_cv_have_decl_strsignal+set}" = set; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
 int
 main ()
 {
-#ifndef strsignal
-  (void) strsignal;
-#endif
-
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_strsignal=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_run "$LINENO"; then :
 
-       ac_cv_have_decl_strsignal=no
+else
+  ac_cv_type_long_long_int=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5
-$as_echo "$ac_cv_have_decl_strsignal" >&6; }
-if test "x$ac_cv_have_decl_strsignal" = x""yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSIGNAL 1
-_ACEOF
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
 
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSIGNAL 0
-_ACEOF
+  fi
 
 
-fi
-{ $as_echo "$as_me:$LINENO: checking whether unsetenv is declared" >&5
-$as_echo_n "checking whether unsetenv is declared... " >&6; }
-if test "${ac_cv_have_decl_unsetenv+set}" = set; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
 int
 main ()
 {
-#ifndef unsetenv
-  (void) unsetenv;
-#endif
-
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl_unsetenv=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_link "$LINENO"; then :
 
-       ac_cv_have_decl_unsetenv=no
+else
+  ac_cv_type_unsigned_long_long_int=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_unsetenv" >&5
-$as_echo "$ac_cv_have_decl_unsetenv" >&6; }
-if test "x$ac_cv_have_decl_unsetenv" = x""yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_UNSETENV 1
+#define size_t unsigned int
 _ACEOF
 
+fi
+
+
+
+  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
 
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_UNSETENV 0
-_ACEOF
+  test $ac_cv_type_long_long_int = yes \
+       && ac_type='long long int' \
+       || ac_type='long int'
 
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
 
 fi
 
 
 
-# Checks for pthread implementation.
 
+  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintmax_t" = xyes; then :
 
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
 
-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
+else
+  test $ac_cv_type_unsigned_long_long_int = yes \
+       && ac_type='unsigned long long int' \
+       || ac_type='unsigned long int'
 
-acx_pthread_ok=no
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
 
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
+fi
 
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
-        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 pthread_join ();
+
+  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else
+  for ac_type in 'unsigned int' 'unsigned long int' \
+       'unsigned long long int'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
 int
 main ()
 {
-return pthread_join ();
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0;
+return test_array [0];
+
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  acx_pthread_ok=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $ac_type
+_ACEOF
 
+         ac_type=
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       test -z "$ac_type" && break
+     done
 fi
 
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
 
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTRDIFF_T 1
+_ACEOF
 
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
 
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-#      ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
+fi
 
-case "${host_cpu}-${host_os}" in
-        *solaris*)
+    for ac_func in localeconv
+do :
+  ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
+if test "x$ac_cv_func_localeconv" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LOCALECONV 1
+_ACEOF
 
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
+fi
+done
 
-        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
-        ;;
-esac
 
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
+  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-        case $flag in
-                none)
-                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
-                ;;
+int
+main ()
+{
 
-                -*)
-                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
-                PTHREAD_CFLAGS="$flag"
-                ;;
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
 
-               pthread-config)
-               # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$acx_pthread_config"; then
-  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # 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_acx_pthread_config="yes"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
 
-  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
-  { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
 fi
 
 
-               if test x"$acx_pthread_config" = xno; then continue; fi
-               PTHREAD_CFLAGS="`pthread-config --cflags`"
-               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-               ;;
 
-                *)
-                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
 
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+    case " $LIBOBJS " in
+  *" snprintf.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
 
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    _hw_cv_func_xprintf_replace_done=yes
+fi
+
+fi
+
+
+
+  if test "xtrue" != x"$enable_snprintf_replacement"; then
+         ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes; then :
+  hw_cv_func_snprintf=yes
+else
+  hw_cv_func_snprintf=no
+fi
+
+         if test "$hw_cv_func_snprintf" = yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
+$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
+if ${hw_cv_func_snprintf_c99+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  hw_cv_func_snprintf_c99=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <pthread.h>
+#include <stdio.h>
 int
 main ()
 {
-pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+char buf[43];
+                         if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+                                 snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+                                 buf[0] != 'T' || buf[3] != '\0')
+                               return 1;
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  acx_pthread_ok=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  hw_cv_func_snprintf_c99=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  hw_cv_func_snprintf_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
+$as_echo "$hw_cv_func_snprintf_c99" >&6; }
+else
+  hw_cv_func_snprintf_c99=no
+fi
+  else
+      hw_cv_func_snprintf_c99=no
+  fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+  if test "$hw_cv_func_snprintf_c99" = yes; then :
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
 
-        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
+else
 
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
+$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
 
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-       { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
-       attr_name=unknown
-       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-           cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <pthread.h>
+
 int
 main ()
 {
-int attr=$attr; return attr;
+
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this sort of thing.  */
+  typedef int charset[2];
+  const charset cs = { 0, 0 };
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
   ;
   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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  attr_name=$attr; break
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
 
+$as_echo "#define const /**/" >>confdefs.h
 
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-       done
-        { $as_echo "$as_me:$LINENO: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
 
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
 
-        fi
 
-        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
-        flag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        esac
-        { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
-        if test "x$flag" != xno; then
-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
+    case " $LIBOBJS " in
+  *" snprintf.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+    _hw_cv_func_xprintf_replace_done=yes
+fi
 
-        # More AIX lossage: must compile with xlc_r or cc_r
-       if test x"$GCC" != xyes; then
-          for ac_prog in xlc_r cc_r
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+fi
+
+
+# Check for whether we can install checkmk (we have a usable awk)
+
+# Extract the first word of "$AWK", so it can be a program name with args.
+set dummy $AWK; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+if ${ac_cv_path_AWK_PATH+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$PTHREAD_CC"; then
-  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $AWK_PATH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AWK_PATH="$AWK_PATH" # 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_prog_PTHREAD_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AWK_PATH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
+  test -z "$ac_cv_path_AWK_PATH" && ac_cv_path_AWK_PATH="*NO AWK*"
+  ;;
+esac
 fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
+AWK_PATH=$ac_cv_path_AWK_PATH
+if test -n "$AWK_PATH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK_PATH" >&5
+$as_echo "$AWK_PATH" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
-        else
-          PTHREAD_CC=$CC
-       fi
+ if test "x$AWK_PATH" != 'x*NO AWK*'; then
+  INSTALL_CHECKMK_TRUE=
+  INSTALL_CHECKMK_FALSE='#'
 else
-        PTHREAD_CC="$CC"
+  INSTALL_CHECKMK_TRUE='#'
+  INSTALL_CHECKMK_FALSE=
 fi
 
 
+# Certain awk implementations disagree with each other on how to
+# substitute doubled backslashes in gsub()
+AWK_GSUB_DBL_BSLASH='\\\\'
 
 
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD 1
-_ACEOF
-
-        :
+if test "x$AWK_PATH" = 'x*NO AWK*'; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't find a usable awk; won't install checkmk." >&5
+$as_echo "$as_me: WARNING: Couldn't find a usable awk; won't install checkmk." >&2;}
 else
-        acx_pthread_ok=no
-
+  # Determine correct number of backslashes for gsub's replacement
+      # value.
+      if echo '\' |
+              "$AWK_PATH" '{ gsub("\\\\", "\\\\", $0); print }' |
+              grep '^\\$' >/dev/null 2>&1; then :
+  AWK_GSUB_DBL_BSLASH='\\\\\\\\'
 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
+       ac_config_files="$ac_config_files checkmk/checkmk"
 
+       ac_config_commands="$ac_config_commands checkmk-x"
 
-CC="$PTHREAD_CC"
+fi
 
 # Output files
 ac_config_headers="$ac_config_headers config.h"
 
 
-ac_config_files="$ac_config_files check.pc Makefile doc/Makefile lib/Makefile src/check.h src/Makefile tests/Makefile tests/test_vars"
+ac_config_files="$ac_config_files check.pc Makefile checkmk/Makefile doc/Makefile lib/Makefile src/check.h src/Makefile tests/Makefile tests/test_vars"
 
 
 cat >confcache <<\_ACEOF
@@ -17006,13 +18170,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -17020,8 +18184,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
   (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 \).
+      # `set' does not quote correctly, so add quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -17043,12 +18207,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&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" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
@@ -17062,63 +18237,78 @@ DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
   ac_i=`$as_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'
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${ENABLE_GCOV_TRUE}" && test -z "${ENABLE_GCOV_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GCOV\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"ENABLE_GCOV\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"ENABLE_GCOV\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${NO_TIMEOUT_TESTS_TRUE}" && test -z "${NO_TIMEOUT_TESTS_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"NO_TIMEOUT_TESTS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"NO_TIMEOUT_TESTS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"NO_TIMEOUT_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_FILTERDIFF_TRUE}" && test -z "${USE_FILTERDIFF_FALSE}"; then
+  as_fn_error $? "conditional \"USE_FILTERDIFF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${SUBUNIT_TRUE}" && test -z "${SUBUNIT_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"SUBUNIT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"SUBUNIT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"SUBUNIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_CHECKMK_TRUE}" && test -z "${INSTALL_CHECKMK_FALSE}"; then
+  as_fn_error $? "conditional \"INSTALL_CHECKMK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -17128,17 +18318,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## 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
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -17146,23 +18337,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  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
-
 as_nl='
 '
 export as_nl
@@ -17170,7 +18353,13 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -17181,7 +18370,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -17204,13 +18393,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 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
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+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
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -17240,12 +18423,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); 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
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
@@ -17257,7 +18444,89 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -17271,8 +18540,12 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
@@ -17292,76 +18565,25 @@ $as_echo X/"$0" |
          }
          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" ||
-    { $as_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
+# 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
 
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
   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
@@ -17376,49 +18598,85 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... 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'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_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 ||
+$as_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" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 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
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # 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'"
@@ -17428,13 +18686,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 Check $as_me 0.9.8, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+This file was extended by Check $as_me 0.12.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -17466,13 +18730,15 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-Usage: $0 [OPTION]... [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
   -q, --quiet, --silent
                    do not print progress messages
   -d, --debug      don't remove temporary files
@@ -17491,16 +18757,17 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <check-devel at lists dot sourceforge dot net>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Check config.status 0.9.8
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+Check config.status 0.12.0
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -17518,11 +18785,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -17564,11 +18838,10 @@ Try \`$0 --help' for more information." >&2
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-  *) ac_config_targets="$ac_config_targets $1"
+  *) as_fn_append ac_config_targets " $1"
      ac_need_defaults=false ;;
 
   esac
@@ -17585,7 +18858,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
@@ -17619,131 +18892,159 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
 
 LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
-for var in SED \
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
 GREP \
 EGREP \
 FGREP \
@@ -17756,8 +19057,13 @@ reload_flag \
 OBJDUMP \
 deplibs_check_method \
 file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
 AR \
 AR_FLAGS \
+archiver_list_spec \
 STRIP \
 RANLIB \
 CC \
@@ -17765,16 +19071,19 @@ CFLAGS \
 compiler \
 lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
 lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
 lt_prog_compiler_pic \
+lt_prog_compiler_wl \
 lt_prog_compiler_static \
 lt_cv_prog_compiler_c_o \
 need_locks \
+MANIFEST_TOOL \
 DSYMUTIL \
 NMEDIT \
 LIPO \
@@ -17788,9 +19097,7 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
-fix_srcfile_path \
 exclude_expsyms \
 include_expsyms \
 file_list_spec \
@@ -17798,12 +19105,13 @@ variables_saved_for_relink \
 libname_spec \
 library_names_spec \
 soname_spec \
+install_override_mode \
 finish_eval \
 old_striplib \
 striplib; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -17825,14 +19133,16 @@ module_cmds \
 module_expsym_cmds \
 export_symbols_cmds \
 prelink_cmds \
+postlink_cmds \
 postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -17840,31 +19150,40 @@ sys_lib_dlsearch_path_spec; do
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
-  ;;
-esac
-
 ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
 
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
 
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'
 
 
 
+# variables for create stdint.h replacement
+PACKAGE="$PACKAGE"
+VERSION="$VERSION"
+ac_stdint_h="$ac_stdint_h"
+_ac_stdint_h=`$as_echo "_$PACKAGE-$ac_stdint_h" | $as_tr_cpp`
+ac_cv_stdint_message="$ac_cv_stdint_message"
+ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
+ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
+ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
+ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_char_data_model="$ac_cv_char_data_model"
+ac_cv_long_data_model="$ac_cv_long_data_model"
+ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
+ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
+
 
 _ACEOF
 
   case $ac_config_target in
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
+    "checkmk/checkmk") CONFIG_FILES="$CONFIG_FILES checkmk/checkmk" ;;
+    "checkmk-x") CONFIG_COMMANDS="$CONFIG_COMMANDS checkmk-x" ;;
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "check.pc") CONFIG_FILES="$CONFIG_FILES check.pc" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "checkmk/Makefile") CONFIG_FILES="$CONFIG_FILES checkmk/Makefile" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
     "src/check.h") CONFIG_FILES="$CONFIG_FILES src/check.h" ;;
@@ -17886,9 +19209,7 @@ do
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
     "tests/test_vars") CONFIG_FILES="$CONFIG_FILES tests/test_vars" ;;
 
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  trap 'as_fn_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"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -17938,7 +19257,13 @@ $debug ||
 if test -n "$CONFIG_FILES"; then
 
 
-ac_cr='\r'
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
   ac_cs_awk_cr='\\r'
@@ -17946,7 +19271,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -17955,24 +19280,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -17980,7 +19299,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -17994,7 +19313,7 @@ s/'"$ac_delim"'$//
 t delim
 :nl
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more1
 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
 p
@@ -18008,7 +19327,7 @@ s/.\{148\}//
 t nl
 :delim
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more2
 s/["\\]/\\&/g; s/^/"/; s/$/"/
 p
@@ -18028,7 +19347,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -18060,23 +19379,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[      ]*$//
 }'
 fi
@@ -18088,7 +19413,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -18100,13 +19425,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -18191,9 +19514,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -18206,9 +19527,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-   { (exit 1); exit 1; }; };;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -18227,7 +19546,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_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 `:'.
@@ -18236,12 +19555,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
+      as_fn_append ac_file_inputs " '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -18252,7 +19569,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
        `' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
 $as_echo "$as_me: creating $ac_file" >&6;}
     fi
     # Neutralize special characters interpreted by sed in replacement strings.
@@ -18264,10 +19581,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -18295,47 +19610,7 @@ $as_echo X"$ac_file" |
            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=`$as_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 ||
-$as_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" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+  as_dir="$ac_dir"; as_fn_mkdir_p
   ac_builddir=.
 
 case "$ac_dir" in
@@ -18392,7 +19667,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # 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=
-
 ac_sed_dataroot='
 /datarootdir/ {
   p
@@ -18402,12 +19676,11 @@ ac_sed_dataroot='
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p
-'
+/@mandir@/p'
 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -18417,7 +19690,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
@@ -18445,27 +19718,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -18474,27 +19744,21 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -18532,7 +19796,7 @@ $as_echo X"$_am_arg" |
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
 $as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
@@ -18540,7 +19804,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   case $ac_file$ac_mode in
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -18553,7 +19817,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # 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
+    # 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.
@@ -18587,21 +19851,19 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    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
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
@@ -18627,47 +19889,7 @@ $as_echo X"$file" |
            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=`$as_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 ||
-$as_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" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
       # echo "creating $dirpart/$file"
       echo '# dummy' > "$dirpart/$file"
     done
@@ -18676,54 +19898,53 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
  ;;
     "libtool":C)
 
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the  same
+# distribution terms that you use for the rest of that program.
 #
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 # The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags=''
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
 
 # ### BEGIN LIBTOOL CONFIG
 
@@ -18743,6 +19964,18 @@ pic_mode=$pic_mode
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -18792,9 +20025,11 @@ SP2NL=$lt_lt_SP2NL
 # turn newlines into spaces.
 NL2SP=$lt_lt_NL2SP
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
 # An object symbol dumper.
 OBJDUMP=$lt_OBJDUMP
@@ -18802,13 +20037,30 @@ OBJDUMP=$lt_OBJDUMP
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == "file_magic".
+# Command to use when deplibs_check_method = "file_magic".
 file_magic_cmd=$lt_file_magic_cmd
 
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
 # The archiver.
 AR=$lt_AR
+
+# Flags to create an archive.
 AR_FLAGS=$lt_AR_FLAGS
 
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
 # A symbol stripping program.
 STRIP=$lt_STRIP
 
@@ -18817,6 +20069,9 @@ RANLIB=$lt_RANLIB
 old_postinstall_cmds=$lt_old_postinstall_cmds
 old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
 # A C compiler.
 LTCC=$lt_CC
 
@@ -18829,20 +20084,29 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 # Transform the output of nm in a proper C declaration.
 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
 # Transform the output of nm in a C name address pair.
 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
 
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
 # Used to examine libraries when file_magic_cmd begins with "file".
 MAGIC_CMD=$MAGIC_CMD
@@ -18850,6 +20114,9 @@ MAGIC_CMD=$MAGIC_CMD
 # Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
 DSYMUTIL=$lt_DSYMUTIL
 
@@ -18906,6 +20173,9 @@ library_names_spec=$lt_library_names_spec
 # The coded name of the library, if different from the real name.
 soname_spec=$lt_soname_spec
 
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
 # Command to use after installation of a shared archive.
 postinstall_cmds=$lt_postinstall_cmds
 
@@ -18925,8 +20195,11 @@ hardcode_into_libs=$hardcode_into_libs
 # Compile-time system search path for libraries.
 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
 
 # Whether dlopen is supported.
 dlopen_support=$enable_dlopen
@@ -18945,6 +20218,10 @@ striplib=$lt_striplib
 # The linker used to build libraries.
 LD=$lt_LD
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds
 
@@ -18957,12 +20234,12 @@ with_gcc=$GCC
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static
 
@@ -19012,20 +20289,16 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute
 
@@ -19049,9 +20322,6 @@ inherit_rpath=$inherit_rpath
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols
 
@@ -19067,6 +20337,9 @@ include_expsyms=$lt_include_expsyms
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec
 
@@ -19077,13 +20350,72 @@ hardcode_action=$hardcode_action
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_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
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -19092,237 +20424,497 @@ _LT_EOF
   esac
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 
   # We use sed instead of cat because bash on DJGPP gets confused if
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
 
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
+ ;;
+    "$ac_stdint_h":C)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_stdint_h : $_ac_stdint_h" >&5
+$as_echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;}
+ac_stdint=$tmp/_stdint.h
 
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
+echo "#ifndef" $_ac_stdint_h >$ac_stdint
+echo "#define" $_ac_stdint_h "1" >>$ac_stdint
+echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
+echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
+echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_t" != "_" ; then
+echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
+echo "#include <stdint.h>" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+else
 
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
+cat >>$ac_stdint <<STDINT_EOF
 
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
+/* ................... shortcircuit part ........................... */
 
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
+#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <stddef.h>
 
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
+/* .................... configured part ............................ */
 
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
+STDINT_EOF
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $* ))
-}
+echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+  ac_header="$ac_cv_header_stdint_x"
+  echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
+else
+  echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
+fi
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
+echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
+if  test "_$ac_cv_header_stdint_o" != "_" ; then
+  ac_header="$ac_cv_header_stdint_o"
+  echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
+else
+  echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
+fi
 
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
+echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
+if  test "_$ac_cv_header_stdint_u" != "_" ; then
+  ac_header="$ac_cv_header_stdint_u"
+  echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
+else
+  echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
+fi
 
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
+echo "" >>$ac_stdint
 
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
+if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
+  echo "#include <$ac_header>" >>$ac_stdint
+  echo "" >>$ac_stdint
+fi fi
 
+echo "/* which 64bit typedef has been found */" >>$ac_stdint
+if test "$ac_cv_type_uint64_t" = "yes" ; then
+echo "#define   _STDINT_HAVE_UINT64_T" "1"  >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
+fi
+if test "$ac_cv_type_u_int64_t" = "yes" ; then
+echo "#define   _STDINT_HAVE_U_INT64_T" "1"  >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
 
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
+echo "/* which type model has been detected */" >>$ac_stdint
+if test "_$ac_cv_char_data_model" != "_" ; then
+echo "#define   _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
+echo "#define   _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
+else
+echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
+echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
 
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
+echo "/* whether int_least types were detected */" >>$ac_stdint
+if test "$ac_cv_type_int_least32_t" = "yes"; then
+echo "#define   _STDINT_HAVE_INT_LEAST32_T" "1"  >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
+fi
+echo "/* whether int_fast types were detected */" >>$ac_stdint
+if test "$ac_cv_type_int_fast32_t" = "yes"; then
+echo "#define   _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
+fi
+echo "/* whether intmax_t type was detected */" >>$ac_stdint
+if test "$ac_cv_type_intmax_t" = "yes"; then
+echo "#define   _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
 
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
+  cat >>$ac_stdint <<STDINT_EOF
+/* .................... detections part ............................ */
 
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
+/* whether we need to define bitspecific types from compiler base types */
+#ifndef _STDINT_HEADER_INTPTR
+#ifndef _STDINT_HEADER_UINT32
+#ifndef _STDINT_HEADER_U_INT32
+#define _STDINT_NEED_INT_MODEL_T
+#else
+#define _STDINT_HAVE_U_INT_TYPES
+#endif
+#endif
+#endif
 
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
+#ifdef _STDINT_HAVE_U_INT_TYPES
+#undef _STDINT_NEED_INT_MODEL_T
+#endif
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$@"`
-}
+#ifdef  _STDINT_CHAR_MODEL
+#if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
+#ifndef _STDINT_BYTE_MODEL
+#define _STDINT_BYTE_MODEL 12
+#endif
+#endif
+#endif
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
+#ifndef _STDINT_HAVE_INT_LEAST32_T
+#define _STDINT_NEED_INT_LEAST_T
+#endif
 
-_LT_EOF
-esac
+#ifndef _STDINT_HAVE_INT_FAST32_T
+#define _STDINT_NEED_INT_FAST_T
+#endif
 
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
+#ifndef _STDINT_HEADER_INTPTR
+#define _STDINT_NEED_INTPTR_T
+#ifndef _STDINT_HAVE_INTMAX_T
+#define _STDINT_NEED_INTMAX_T
+#endif
+#endif
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1+=\$2"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1=\$$1\$2"
-}
+/* .................... definition part ............................ */
 
-_LT_EOF
-    ;;
-  esac
+/* some system headers have good uint64_t */
+#ifndef _HAVE_UINT64_T
+#if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
+#define _HAVE_UINT64_T
+typedef u_int64_t uint64_t;
+#endif
+#endif
+
+#ifndef _HAVE_UINT64_T
+/* .. here are some common heuristics using compiler runtime specifics */
+#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+#elif !defined __STRICT_ANSI__
+#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+#define _HAVE_UINT64_T
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+
+#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
+/* note: all ELF-systems seem to have loff-support which needs 64-bit */
+#if !defined _NO_LONGLONG
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
 
+#elif defined __alpha || (defined __mips && defined _ABIN32)
+#if !defined _NO_LONGLONG
+typedef long int64_t;
+typedef unsigned long uint64_t;
+#endif
+  /* compiler/cpu type to define int64_t */
+#endif
+#endif
+#endif
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+#if defined _STDINT_HAVE_U_INT_TYPES
+/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
+typedef u_int8_t uint8_t;
+typedef u_int16_t uint16_t;
+typedef u_int32_t uint32_t;
 
-  mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
+/* glibc compatibility */
+#ifndef __int8_t_defined
+#define __int8_t_defined
+#endif
+#endif
+
+#ifdef _STDINT_NEED_INT_MODEL_T
+/* we must guess all the basic types. Apart from byte-adressable system, */
+/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
+/* (btw, those nibble-addressable systems are way off, or so we assume) */
+
+
+#if defined _STDINT_BYTE_MODEL
+#if _STDINT_LONG_MODEL+0 == 242
+/* 2:4:2 =  IP16 = a normal 16-bit system                */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned long   uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          long    int32_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
+/* 2:4:4 =  LP32 = a 32-bit system derived from a 16-bit */
+/* 4:4:4 = ILP32 = a normal 32-bit system                */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned int    uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          int     int32_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
+/* 4:8:4 =  IP32 = a 32-bit system prepared for 64-bit    */
+/* 4:8:8 =  LP64 = a normal 64-bit system                 */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned int    uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          int     int32_t;
+#endif
+/* this system has a "long" of 64bit */
+#ifndef _HAVE_UINT64_T
+#define _HAVE_UINT64_T
+typedef unsigned long   uint64_t;
+typedef          long    int64_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 448
+/*      LLP64   a 64-bit system derived from a 32-bit system */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned int    uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          int     int32_t;
+#endif
+/* assuming the system has a "long long" */
+#ifndef _HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef unsigned long long uint64_t;
+typedef          long long  int64_t;
+#endif
+#else
+#define _STDINT_NO_INT32_T
+#endif
+#else
+#define _STDINT_NO_INT8_T
+#define _STDINT_NO_INT32_T
+#endif
+#endif
+
+/*
+ * quote from SunOS-5.8 sys/inttypes.h:
+ * Use at your own risk.  As of February 1996, the committee is squarely
+ * behind the fixed sized types; the "least" and "fast" types are still being
+ * discussed.  The probability that the "fast" types may be removed before
+ * the standard is finalized is high enough that they are not currently
+ * implemented.
+ */
+
+#if defined _STDINT_NEED_INT_LEAST_T
+typedef  int8_t    int_least8_t;
+typedef  int16_t   int_least16_t;
+typedef  int32_t   int_least32_t;
+#ifdef _HAVE_UINT64_T
+typedef  int64_t   int_least64_t;
+#endif
+
+typedef uint8_t   uint_least8_t;
+typedef uint16_t  uint_least16_t;
+typedef uint32_t  uint_least32_t;
+#ifdef _HAVE_UINT64_T
+typedef uint64_t  uint_least64_t;
+#endif
+  /* least types */
+#endif
+
+#if defined _STDINT_NEED_INT_FAST_T
+typedef  int8_t    int_fast8_t;
+typedef  int       int_fast16_t;
+typedef  int32_t   int_fast32_t;
+#ifdef _HAVE_UINT64_T
+typedef  int64_t   int_fast64_t;
+#endif
+
+typedef uint8_t   uint_fast8_t;
+typedef unsigned  uint_fast16_t;
+typedef uint32_t  uint_fast32_t;
+#ifdef _HAVE_UINT64_T
+typedef uint64_t  uint_fast64_t;
+#endif
+  /* fast types */
+#endif
+
+#ifdef _STDINT_NEED_INTMAX_T
+#ifdef _HAVE_UINT64_T
+typedef  int64_t       intmax_t;
+typedef uint64_t      uintmax_t;
+#else
+typedef          long  intmax_t;
+typedef unsigned long uintmax_t;
+#endif
+#endif
+
+#ifdef _STDINT_NEED_INTPTR_T
+#ifndef __intptr_t_defined
+#define __intptr_t_defined
+/* we encourage using "long" to store pointer values, never use "int" ! */
+#if   _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
+typedef  unsigned int   uintptr_t;
+typedef           int    intptr_t;
+#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
+typedef  unsigned long  uintptr_t;
+typedef           long   intptr_t;
+#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
+typedef        uint64_t uintptr_t;
+typedef         int64_t  intptr_t;
+#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
+typedef  unsigned long  uintptr_t;
+typedef           long   intptr_t;
+#endif
+#endif
+#endif
+
+/* The ISO C99 standard specifies that in C++ implementations these
+   should only be defined if explicitly requested.  */
+#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
+#ifndef UINT32_C
+
+/* Signed.  */
+# define INT8_C(c)      c
+# define INT16_C(c)     c
+# define INT32_C(c)     c
+# ifdef _HAVE_LONGLONG_UINT64_T
+#  define INT64_C(c)    c ## L
+# else
+#  define INT64_C(c)    c ## LL
+# endif
 
+/* Unsigned.  */
+# define UINT8_C(c)     c ## U
+# define UINT16_C(c)    c ## U
+# define UINT32_C(c)    c ## U
+# ifdef _HAVE_LONGLONG_UINT64_T
+#  define UINT64_C(c)   c ## UL
+# else
+#  define UINT64_C(c)   c ## ULL
+# endif
+
+/* Maximal type.  */
+# ifdef _HAVE_LONGLONG_UINT64_T
+#  define INTMAX_C(c)   c ## L
+#  define UINTMAX_C(c)  c ## UL
+# else
+#  define INTMAX_C(c)   c ## LL
+#  define UINTMAX_C(c)  c ## ULL
+# endif
+
+  /* literalnumbers */
+#endif
+#endif
+
+/* These limits are merily those of a two complement byte-oriented system */
+
+/* Minimum of signed integral types.  */
+# define INT8_MIN               (-128)
+# define INT16_MIN              (-32767-1)
+# define INT32_MIN              (-2147483647-1)
+# define INT64_MIN              (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types.  */
+# define INT8_MAX               (127)
+# define INT16_MAX              (32767)
+# define INT32_MAX              (2147483647)
+# define INT64_MAX              (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types.  */
+# define UINT8_MAX              (255)
+# define UINT16_MAX             (65535)
+# define UINT32_MAX             (4294967295U)
+# define UINT64_MAX             (__UINT64_C(18446744073709551615))
+
+/* Minimum of signed integral types having a minimum size.  */
+# define INT_LEAST8_MIN         INT8_MIN
+# define INT_LEAST16_MIN        INT16_MIN
+# define INT_LEAST32_MIN        INT32_MIN
+# define INT_LEAST64_MIN        INT64_MIN
+/* Maximum of signed integral types having a minimum size.  */
+# define INT_LEAST8_MAX         INT8_MAX
+# define INT_LEAST16_MAX        INT16_MAX
+# define INT_LEAST32_MAX        INT32_MAX
+# define INT_LEAST64_MAX        INT64_MAX
+
+/* Maximum of unsigned integral types having a minimum size.  */
+# define UINT_LEAST8_MAX        UINT8_MAX
+# define UINT_LEAST16_MAX       UINT16_MAX
+# define UINT_LEAST32_MAX       UINT32_MAX
+# define UINT_LEAST64_MAX       UINT64_MAX
+
+  /* shortcircuit*/
+#endif
+  /* once */
+#endif
+#endif
+STDINT_EOF
+fi
+    if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_stdint_h is unchanged" >&5
+$as_echo "$as_me: $ac_stdint_h is unchanged" >&6;}
+    else
+      ac_dir=`$as_dirname -- "$ac_stdint_h" ||
+$as_expr X"$ac_stdint_h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_stdint_h" : 'X\(//\)[^/]' \| \
+        X"$ac_stdint_h" : 'X\(//\)$' \| \
+        X"$ac_stdint_h" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_stdint_h" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      as_dir="$ac_dir"; as_fn_mkdir_p
+      rm -f $ac_stdint_h
+      mv $ac_stdint $ac_stdint_h
+    fi
  ;;
+    "checkmk-x":C) chmod +x checkmk/checkmk ;;
 
   esac
 done # for ac_tag
 
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -19343,10 +20935,73 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+
+# Finally, print a summary of the Check's compile options
+
+echo
+echo "=========================================="
+echo "Summary of Check $CHECK_MAJOR_VERSION.$CHECK_MINOR_VERSION.$CHECK_MICRO_VERSION options:"
+echo
+
+if test "x0" = x"$HAVE_FORK"; then
+    result="no"
+else
+    result="yes"
+fi
+echo "fork mode ............................ $result"
+
+case "$hw_cv_librt_timers_posix" in
+    "yes")
+        result="no"
+        ;;
+    "no")
+        result="yes"
+        ;;
+    *)
+        # The AC_REPLACE_FUNCS macro was invoked,
+        # meaning we are cross compiling.
+        if test "xno" = x"$ac_cv_func_timer_create"; then
+            result="yes"
+        else
+            result="no"
+        fi
+        ;;
+esac
+echo "high resolution timer replacement .... $result"
+
+if test "xno" = x"$hw_cv_func_snprintf_c99"; then
+    result="yes"
+else
+    result="no"
+fi
+echo "snprintf replacement ................. $result"
+
+if test "xfalse" = x"$enable_subunit"; then
+    result="no"
+else
+    result="yes"
+fi
+echo "subunit support....................... $result"
+
+if test "xtrue" = x"$enable_timeout_tests"; then
+    result="yes"
+else
+    result="no"
+fi
+echo "timeout unit tests ................... $result"
+
+if test "x0" = x"$ENABLE_REGEX"; then
+    result="no"
+else
+    result="yes"
+fi
+echo "POSIX regular expressions ............ $result"
+
+echo "=========================================="
index a649881..929fcf3 100644 (file)
@@ -4,10 +4,10 @@
 # Prelude.
 AC_PREREQ([2.59])
 
-AC_INIT([Check], [0.9.8], [check-devel at lists dot sourceforge dot net])
+AC_INIT([Check], [0.12.0], [check-devel at lists dot sourceforge dot net])
 CHECK_MAJOR_VERSION=0
-CHECK_MINOR_VERSION=9
-CHECK_MICRO_VERSION=8
+CHECK_MINOR_VERSION=12
+CHECK_MICRO_VERSION=0
 CHECK_VERSION=$CHECK_MAJOR_VERSION.$CHECK_MINOR_VERSION.$CHECK_MICRO_VERSION
 
 # unique source file --- primitive safety check 
@@ -19,23 +19,23 @@ AC_CONFIG_MACRO_DIR([m4])
 # place where portability library functions are kept
 AC_CONFIG_LIBOBJ_DIR([lib])
 
-# place to put some extra build scripts installed
-AC_CONFIG_AUX_DIR([build-aux])
+# really severe build strictness
+AM_INIT_AUTOMAKE([-Wall gnits 1.11.2])
+# Change to using into-in-builddir in the future:
+#AM_INIT_AUTOMAKE([info-in-builddir -Wall -Werror gnits 1.14])
 
 # define things like _GNU_SOURCE appropriately
+# From patch 2803433, request system extensions to generate 64-bit safe code
 AC_USE_SYSTEM_EXTENSIONS
 
-# really severe build strictness
-AM_INIT_AUTOMAKE([-Wall -Werror gnits 1.9.6])
-
-# FIXME: find the other places this stuff is used
-
 AC_SUBST(CHECK_MAJOR_VERSION)
 AC_SUBST(CHECK_MINOR_VERSION)
 AC_SUBST(CHECK_MICRO_VERSION)
 AC_SUBST(CHECK_VERSION)
 
 # Configure options.
+# allow `./configure --enable-silent-rules' and `make V=0'
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 
 AC_ARG_ENABLE(gcov,
 AC_HELP_STRING([--enable-gcov],
@@ -47,7 +47,7 @@ AC_HELP_STRING([--enable-gcov],
 esac], [enable_gcov=false ])
 
 if test x$enable_gcov = xtrue ; then
-  if test -n "$GCC"; then
+  if test x"$GCC" != xyes; then
     AC_MSG_ERROR([gcov only works if gcc is used])
   fi
 
@@ -84,7 +84,7 @@ AC_HELP_STRING([--enable-subunit],
     ;;
   no)
     enable_subunit=false
-    echoo "Disabled subunit support"
+    echo "Disabled subunit support"
     ;;
   autodetect)
     echo "Subunit support will enable automatically."
@@ -94,82 +94,184 @@ esac],
 [echo "Subunit support will enable automatically."
  enable_subunit=autodetect])
 
+AC_ARG_ENABLE(fork,
+AC_HELP_STRING([--enable-fork],
+              [enable support for fork @<:@default=autodetect@:>@]),
+[case "${enableval}" in
+  yes) enable_fork=true ;;
+  no)  enable_fork=false ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for --enable-fork) ;;
+esac], [enable_fork=true ])
+
+AC_ARG_ENABLE(snprintf-replacement,
+AC_HELP_STRING([--enable-snprintf-replacement],
+              [enable check snprintf replacement, (even if the system provides a C99 compliant version) @<:@default=autodetect@:>@]),
+[case "${enableval}" in
+  yes) enable_snprintf_replacement=true ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for --enable-snprintf-replacement) ;;
+esac], [enable_snprintf_replacement=autodetect ])
+
+AC_ARG_ENABLE(timer-replacement,
+AC_HELP_STRING([--enable-timer-replacement],
+              [enable check timer replacement, (even if the system provides timer_create, timer_settime, and timer_delete) @<:@default=autodetect@:>@]),
+[case "${enableval}" in
+  yes) enable_timer_replacement=true ;;
+  *)   AC_MSG_ERROR(bad value ${enableval} for --enable-timer-replacement) ;;
+esac], [enable_timer_replacement=autodetect ])
+
+
 # Checks for programs.
+AC_PROG_SED
 AC_PROG_AWK
 AC_PROG_CC
 # Automake wants this for per-target CFLAGS
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_LN_S
+# for non-POSIX archivers like the one on OS X
+# use m4_ifdef to work on older automake (1.11)
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 AC_PROG_LIBTOOL
 
+# initialize libtool to build .la files
+LT_INIT
+
 # add these options to CFLAGS if the compiler supports them
 AC_DEFUN([AX_CFLAGS_ADD],[AX_C_CHECK_FLAG($1, , , CFLAGS="$CFLAGS $1")])
-AX_CFLAGS_WARN_ALL_ANSI
+# Do not use the -ansi flag, currently there is a bug in MinGW/MinGW-w64
+# which prevents Check from compiling. Add after this is resolved:
+#    sourceforge.net/p/mingw/bugs/2024
+#AX_CFLAGS_WARN_ALL_ANSI
+# Do not use the -pedantic flag, as on solaris it has a different
+# meaning than on gcc. Using the flag causes the build to fail.
 AX_CFLAGS_ADD([-Wextra])
 AX_CFLAGS_ADD([-Wstrict-prototypes])
 AX_CFLAGS_ADD([-Wmissing-prototypes])
 AX_CFLAGS_ADD([-Wwrite-strings])
 AX_CFLAGS_ADD([-Wno-variadic-macros])
+AX_CFLAGS_ADD([-Wimport])
+AX_CFLAGS_ADD([-Wfatal-errors])
+AX_CFLAGS_ADD([-Wformat=2])
+AX_CFLAGS_ADD([-Winit-self])
+AX_CFLAGS_ADD([-Wmissing-include-dirs])
+AX_CFLAGS_ADD([-Wswitch-default])
+AX_CFLAGS_ADD([-Wunknown-pragmas])
+# The following flag is to enable C99 support on AIX, which is
+# necessary for variable macros in check.h
+case "${host_os}" in
+    *aix*)
+    if ! test "$GCC" = "yes"; then
+        AX_CFLAGS_ADD([-qlanglvl=stdc99])
+    fi
+    ;;
+    *)
+    ;;
+esac
 
 AC_CHECK_PROGS(GCOV, gcov, false)
 AC_CHECK_PROGS(LCOV, lcov, false)
 AC_CHECK_PROGS(GENHTML, genhtml, false)
 AC_CHECK_PROGS(TEX, tex, false)
-if test -n "$TEX"; then
+if test "$TEX" = "false"; then
     # Make it [somewhat] clear to maintainers that tex is missing. Not an error
     # though because 'make install' (which users need) does not build the docs
     # anyway.
     AC_MSG_WARN(tex not installed: cannot rebuild HTML documentation.)
 fi
+AC_CHECK_PROGS(FILTERDIFF, filterdiff, false)
+if test "$FILTERDIFF" = "false"; then
+    # Make it [somewhat] clear to maintainers that filterdiff is missing.
+    # This is not an error, but will prevent builds from being
+    # reproducible.
+    AC_MSG_WARN(filterdiff not installed; build will not be reproducible.)
+fi
+
+AM_CONDITIONAL(USE_FILTERDIFF, [test x"$FILTERDIFF" = x"filterdiff"])
 
-# Checks for libraries.
+# Checks for pthread implementation.
+ACX_PTHREAD
+CC="$PTHREAD_CC"
+
+# Check if floor is in the math library, and if so add -lm to LIBS
+AC_CHECK_LIB([m], [floor])
+
+# Check if clock_gettime, timer_create, timer_settime, and timer_delete are available in lib rt, and if so,
+# add -lrt to LIBS
+AC_CHECK_LIB([rt], [clock_gettime, timer_create, timer_settime, timer_delete])
+
+# check that struct timespec is defined in time.h. If not, we need to
+# define it in libcompat.h. Note the optional inclusion of pthread.h.
+# On MinGW and MinGW-w64, the pthread.h file contains the timespec
+# definition.
+AC_CHECK_MEMBERS([struct timespec.tv_sec, struct timespec.tv_nsec], [], [AC_DEFINE_UNQUOTED(STRUCT_TIMESPEC_DEFINITION_MISSING, 1, "Need to define the timespec structure")], [
+#include <time.h>
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+])
+
+# check that struct itimerspec is defined in time.h. If not, we need to
+# define it in libcompat.h.  Note the optional inclusion of pthread.h.
+# On MinGW and MinGW-w64, the pthread.h file contains the itimerspec
+# definition.
+AC_CHECK_MEMBERS([struct itimerspec.it_interval, struct itimerspec.it_value], [], [AC_DEFINE_UNQUOTED(STRUCT_ITIMERSPEC_DEFINITION_MISSING, 1, "Need to define the itimerspec structure")], [
+#include <time.h>
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+])
 
 # Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h])
-
-if test xfalse != x"$enable_subunit"; then
-AC_CHECK_LIB(subunit, subunit_test_start, ,
-[case "$enable_subunit" in
- autodetect)
-   enable_subunit=false
-   ;;
- true)
-   AC_MSG_ERROR([libsubunit is required for subunit protocol support. The homepage for subunit is https://launchpad.net/subunit/])
-   ;;
- esac
-])
-fi
-if test xfalse != x"$enable_subunit"; then
-AC_CHECK_HEADER([subunit/child.h], ,
-[case "$enable_subunit" in
- autodetect)
-   enable_subunit=false
-   ;;
- true)
-   AC_MSG_ERROR([The header subunit/child.h could not be succesfully included and is required for subunit protocol support. The homepage for subunit is https://launchpad.net/subunit/])
-   ;;
- esac
-])
-fi
-if test xfalse = x"$enable_subunit"; then
+AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/time.h unistd.h])
+AX_CREATE_STDINT_H(check_stdint.h)
+
+AS_IF([test x"$enable_subunit" != "xfalse" && test x"$enable_subunit" != "xtrue"], [
+       PKG_CHECK_EXISTS([libsubunit], [:], [enable_subunit=false])
+       ])
+AS_IF([test x"$enable_subunit" != "xfalse"], [
+       PKG_CHECK_MODULES([LIBSUBUNIT], [libsubunit])
+       ])
+if test "xfalse" = x"$enable_subunit"; then
 ENABLE_SUBUNIT="0"
+LIBSUBUNIT_PC=""
 else
 ENABLE_SUBUNIT="1"
+LIBSUBUNIT_PC="libsubunit"
 fi
 AC_SUBST(ENABLE_SUBUNIT)
+AC_SUBST([LIBSUBUNIT_PC])
 AC_DEFINE_UNQUOTED(ENABLE_SUBUNIT, $ENABLE_SUBUNIT, [Subunit protocol result output])
 
 AM_CONDITIONAL(SUBUNIT, test x"$enable_subunit" != "xfalse")
 
+# Check for POSIX regular expressions support.
+AC_CHECK_HEADERS([regex.h], HAVE_REGEX_H=1, HAVE_REGEX_H=0)
 
+if test "x$HAVE_REGEX_H" = "x1"; then
+    AC_CHECK_FUNCS([regcomp regexec], HAVE_REGEX=1, HAVE_REGEX=0)
+else
+    HAVE_REGEX=0
+fi
+AC_SUBST(HAVE_REGEX)
+AC_DEFINE_UNQUOTED(HAVE_REGEX, $HAVE_REGEX, "Regular expressions are supported")
+
+if test "x$HAVE_REGEX" = "x1"; then
+    ENABLE_REGEX="1"
+else
+    ENABLE_REGEX="0"
+fi
+AC_SUBST(ENABLE_REGEX)
+AC_DEFINE_UNQUOTED(ENABLE_REGEX, $ENABLE_REGEX, "Regular expressions are supported and enabled")
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
+AC_TYPE_INTMAX_T
+AC_TYPE_UINTMAX_T
+AC_TYPE_UINT32_T
 AC_HEADER_TIME
 AC_STRUCT_TM
 
@@ -177,21 +279,84 @@ AC_CHECK_SIZEOF(int, 4)
 AC_CHECK_SIZEOF(short, 2)
 AC_CHECK_SIZEOF(long, 4)
 
+# The following two checks will attempt to include pthread.h. The
+# reason is MinGW and MinGW-w64 have been known to put the time
+# related definitions in the pthread headers. Without include
+# pthread.h, these checks may mistakenly fail to find the
+# definitions.
+AC_CHECK_TYPE(clockid_t, [], [AC_DEFINE([clockid_t], [int], [clockid_t])], [
+AC_INCLUDES_DEFAULT
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+])
+AC_CHECK_TYPE(timer_t, [], [AC_DEFINE([timer_t], [int], [timer_t])], [
+AC_INCLUDES_DEFAULT
+#if defined(HAVE_PTHREAD)
+#include <pthread.h>
+#endif /* HAVE_PTHREAD */
+])
+
 # Checks for library functions.
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
-AC_REPLACE_FUNCS([fileno localtime_r pipe putenv setenv sleep strdup strsignal unsetenv])
-AC_CHECK_DECLS([fileno, localtime_r, pipe, putenv, setenv, sleep, strdup, strsignal, unsetenv])
 
-# Checks for pthread implementation.
-ACX_PTHREAD
-CC="$PTHREAD_CC"
+# Check if the timer_create(), timer_settime(), and timer_delete()
+# functions on the system are available and suitable, or need to be
+# replaced with Check's replacement of these functions.
+HW_LIBRT_TIMERS
+
+# The following checks will replace missing functions from libcompat
+AC_REPLACE_FUNCS([alarm clock_gettime getline gettimeofday localtime_r strdup strsignal])
+AC_CHECK_DECLS([alarm, clock_gettime, getline, gettimeofday, localtime_r, strdup, strsignal])
+
+# The following checks are to only detect if the functions exist, but
+# not replace them
+AC_CHECK_DECLS([setenv])
+
+AC_CHECK_FUNCS([setitimer])
+
+# Checks for functions not available in Windows
+if test "xtrue" = x"$enable_fork"; then
+       AC_CHECK_FUNCS([fork], HAVE_FORK=1, HAVE_FORK=0)
+else
+       HAVE_FORK=0
+fi
+AC_SUBST(HAVE_FORK)
+AC_CHECK_FUNCS([sigaction])
+AC_CHECK_FUNCS([mkstemp])
+
+# Check if the system's snprintf (and its variations) are C99 compliant.
+# If they are not, use the version in libcompat.
+HW_FUNC_VSNPRINTF
+HW_FUNC_SNPRINTF
+
+# Check for whether we can install checkmk (we have a usable awk)
+AC_ARG_VAR([AWK_PATH],[Awk interpreter command])
+AC_PATH_PROG(AWK_PATH, $AWK, [*NO AWK*])
+AM_CONDITIONAL([INSTALL_CHECKMK], [test "x$AWK_PATH" != 'x*NO AWK*'])
+
+# Certain awk implementations disagree with each other on how to
+# substitute doubled backslashes in gsub()
+AC_SUBST(AWK_GSUB_DBL_BSLASH, '\\\\')
+
+AS_IF([test "x$AWK_PATH" = 'x*NO AWK*'],
+      [AC_MSG_WARN([Couldn't find a usable awk; won't install checkmk.])],
+
+      # Determine correct number of backslashes for gsub's replacement
+      # value.
+      [AS_IF([echo '\' |
+              "$AWK_PATH" '{ gsub("\\\\", "\\\\", $0); print }' |
+              grep '^\\$' >/dev/null 2>&1], AWK_GSUB_DBL_BSLASH='\\\\\\\\')
+       AC_CONFIG_FILES(checkmk/checkmk)
+       AC_CONFIG_COMMANDS([checkmk-x], [chmod +x checkmk/checkmk])])
 
 # Output files
 AC_CONFIG_HEADERS([config.h])
 
 AC_CONFIG_FILES([check.pc
                  Makefile
+                 checkmk/Makefile
                 doc/Makefile
                 lib/Makefile
                  src/check.h
@@ -200,3 +365,66 @@ AC_CONFIG_FILES([check.pc
                 tests/test_vars])
 
 AC_OUTPUT
+
+# Finally, print a summary of the Check's compile options
+
+echo
+echo "=========================================="
+echo "Summary of Check $CHECK_MAJOR_VERSION.$CHECK_MINOR_VERSION.$CHECK_MICRO_VERSION options:"
+echo
+
+if test "x0" = x"$HAVE_FORK"; then
+    result="no"
+else
+    result="yes"
+fi
+echo "fork mode ............................ $result"
+
+case "$hw_cv_librt_timers_posix" in
+    "yes")
+        result="no"
+        ;;
+    "no")
+        result="yes"
+        ;;
+    *)
+        # The AC_REPLACE_FUNCS macro was invoked,
+        # meaning we are cross compiling.
+        if test "xno" = x"$ac_cv_func_timer_create"; then
+            result="yes"
+        else
+            result="no"
+        fi
+        ;;
+esac
+echo "high resolution timer replacement .... $result"
+
+if test "xno" = x"$hw_cv_func_snprintf_c99"; then
+    result="yes"
+else
+    result="no"
+fi
+echo "snprintf replacement ................. $result"
+
+if test "xfalse" = x"$enable_subunit"; then
+    result="no"
+else
+    result="yes"
+fi
+echo "subunit support....................... $result"
+
+if test "xtrue" = x"$enable_timeout_tests"; then
+    result="yes"
+else
+    result="no"
+fi
+echo "timeout unit tests ................... $result"
+
+if test "x0" = x"$ENABLE_REGEX"; then
+    result="no"
+else
+    result="yes"
+fi
+echo "POSIX regular expressions ............ $result"
+
+echo "=========================================="
diff --git a/depcomp b/depcomp
new file mode 100755 (executable)
index 0000000..fc98710
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2014 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, see <http://www.gnu.org/licenses/>.
+
+# 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 <oliva@dcc.unicamp.br>.
+
+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 outputting dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  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"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# 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
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
+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 -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # 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.
+## Some versions of gcc put a space before the ':'.  On the theory
+## that the space means something, we add a space to the output as
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -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 -ne 0; then
+    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 ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
+    echo >> "$depfile"
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
+  else
+    make_dummy_depfile
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+xlc)
+  # 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
+  ;;
+
+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.
+  set_dir_from "$object"
+  set_base_from "$object"
+  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 -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using '\' :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "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.
+  set_dir_from  "$object"
+  set_base_from "$object"
+  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 -ne 0; then
+     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,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
+    sed -ne '2,${
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
+  else
+    make_dummy_depfile
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # 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
+  ;;
+
+#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 "X$1" != 'X--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|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+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 "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    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.
+    -arch)
+      eat=yes ;;
+    -*|$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"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+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 "X$1" != 'X--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.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+        set fnord "$@"
+        shift
+        shift
+        ;;
+    *)
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # 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
+  ;;
+
+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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
index ac1c254..2710972 100644 (file)
@@ -3,6 +3,12 @@
 info_TEXINFOS = check.texi
 check_TEXINFOS = fdl.texi
 
+check_html: $(srcdir)/check.texi
+       texi2html --output=check_html --top-file=index.html --split=chapter check.texi
+
+doxygen:
+       doxygen $(srcdir)/doxygen.conf
+
 ## we need to include several diffs as we evolve the example in the
 ## tutorial.  this means we'll generate them from the example source.
 
@@ -20,6 +26,15 @@ eg_root = $(top_srcdir)/doc/example
 eg_src = $(eg_root)/src
 eg_tests = $(eg_root)/tests
 
+# If the filterdiff tool is available, use it to filter timestamps
+# from diff files. Otherwise, the timestamps change between builds
+# and the built output will not be reproducible
+if USE_FILTERDIFF
+    filter_timestapms = | filterdiff --remove-timestamps
+else
+    filter_timestapms =
+endif
+
 ## now a rule for each diff.  the redundancy here can probably be
 ## parameterized, but I don't know how.  if you know, please tell us!
 
@@ -27,47 +42,47 @@ eg_tests = $(eg_root)/tests
 # think that means there is an error
 money.1-2.h.diff: $(eg_src)/money.1.h $(eg_src)/money.2.h
        cd $(eg_root); \
-       diff -u src/money.1.h src/money.2.h > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.1.h src/money.2.h ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.1-3.c.diff: $(eg_src)/money.1.c $(eg_src)/money.3.c
        cd $(eg_root); \
-       diff -u src/money.1.c src/money.3.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.1.c src/money.3.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.3-4.c.diff: $(eg_src)/money.3.c $(eg_src)/money.4.c
        cd $(eg_root); \
-       diff -u src/money.3.c src/money.4.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.3.c src/money.4.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.4-5.c.diff: $(eg_src)/money.4.c $(eg_src)/money.5.c
        cd $(eg_root); \
-       diff -u src/money.4.c src/money.5.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.4.c src/money.5.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.5-6.c.diff: $(eg_src)/money.5.c $(eg_src)/money.6.c
        cd $(eg_root); \
-       diff -u src/money.5.c src/money.6.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.5.c src/money.6.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.1-2.c.diff: $(eg_tests)/check_money.1.c $(eg_tests)/check_money.2.c
        cd $(eg_root); \
-       diff -u tests/check_money.1.c tests/check_money.2.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.1.c tests/check_money.2.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.2-3.c.diff: $(eg_tests)/check_money.2.c $(eg_tests)/check_money.3.c
        cd $(eg_root); \
-       diff -u tests/check_money.2.c tests/check_money.3.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.2.c tests/check_money.3.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.3-6.c.diff: $(eg_tests)/check_money.3.c $(eg_tests)/check_money.6.c
        cd $(eg_root); \
-       diff -u tests/check_money.3.c tests/check_money.6.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.3.c tests/check_money.6.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.6-7.c.diff: $(eg_tests)/check_money.6.c $(eg_tests)/check_money.7.c
        cd $(eg_root); \
-       diff -u tests/check_money.6.c tests/check_money.7.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.6.c tests/check_money.7.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 # explicitly list every file in the example.
@@ -96,15 +111,26 @@ example_tests_docs = example/tests/Makefile.am \
                      example/tests/check_money.6.c \
                      example/tests/check_money.7.c
 
+example_cmake = example/CMakeLists.txt \
+                example/src/CMakeLists.txt \
+                example/tests/CMakeLists.txt \
+                example/cmake/config.h.in \
+                example/cmake/COPYING-CMAKE-SCRIPTS.txt \
+                example/cmake/FindCheck.cmake
+
 ## what to clean
 
 CLEANFILES = *~ *.diff
 
+clean-local:
+       rm -rf check_html
+       rm -rf doxygen
 ## what to distribute
 
 EXTRA_DIST = $(example_docs) \
              $(example_src_docs) \
-             $(example_tests_docs)
+             $(example_tests_docs) \
+             $(example_cmake)
 
 ## what to install
 
index 0bf46f9..99470ff 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 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.
+# Copyright (C) 1994-2014 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -33,26 +89,66 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc
-DIST_COMMON = $(check_TEXINFOS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/stamp-vti \
-       $(srcdir)/version.texi
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
        $(top_srcdir)/m4/ax_c_check_flag.m4 \
-       $(top_srcdir)/m4/ax_cflags_warn_all_ansi.m4 \
-       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+       $(top_srcdir)/m4/librt_timers.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \
+       $(srcdir)/stamp-vti $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
+AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
+am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
+am__v_DVIPS_0 = @echo "  DVIPS   " $@;
+am__v_DVIPS_1 = 
+AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
+am__v_MAKEINFO_0 = @echo "  MAKEINFO" $@;
+am__v_MAKEINFO_1 = 
+AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
+am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
+am__v_INFOHTML_0 = @echo "  INFOHTML" $@;
+am__v_INFOHTML_1 = 
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
+am__v_TEXI2DVI_0 = @echo "  TEXI2DVI" $@;
+am__v_TEXI2DVI_1 = 
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
+am__v_TEXI2PDF_0 = @echo "  TEXI2PDF" $@;
+am__v_TEXI2PDF_1 = 
+AM_V_texinfo = $(am__v_texinfo_@AM_V@)
+am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
+am__v_texinfo_0 = -q
+am__v_texinfo_1 = 
+AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 = 
 INFO_DEPS = $(srcdir)/check.info
-TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
+am__TEXINFO_TEX_DIR = $(srcdir)
 DVIS = check.dvi
 PDFS = check.pdf
 PSS = check.ps
@@ -63,6 +159,11 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
 DVIPS = dvips
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(exampledir)" \
        "$(DESTDIR)$(examplesrcdir)" "$(DESTDIR)$(exampletestsdir)"
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -70,19 +171,43 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-exampleDATA_INSTALL = $(INSTALL_DATA)
-examplesrcDATA_INSTALL = $(INSTALL_DATA)
-exampletestsDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 DATA = $(example_DATA) $(examplesrc_DATA) $(exampletests_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(check_TEXINFOS) $(srcdir)/Makefile.in mdate-sh \
+       texinfo.tex
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+AWK_GSUB_DBL_BSLASH = @AWK_GSUB_DBL_BSLASH@
+AWK_PATH = @AWK_PATH@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -95,20 +220,25 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_REGEX = @ENABLE_REGEX@
 ENABLE_SUBUNIT = @ENABLE_SUBUNIT@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILTERDIFF = @FILTERDIFF@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
 GENHTML = @GENHTML@
 GREP = @GREP@
+HAVE_FORK = @HAVE_FORK@
+HAVE_REGEX = @HAVE_REGEX@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -119,11 +249,16 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBSUBUNIT_CFLAGS = @LIBSUBUNIT_CFLAGS@
+LIBSUBUNIT_LIBS = @LIBSUBUNIT_LIBS@
+LIBSUBUNIT_PC = @LIBSUBUNIT_PC@
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -136,8 +271,12 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -152,6 +291,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 acx_pthread_config = @acx_pthread_config@
@@ -185,7 +325,6 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -193,6 +332,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -206,6 +346,12 @@ check_TEXINFOS = fdl.texi
 eg_root = $(top_srcdir)/doc/example
 eg_src = $(eg_root)/src
 eg_tests = $(eg_root)/tests
+@USE_FILTERDIFF_FALSE@filter_timestapms = 
+
+# If the filterdiff tool is available, use it to filter timestamps
+# from diff files. Otherwise, the timestamps change between builds
+# and the built output will not be reproducible
+@USE_FILTERDIFF_TRUE@filter_timestapms = | filterdiff --remove-timestamps
 
 # explicitly list every file in the example.
 example_docs = example/Makefile.am \
@@ -232,10 +378,18 @@ example_tests_docs = example/tests/Makefile.am \
                      example/tests/check_money.6.c \
                      example/tests/check_money.7.c
 
+example_cmake = example/CMakeLists.txt \
+                example/src/CMakeLists.txt \
+                example/tests/CMakeLists.txt \
+                example/cmake/config.h.in \
+                example/cmake/COPYING-CMAKE-SCRIPTS.txt \
+                example/cmake/FindCheck.cmake
+
 CLEANFILES = *~ *.diff
 EXTRA_DIST = $(example_docs) \
              $(example_src_docs) \
-             $(example_tests_docs)
+             $(example_tests_docs) \
+             $(example_cmake)
 
 
 # install money example
@@ -258,10 +412,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  doc/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnits  doc/Makefile
-.PRECIOUS: Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits doc/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -278,6 +431,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -286,8 +440,8 @@ clean-libtool:
        -rm -rf .libs _libs
 
 .texi.info:
-       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-       am__cwd=`pwd` && cd $(srcdir) && \
+       $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       am__cwd=`pwd` && $(am__cd) $(srcdir) && \
        rm -rf $$backupdir && mkdir $$backupdir && \
        if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
          for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
@@ -299,36 +453,34 @@ clean-libtool:
         -o $@ $<; \
        then \
          rc=0; \
-         cd $(srcdir); \
+         $(am__cd) $(srcdir); \
        else \
          rc=$$?; \
-         cd $(srcdir) && \
+         $(am__cd) $(srcdir) && \
          $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
        fi; \
        rm -rf $$backupdir; exit $$rc
 
 .texi.dvi:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-       $(TEXI2DVI) $<
+       $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+       $<
 
 .texi.pdf:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-       $(TEXI2PDF) $<
+       $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+       $<
 
 .texi.html:
-       rm -rf $(@:.html=.htp)
-       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+       $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+       $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
         -o $(@:.html=.htp) $<; \
        then \
-         rm -rf $@; \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+         rm -rf $@ && mv $(@:.html=.htp) $@; \
        else \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-         exit 1; \
+         rm -rf $(@:.html=.htp); exit 1; \
        fi
 $(srcdir)/check.info: check.texi $(srcdir)/version.texi $(check_TEXINFOS)
 check.dvi: check.texi $(srcdir)/version.texi $(check_TEXINFOS)
@@ -337,52 +489,54 @@ check.html: check.texi $(srcdir)/version.texi $(check_TEXINFOS)
 $(srcdir)/version.texi:  $(srcdir)/stamp-vti
 $(srcdir)/stamp-vti: check.texi $(top_srcdir)/configure
        @(dir=.; test -f ./check.texi || dir=$(srcdir); \
-       set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/check.texi`; \
+       set `$(SHELL) $(srcdir)/mdate-sh $$dir/check.texi`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
-       echo "@set VERSION $(VERSION)") > vti.tmp
-       @cmp -s vti.tmp $(srcdir)/version.texi \
-         || (echo "Updating $(srcdir)/version.texi"; \
-             cp vti.tmp $(srcdir)/version.texi)
-       -@rm -f vti.tmp
+       echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
+       (cmp -s vti.tmp$$$$ $(srcdir)/version.texi \
+         || (echo "Updating $(srcdir)/version.texi" && \
+             cp vti.tmp$$$$ $(srcdir)/version.texi.tmp$$$$ && \
+             mv $(srcdir)/version.texi.tmp$$$$ $(srcdir)/version.texi)) && \
+       rm -f vti.tmp$$$$ $(srcdir)/version.texi.$$$$
        @cp $(srcdir)/version.texi $@
 
 mostlyclean-vti:
-       -rm -f vti.tmp
+       -rm -f vti.tmp* $(srcdir)/version.texi.tmp*
 
 maintainer-clean-vti:
        -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
 .dvi.ps:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-       $(DVIPS) -o $@ $<
+       $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(DVIPS) $(AM_V_texinfo) -o $@ $<
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(DVIS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
          rm -f "$(DESTDIR)$(dvidir)/$$f"; \
        done
 
 uninstall-html-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(HTMLS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
+       @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
          echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
          rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
        done
 
 uninstall-info-am:
        @$(PRE_UNINSTALL)
-       @if test -d '$(DESTDIR)$(infodir)' && \
-           (install-info --version && \
-            install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+       @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
            echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
-           install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+           if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+           then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
          done; \
        else :; fi
        @$(NORMAL_UNINSTALL)
@@ -398,16 +552,18 @@ uninstall-info-am:
 
 uninstall-pdf-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PDFS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
          rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
        done
 
 uninstall-ps-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PSS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
          rm -f "$(DESTDIR)$(psdir)/$$f"; \
        done
@@ -424,16 +580,18 @@ dist-info: $(INFO_DEPS)
          for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
            if test -f $$file; then \
              relfile=`expr "$$file" : "$$d/\(.*\)"`; \
-             test -f $(distdir)/$$relfile || \
-               cp -p $$file $(distdir)/$$relfile; \
+             test -f "$(distdir)/$$relfile" || \
+               cp -p $$file "$(distdir)/$$relfile"; \
            else :; fi; \
          done; \
        done
 
 mostlyclean-aminfo:
-       -rm -rf check.aux check.cp check.cps check.fn check.ky check.kys check.log \
-         check.pg check.pgs check.tmp check.toc check.tp check.vr \
-         check.dvi check.pdf check.ps check.html
+       -rm -rf check.t2d check.t2p
+
+clean-aminfo:
+       -test -z "check.dvi check.pdf check.ps check.html" \
+       || rm -rf check.dvi check.pdf check.ps check.html
 
 maintainer-clean-aminfo:
        @list='$(INFO_DEPS)'; for i in $$list; do \
@@ -443,60 +601,72 @@ maintainer-clean-aminfo:
        done
 install-exampleDATA: $(example_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
-       @list='$(example_DATA)'; for p in $$list; do \
+       @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
-         $(exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
        done
 
 uninstall-exampleDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(example_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
-         rm -f "$(DESTDIR)$(exampledir)/$$f"; \
-       done
+       @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir)
 install-examplesrcDATA: $(examplesrc_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(examplesrcdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesrcdir)"
-       @list='$(examplesrc_DATA)'; for p in $$list; do \
+       @list='$(examplesrc_DATA)'; test -n "$(examplesrcdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(examplesrcdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(examplesrcdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(examplesrcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(examplesrcdir)/$$f'"; \
-         $(examplesrcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(examplesrcdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesrcdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesrcdir)" || exit $$?; \
        done
 
 uninstall-examplesrcDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(examplesrc_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(examplesrcdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(examplesrcdir)/$$f"; \
-       done
+       @list='$(examplesrc_DATA)'; test -n "$(examplesrcdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(examplesrcdir)'; $(am__uninstall_files_from_dir)
 install-exampletestsDATA: $(exampletests_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(exampletestsdir)" || $(MKDIR_P) "$(DESTDIR)$(exampletestsdir)"
-       @list='$(exampletests_DATA)'; for p in $$list; do \
+       @list='$(exampletests_DATA)'; test -n "$(exampletestsdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(exampletestsdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(exampletestsdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(exampletestsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampletestsdir)/$$f'"; \
-         $(exampletestsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampletestsdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampletestsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(exampletestsdir)" || exit $$?; \
        done
 
 uninstall-exampletestsDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(exampletests_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(exampletestsdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(exampletestsdir)/$$f"; \
-       done
-tags: TAGS
-TAGS:
+       @list='$(exampletests_DATA)'; test -n "$(exampletestsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(exampletestsdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -515,13 +685,17 @@ distdir: $(DISTFILES)
          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 "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -545,10 +719,15 @@ install-am: all-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
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -556,13 +735,15 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-aminfo clean-generic clean-libtool clean-local \
+       mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
@@ -587,12 +768,18 @@ install-dvi: install-dvi-am
 
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
-       test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
-         $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
        done
 install-exec-am:
 
@@ -600,27 +787,39 @@ install-html: install-html-am
 
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
-       test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
-       @list='$(HTMLS)'; for p in $$list; do \
+       @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         if test -d "$$d$$p"; then \
+         $(am__strip_dir) \
+         d2=$$d$$p; \
+         if test -d "$$d2"; then \
            echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
            $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
-           echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+           echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+           $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
          else \
-           echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
-           $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+           list2="$$list2 $$d2"; \
          fi; \
-       done
+       done; \
+       test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+       done; }
 install-info: install-info-am
 
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
-       test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       list='$(INFO_DEPS)'; \
+       list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+       fi; \
        for file in $$list; do \
          case $$file in \
            $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -628,18 +827,18 @@ install-info-am: $(INFO_DEPS)
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
          file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
          for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
-                       $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+                      $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
            if test -f $$ifile; then \
-             relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
-             echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
-             $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+             echo "$$ifile"; \
            else : ; fi; \
          done; \
-       done
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
        @$(POST_INSTALL)
-       @if (install-info --version && \
-            install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
+       @if $(am__can_run_installinfo); then \
+         list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
            echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
@@ -652,24 +851,34 @@ install-pdf: install-pdf-am
 
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
-       test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
-         $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
-       done
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
 install-ps: install-ps-am
 
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
-       test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \
-         $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \
-       done
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -697,11 +906,12 @@ uninstall-am: uninstall-dvi-am uninstall-exampleDATA \
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       dist-info distclean distclean-generic distclean-libtool \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exampleDATA install-examplesrcDATA \
+.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
+       clean-libtool clean-local cscopelist-am ctags-am dist-info \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exampleDATA install-examplesrcDATA \
        install-exampletestsDATA install-exec install-exec-am \
        install-html install-html-am install-info install-info-am \
        install-man install-pdf install-pdf-am install-ps \
@@ -709,12 +919,20 @@ uninstall-am: uninstall-dvi-am uninstall-exampleDATA \
        installdirs maintainer-clean maintainer-clean-aminfo \
        maintainer-clean-generic maintainer-clean-vti mostlyclean \
        mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-dvi-am uninstall-exampleDATA \
+       mostlyclean-vti pdf pdf-am ps ps-am tags-am uninstall \
+       uninstall-am uninstall-dvi-am uninstall-exampleDATA \
        uninstall-examplesrcDATA uninstall-exampletestsDATA \
        uninstall-html-am uninstall-info-am uninstall-pdf-am \
        uninstall-ps-am
 
+.PRECIOUS: Makefile
+
+
+check_html: $(srcdir)/check.texi
+       texi2html --output=check_html --top-file=index.html --split=chapter check.texi
+
+doxygen:
+       doxygen $(srcdir)/doxygen.conf
 
 $(srcdir)/check.texi: money.1-2.h.diff \
            money.1-3.c.diff \
@@ -730,48 +948,53 @@ $(srcdir)/check.texi: money.1-2.h.diff \
 # think that means there is an error
 money.1-2.h.diff: $(eg_src)/money.1.h $(eg_src)/money.2.h
        cd $(eg_root); \
-       diff -u src/money.1.h src/money.2.h > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.1.h src/money.2.h ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.1-3.c.diff: $(eg_src)/money.1.c $(eg_src)/money.3.c
        cd $(eg_root); \
-       diff -u src/money.1.c src/money.3.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.1.c src/money.3.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.3-4.c.diff: $(eg_src)/money.3.c $(eg_src)/money.4.c
        cd $(eg_root); \
-       diff -u src/money.3.c src/money.4.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.3.c src/money.4.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.4-5.c.diff: $(eg_src)/money.4.c $(eg_src)/money.5.c
        cd $(eg_root); \
-       diff -u src/money.4.c src/money.5.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.4.c src/money.5.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 money.5-6.c.diff: $(eg_src)/money.5.c $(eg_src)/money.6.c
        cd $(eg_root); \
-       diff -u src/money.5.c src/money.6.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 src/money.5.c src/money.6.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.1-2.c.diff: $(eg_tests)/check_money.1.c $(eg_tests)/check_money.2.c
        cd $(eg_root); \
-       diff -u tests/check_money.1.c tests/check_money.2.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.1.c tests/check_money.2.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.2-3.c.diff: $(eg_tests)/check_money.2.c $(eg_tests)/check_money.3.c
        cd $(eg_root); \
-       diff -u tests/check_money.2.c tests/check_money.3.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.2.c tests/check_money.3.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.3-6.c.diff: $(eg_tests)/check_money.3.c $(eg_tests)/check_money.6.c
        cd $(eg_root); \
-       diff -u tests/check_money.3.c tests/check_money.6.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.3.c tests/check_money.6.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
 
 check_money.6-7.c.diff: $(eg_tests)/check_money.6.c $(eg_tests)/check_money.7.c
        cd $(eg_root); \
-       diff -u tests/check_money.6.c tests/check_money.7.c > @abs_builddir@/$@ || test $$? -eq 1; \
+       diff -U 100 tests/check_money.6.c tests/check_money.7.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
        cd -;
+
+clean-local:
+       rm -rf check_html
+       rm -rf doxygen
+
 # 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:
index b8db723..416a6aa 100644 (file)
@@ -1,10 +1,10 @@
-This is check.info, produced by makeinfo version 4.11 from check.texi.
+This is check.info, produced by makeinfo version 6.1 from check.texi.
 
-This manual is for Check (version 0.9.8, 23 September 2009), a unit
+This manual is for Check (version 0.12.0, 20 October 2017), a unit
 testing framework for C.
 
-   Copyright (C) 2001-2009 Arien Malec, Chris Pickett, Fredrik
-Hugosson, and Robert Lemmen.
+   Copyright (C) 2001-2014 Arien Malec, Branden Archer, Chris Pickett,
+Fredrik Hugosson, and Robert Lemmen.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -12,7 +12,6 @@ Hugosson, and Robert Lemmen.
      Foundation; with no Invariant Sections, no Front-Cover texts, and
      no Back-Cover Texts.  A copy of the license is included in the
      section entitled "GNU Free Documentation License."
-
 INFO-DIR-SECTION Software development
 START-INFO-DIR-ENTRY
 * Check: (check)Introduction.
@@ -24,11 +23,11 @@ File: check.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
 Check
 *****
 
-This manual is for Check (version 0.9.8, 23 September 2009), a unit
+This manual is for Check (version 0.12.0, 20 October 2017), a unit
 testing framework for C.
 
-   Copyright (C) 2001-2009 Arien Malec, Chris Pickett, Fredrik
-Hugosson, and Robert Lemmen.
+   Copyright (C) 2001-2014 Arien Malec, Branden Archer, Chris Pickett,
+Fredrik Hugosson, and Robert Lemmen.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -39,78 +38,87 @@ Hugosson, and Robert Lemmen.
 
    Please send corrections to this manual to <check-devel AT
 lists.sourceforge.net>.  We'd prefer it if you can send a unified diff
-(`diff -u') against the `doc/check.texi' file that ships with Check,
-but something is still better than nothing if you can't manage that.
+('diff -u') against the 'doc/check.texi' file that ships with Check, but
+if that is not possible something is better than nothing.
 
 * Menu:
 
-* Introduction::
-* Unit Testing in C::
-* Tutorial::
+* Introduction::                
+* Unit Testing in C::           
+* Tutorial::                    
 * Advanced Features::
-* Conclusion and References::
-* AM_PATH_CHECK::
-* Copying This Manual::
-* Index::
+* Supported Build Systems::
+* Conclusion and References::   
+* Environment Variable Reference::
+* Copying This Manual::         
+* Index::                       
 
- --- The Detailed Node Listing ---
+ -- The Detailed Node Listing --
 
 Unit Testing in C
 
-* Other Frameworks for C::
+* Other Frameworks for C::      
 
 Tutorial: Basic Unit Testing
 
-* How to Write a Test::
-* Setting Up the Money Build::
-* Test a Little::
-* Creating a Suite::
-* SRunner Output::
+* How to Write a Test::         
+* Setting Up the Money Build Using Autotools::
+* Setting Up the Money Build Using CMake::
+* Test a Little::               
+* Creating a Suite::            
+* SRunner Output::              
 
 Advanced Features
 
-* Running Multiple Cases::
-* No Fork Mode::
-* Test Fixtures::
-* Multiple Suites in one SRunner::
-* Testing Signal Handling and Exit Values::
-* Looping Tests::
-* Test Timeouts::
-* Determining Test Coverage::
-* Test Logging::
-* Subunit Support::
+* Convenience Test Functions::  
+* Running Multiple Cases::      
+* No Fork Mode::                
+* Test Fixtures::               
+* Multiple Suites in one SRunner::  
+* Selective Running of Tests::
+* Testing Signal Handling and Exit Values::  
+* Looping Tests::               
+* Test Timeouts::               
+* Determining Test Coverage::   
+* Finding Memory Leaks::
+* Test Logging::                
+* Subunit Support::             
 
 Test Fixtures
 
-* Test Fixture Examples::
-* Checked vs Unchecked Fixtures::
+* Test Fixture Examples::       
+* Checked vs Unchecked Fixtures::  
 
 Test Logging
 
-* XML Logging::
+* XML Logging::                 
+* TAP Logging::
+
+Environment Variable Reference
 
 Copying This Manual
 
 * GNU Free Documentation License::  License for copying this manual.
 
+
 \1f
 File: check.info,  Node: Introduction,  Next: Unit Testing in C,  Prev: Top,  Up: Top
 
 1 Introduction
 **************
 
-Check is a unit testing framework for C.  It was inspired by similar
-frameworks that currently exist for most programming languages; the
-most famous example being JUnit (http://www.junit.org) for Java.  There
-is a list of unit test frameworks for multiple languages at
-`http://www.xprogramming.com/software.htm'.  Unit testing has a long
+Check is a unit testing framework for C. It was inspired by similar
+frameworks that currently exist for most programming languages; the most
+famous example being JUnit (http://www.junit.org) for Java.  There is a
+list of unit test frameworks for multiple languages at
+<http://www.xprogramming.com/software.htm>.  Unit testing has a long
 history as part of formal quality assurance methodologies, but has
-recently been associated with the lightweight methodology called
-Extreme Programming.  In that methodology, the characteristic practice
-involves interspersing unit test writing with coding ("test a little,
-code a little").  While the incremental unit test/code approach is
-indispensable to Extreme Programming, it is also applicable, and
-perhaps indispensable, outside of that methodology.
+recently been associated with the lightweight methodology called Extreme
+Programming.  In that methodology, the characteristic practice involves
+interspersing unit test writing with coding ("test a little, code a
+little").  While the incremental unit test/code approach is
+indispensable to Extreme Programming, it is also applicable, and perhaps
+indispensable, outside of that methodology.
 
    The incremental test/code approach provides three main benefits to
 the developer:
@@ -123,23 +131,23 @@ the developer:
      accordingly.
 
   3. By providing a documented level of correctness, they allow the
-     developer to refactor (see `http://www.refactoring.com')
+     developer to refactor (see <http://www.refactoring.com>)
      aggressively.
 
    That third reason is the one that turns people into unit testing
 addicts.  There is nothing so satisfying as doing a wholesale
-replacement of an implementation, and having the unit tests reassure
-you at each step of that change that all is well.  It is like the
-difference between exploring the wilderness with and without a good map
-and compass: without the proper gear, you are more likely to proceed
+replacement of an implementation, and having the unit tests reassure you
+at each step of that change that all is well.  It is like the difference
+between exploring the wilderness with and without a good map and
+compass: without the proper gear, you are more likely to proceed
 cautiously and stick to the marked trails; with it, you can take the
 most direct path to where you want to go.
 
    Look at the Check homepage for the latest information on Check:
-`http://check.sourceforge.net'.
+<http://check.sourceforge.net>.
 
    The Check project page is at:
-`http://sourceforge.net/projects/check/'.
+<http://sourceforge.net/projects/check/>.
 
 \1f
 File: check.info,  Node: Unit Testing in C,  Next: Tutorial,  Prev: Introduction,  Up: Top
@@ -147,7 +155,7 @@ File: check.info,  Node: Unit Testing in C,  Next: Tutorial,  Prev: Introduction
 2 Unit Testing in C
 *******************
 
-C unit testing
+ C unit testing
 
    The approach to unit testing frameworks used for Check originated
 with Smalltalk, which is a late binding object-oriented language
@@ -159,7 +167,7 @@ test is just as likely to trash its address space as it is to fail to
 meet its test requirements, and if the test framework sits in the same
 address space, goodbye test framework.
 
-   To solve this problem, Check uses the `fork()' system call to create
+   To solve this problem, Check uses the 'fork()' system call to create
 a new address space in which to run each unit test, and then uses
 message queues to send information on the testing process back to the
 test framework.  That way, your unit test can do all sorts of nasty
@@ -168,17 +176,18 @@ framework will happily note a unit test error, and chug along.
 
    The Check framework is also designed to play happily with common
 development environments for C programming.  The author designed Check
-around Autoconf/Automake (thus the name Check: `make check' is the
-idiom used for testing with Autoconf/Automake), and the test failure
-messages thrown up by Check use the common idiom of
-`filename:linenumber:message' used by `gcc' and family to report
-problems in source code.  With (X)Emacs, the output of Check allows one
-to quickly navigate to the location of the unit test that failed;
-presumably that also works in VI and IDEs.
+around Autoconf/Automake (thus the name Check: 'make check' is the idiom
+used for testing with Autoconf/Automake).  Note however that
+Autoconf/Automake are NOT necessary to use Check; any build system is
+sufficient.  The test failure messages thrown up by Check use the common
+idiom of 'filename:linenumber:message' used by 'gcc' and family to
+report problems in source code.  With (X)Emacs, the output of Check
+allows one to quickly navigate to the location of the unit test that
+failed; presumably that also works in VI and IDEs.
 
 * Menu:
 
-* Other Frameworks for C::
+* Other Frameworks for C::      
 
 \1f
 File: check.info,  Node: Other Frameworks for C,  Prev: Unit Testing in C,  Up: Unit Testing in C
@@ -186,17 +195,17 @@ File: check.info,  Node: Other Frameworks for C,  Prev: Unit Testing in C,  Up:
 2.1 Other Frameworks for C
 ==========================
 
-The authors know of the following additional unit testing frameworks
-for C:
+The authors know of the following additional unit testing frameworks for
+C:
 
 AceUnit
      AceUnit (Advanced C and Embedded Unit) bills itself as a
-     comfortable C code unit test framework.  It tries to mimick JUnit
-     4.x and includes reflection-like capabilities.  AceUnit can be
-     used in resource constraint environments, e.g. embedded software
-     development, and importantly it runs fine in environments where
-     you cannot include a single standard header file and cannot invoke
-     single standard C function from the ANSI / ISO C libraries.  It
+     comfortable C code unit test framework.  It tries to mimic JUnit
+     4.x and includes reflection-like capabilities.  AceUnit can be used
+     in resource constraint environments, e.g.  embedded software
+     development, and importantly it runs fine in environments where you
+     cannot include a single standard header file and cannot invoke a
+     single standard C function from the ANSI / ISO C libraries.  It
      also has a Windows port.  It does not use forks to trap signals,
      although the authors have expressed interest in adding such a
      feature.  See the AceUnit homepage
@@ -205,11 +214,11 @@ AceUnit
 GNU Autounit
      Much along the same lines as Check, including forking to run unit
      tests in a separate address space (in fact, the original author of
-     Check borrowed the idea from GNU Autounit).  GNU Autounit uses
-     GLib extensively, which means that linking and such need special
+     Check borrowed the idea from GNU Autounit).  GNU Autounit uses GLib
+     extensively, which means that linking and such need special
      options, but this may not be a big problem to you, especially if
      you are already using GTK or GLib.  See the GNU Autounit homepage
-     (http://www.recursism.com/s2004/zp/products/gnu+autounit).
+     (http://autounit.tigris.org/).
 
 cUnit
      Also uses GLib, but does not fork to protect the address space of
@@ -222,14 +231,19 @@ CUnit
      tests.  In early development.  See the CUnit homepage
      (http://cunit.sourceforge.net).
 
+CuTest
+     A simple framework with just one .c and one .h file that you drop
+     into your source tree.  See the CuTest homepage
+     (http://cutest.sourceforge.net).
+
 CppUnit
      The premier unit testing framework for C++; you can also use it to
      test C code.  It is stable, actively developed, and has a GUI
      interface.  The primary reasons not to use CppUnit for C are first
      that it is quite big, and second you have to write your tests in
      C++, which means you need a C++ compiler.  If these don't sound
-     like concerns, it is definitely worth considering, along with
-     other C++ unit testing frameworks.  See the CppUnit homepage
+     like concerns, it is definitely worth considering, along with other
+     C++ unit testing frameworks.  See the CppUnit homepage
      (http://cppunit.sourceforge.net/cppunit-wiki).
 
 embUnit
@@ -244,17 +258,17 @@ MinUnit
 
 CUnit for Mr. Ando
      A CUnit implementation that is fairly new, and apparently still in
-     early development.  See the CUnit for Mr. Ando homepage
+     early development.  See the CUnit for Mr.  Ando homepage
      (http://park.ruru.ne.jp/ando/work/CUnitForAndo/html/).
 
    This list was last updated in March 2008.  If you know of other C
 unit test frameworks, please send an email plus description to
-<check-devel AT lists.sourceforge.net> and we will add the entry to
-this list.
+<check-devel AT lists.sourceforge.net> and we will add the entry to this
+list.
 
    It is the authors' considered opinion that forking or otherwise
-trapping and reporting signals is indispensable for unit testing (but
-it probably wouldn't be hard to add that to frameworks without that
+trapping and reporting signals is indispensable for unit testing (but it
+probably wouldn't be hard to add that to frameworks without that
 feature).  Try 'em all out: adapt this tutorial to use all of the
 frameworks above, and use whichever you like.  Contribute, spread the
 word, and make one a standard.  Languages such as Java and Python are
@@ -268,9 +282,9 @@ File: check.info,  Node: Tutorial,  Next: Advanced Features,  Prev: Unit Testing
 ******************************
 
 This tutorial will use the JUnit Test Infected
-(http://junit.sourceforge.net/doc/testinfected/testing.htm) article as
-starting point.  We will be creating a library to represent money,
-`libmoney', that allows conversions between different currency types.
+(http://junit.sourceforge.net/doc/testinfected/testing.htm) article as a
+starting point.  We will be creating a library to represent money,
+'libmoney', that allows conversions between different currency types.
 The development style will be "test a little, code a little", with unit
 test writing preceding coding.  This constantly gives us insights into
 module usage, and also makes sure we are constantly thinking about how
@@ -278,51 +292,51 @@ to test our code.
 
 * Menu:
 
-* How to Write a Test::
-* Setting Up the Money Build::
-* Test a Little::
-* Creating a Suite::
-* SRunner Output::
+* How to Write a Test::         
+* Setting Up the Money Build Using Autotools::
+* Setting Up the Money Build Using CMake::
+* Test a Little::               
+* Creating a Suite::            
+* SRunner Output::              
 
 \1f
-File: check.info,  Node: How to Write a Test,  Next: Setting Up the Money Build,  Prev: Tutorial,  Up: Tutorial
+File: check.info,  Node: How to Write a Test,  Next: Setting Up the Money Build Using Autotools,  Prev: Tutorial,  Up: Tutorial
 
 3.1 How to Write a Test
 =======================
 
-Test writing using Check is very simple. The file in which the checks
-are defined must include `check.h' as so:
-
+Test writing using Check is very simple.  The file in which the checks
+are defined must include 'check.h' as so:
      #include <check.h>
 
    The basic unit test looks as follows:
-
      START_TEST (test_name)
      {
        /* unit test code */
      }
      END_TEST
 
-   The `START_TEST'/`END_TEST' pair are macros that setup basic
+   The 'START_TEST'/'END_TEST' pair are macros that setup basic
 structures to permit testing.  It is a mistake to leave off the
-`END_TEST' marker; doing so produces all sorts of strange errors when
+'END_TEST' marker; doing so produces all sorts of strange errors when
 the check is compiled.
 
 \1f
-File: check.info,  Node: Setting Up the Money Build,  Next: Test a Little,  Prev: How to Write a Test,  Up: Tutorial
-
-3.2 Setting Up the Money Build
-==============================
-
-Since we are creating a library to handle money, we will first create
-an interface in `money.h', an implementation in `money.c', and a place
-to store our unit tests, `check_money.c'.  We want to integrate these
-core files into our build system, and will need some additional
-structure. To manage everything we'll use Autoconf, Automake, and
-friends (collectively known as Autotools) for this example.  One could
-do something similar with ordinary Makefiles, but in the authors'
-opinion, it is generally easier to use Autotools than bare Makefiles,
-and they provide built-in support for running tests.
+File: check.info,  Node: Setting Up the Money Build Using Autotools,  Next: Setting Up the Money Build Using CMake,  Prev: How to Write a Test,  Up: Tutorial
+
+3.2 Setting Up the Money Build Using Autotools
+==============================================
+
+Since we are creating a library to handle money, we will first create an
+interface in 'money.h', an implementation in 'money.c', and a place to
+store our unit tests, 'check_money.c'.  We want to integrate these core
+files into our build system, and will need some additional structure.
+To manage everything we'll use Autoconf, Automake, and friends
+(collectively known as Autotools) for this example.  Note that one could
+do something similar with ordinary Makefiles, or any other build system.
+It is in the authors' opinion that it is generally easier to use
+Autotools than bare Makefiles, and they provide built-in support for
+running tests.
 
    Note that this is not the place to explain how Autotools works.  If
 you need help understanding what's going on beyond the explanations
@@ -332,15 +346,14 @@ excellent Autotools tutorial
 
    The examples in this section are part of the Check distribution; you
 don't need to spend time cutting and pasting or (worse) retyping them.
-Locate the Check documentation on your system and look in the `example'
-directory.  The standard directory for GNU/Linux distributions should
-be `/usr/share/doc/check/example'.  This directory contains the final
+Locate the Check documentation on your system and look in the 'example'
+directory.  The standard directory for GNU/Linux distributions should be
+'/usr/share/doc/check/example'.  This directory contains the final
 version reached the end of the tutorial.  If you want to follow along,
-create backups of `money.h', `money.c', and `check_money.c', and then
+create backups of 'money.h', 'money.c', and 'check_money.c', and then
 delete the originals.
 
    We set up a directory structure as follows:
-
      .
      |-- Makefile.am
      |-- README
@@ -354,30 +367,28 @@ delete the originals.
          |-- Makefile.am
          `-- check_money.c
 
-   Note that this is the output of `tree', a great directory
-visualization tool.  The top-level `Makefile.am' is simple; it merely
-tells Automake how to process subdirectories:
-
+   Note that this is the output of 'tree', a great directory
+visualization tool.  The top-level 'Makefile.am' is simple; it merely
+tells Automake how to process sub-directories:
      SUBDIRS = src . tests
 
-   Note that `tests' comes last, because the code should be testing an
-already compiled library.  `configure.ac' is standard Autoconf
+   Note that 'tests' comes last, because the code should be testing an
+already compiled library.  'configure.ac' is standard Autoconf
 boilerplate, as specified by the Autotools tutorial and as suggested by
-`autoscan'.  The `AM_PATH_CHECK()' is the only line particular to Check
-*note AM_PATH_CHECK::.
+'autoscan'.
 
-   `src/Makefile.am' builds `libmoney' as a Libtool archive, and links
-it to an application simply called `main'.  The application's behaviour
+   'src/Makefile.am' builds 'libmoney' as a Libtool archive, and links
+it to an application simply called 'main'.  The application's behavior
 is not important to this tutorial; what's important is that none of the
-functions we want to unit test appear in `main.c'; this probably means
-that the only function in `main.c' should be `main()' itself.  In order
+functions we want to unit test appear in 'main.c'; this probably means
+that the only function in 'main.c' should be 'main()' itself.  In order
 to test the whole application, unit testing is not appropriate: you
 should use a system testing tool like Autotest.  If you really want to
-test `main()' using Check, rename it to something like
-`_myproject_main()' and write a wrapper around it.
+test 'main()' using Check, rename it to something like
+'_myproject_main()' and write a wrapper around it.
 
    The primary build instructions for our unit tests are in
-`tests/Makefile.am':
+'tests/Makefile.am':
 
      ## Process this file with automake to produce Makefile.in
 
@@ -387,357 +398,651 @@ test `main()' using Check, rename it to something like
      check_money_CFLAGS = @CHECK_CFLAGS@
      check_money_LDADD = $(top_builddir)/src/libmoney.la @CHECK_LIBS@
 
-   `TESTS' tells Automake which test programs to run for `make check'.
-Similarly, the `check_' prefix in `check_PROGRAMS' actually comes from
-Automake; it says to build these programs only when `make check' is
-run.  (Recall that Automake's `check' target is the origin of Check's
-name.)  The `check_money' test is a program that we will build from
-`tests/check_money.c', linking it against both `src/libmoney.la' and
-the installed `libcheck.la' on our system.  The appropriate compiler
-and linker flags for using Check are found in `@CHECK_CFLAGS@' and
-`@CHECK_LIBS@', values defined by the `AM_PATH_CHECK' macro.
+   'TESTS' tells Automake which test programs to run for 'make check'.
+Similarly, the 'check_' prefix in 'check_PROGRAMS' actually comes from
+Automake; it says to build these programs only when 'make check' is run.
+(Recall that Automake's 'check' target is the origin of Check's name.)
+The 'check_money' test is a program that we will build from
+'tests/check_money.c', linking it against both 'src/libmoney.la' and the
+installed 'libcheck.la' on our system.  The appropriate compiler and
+linker flags for using Check are found in '@CHECK_CFLAGS@' and
+'@CHECK_LIBS@', values defined by the 'AM_PATH_CHECK' macro.
 
    Now that all this infrastructure is out of the way, we can get on
-with development.  `src/money.h' should only contain standard C header
+with development.  'src/money.h' should only contain standard C header
 boilerplate:
 
+     /*
+      * Check: a unit test framework for C
+      * Copyright (C) 2001, 2002 Arien Malec
+      *
+      * This library is free software; you can redistribute it and/or
+      * modify it under the terms of the GNU Lesser General Public
+      * License as published by the Free Software Foundation; either
+      * version 2.1 of the License, or (at your option) any later version.
+      *
+      * This library 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
+      * Lesser General Public License for more details.
+      *
+      * You should have received a copy of the GNU Lesser General Public
+      * License along with this library; if not, write to the
+      * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+      * MA 02110-1301, USA.
+      */
+
      #ifndef MONEY_H
      #define MONEY_H
 
      #endif /* MONEY_H */
 
-   `src/money.c' should be empty, and `tests/check_money.c' should only
-contain an empty `main()' function:
-
-     int
-     main (void)
+   'src/money.c' should be empty, and 'tests/check_money.c' should only
+contain an empty 'main()' function:
+
+     /*
+      * Check: a unit test framework for C
+      * Copyright (C) 2001, 2002 Arien Malec
+      *
+      * This library is free software; you can redistribute it and/or
+      * modify it under the terms of the GNU Lesser General Public
+      * License as published by the Free Software Foundation; either
+      * version 2.1 of the License, or (at your option) any later version.
+      *
+      * This library 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
+      * Lesser General Public License for more details.
+      *
+      * You should have received a copy of the GNU Lesser General Public
+      * License along with this library; if not, write to the
+      * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+      * MA 02110-1301, USA.
+      */
+
+     int main(void)
      {
-       return 0;
+         return 0;
      }
 
-   Create the GNU Build System for the project and then build `main'
-and `libmoney.la' as follows:
-
+   Create the GNU Build System for the project and then build 'main' and
+'libmoney.la' as follows:
      $ autoreconf --install
      $ ./configure
      $ make
 
-   (`autoreconf' determines which commands are needed in order for
-`configure' to be created or brought up to date.  Previously one would
-use a script called `autogen.sh' or `bootstrap', but that practice is
+   ('autoreconf' determines which commands are needed in order for
+'configure' to be created or brought up to date.  Previously one would
+use a script called 'autogen.sh' or 'bootstrap', but that practice is
 unnecessary now.)
 
-   Now build and run the `check_money' test with `make check'.  If all
-goes well, `make' should report that our tests passed.  No surprise,
-because there aren't any tests to fail.  If you have problems, make
-sure to see *note AM_PATH_CHECK::.
+   Now build and run the 'check_money' test with 'make check'.  If all
+goes well, 'make' should report that our tests passed.  No surprise,
+because there aren't any tests to fail.  If you have problems, make sure
+to see *note Supported Build Systems::.
 
-   This was tested on the i386 "testing" distribution of Debian
-GNU/Linux (etch) in March 2006, using Autoconf 2.59, Automake 1.9.6,
-and Libtool 1.5.22.  Please report any problems to <check-devel AT
+   This was tested on the isadora distribution of Linux Mint GNU/Linux
+in November 2012, using Autoconf 2.65, Automake 1.11.1, and Libtool
+2.2.6b.  Please report any problems to <check-devel AT
 lists.sourceforge.net>.
 
 \1f
-File: check.info,  Node: Test a Little,  Next: Creating a Suite,  Prev: Setting Up the Money Build,  Up: Tutorial
+File: check.info,  Node: Setting Up the Money Build Using CMake,  Next: Test a Little,  Prev: Setting Up the Money Build Using Autotools,  Up: Tutorial
+
+3.3 Setting Up the Money Build Using CMake
+==========================================
+
+Since we are creating a library to handle money, we will first create an
+interface in 'money.h', an implementation in 'money.c', and a place to
+store our unit tests, 'check_money.c'.  We want to integrate these core
+files into our build system, and will need some additional structure.
+To manage everything we'll use CMake for this example.  Note that one
+could do something similar with ordinary Makefiles, or any other build
+system.  It is in the authors' opinion that it is generally easier to
+use CMake than bare Makefiles, and they provide built-in support for
+running tests.
+
+   Note that this is not the place to explain how CMake works.  If you
+need help understanding what's going on beyond the explanations here,
+the best place to start is probably the CMake project's homepage
+(http://www.cmake.org).
+
+   The examples in this section are part of the Check distribution; you
+don't need to spend time cutting and pasting or (worse) retyping them.
+Locate the Check documentation on your system and look in the 'example'
+directory, or look in the Check source.  If on a GNU/Linux system the
+standard directory should be '/usr/share/doc/check/example'.  This
+directory contains the final version reached the end of the tutorial.
+If you want to follow along, create backups of 'money.h', 'money.c', and
+'check_money.c', and then delete the originals.
 
-3.3 Test a Little, Code a Little
+   We set up a directory structure as follows:
+     .
+     |-- Makefile.am
+     |-- README
+     |-- CMakeLists.txt
+     |-- cmake
+     |   |-- config.h.in
+     |   |-- FindCheck.cmake
+     |-- src
+     |   |-- CMakeLists.txt
+     |   |-- main.c
+     |   |-- money.c
+     |   `-- money.h
+     `-- tests
+         |-- CMakeLists.txt
+         `-- check_money.c
+
+   The top-level 'CMakeLists.txt' contains the configuration checks for
+available libraries and types, and also defines sub-directories to
+process.  The 'cmake/FindCheck.cmake' file contains instructions for
+locating Check on the system and setting up the build to use it.  If the
+system does not have pkg-config installed, 'cmake/FindCheck.cmake' may
+not be able to locate Check successfully.  In this case, the install
+directory of Check must be located manually, and the following line
+added to 'tests/CMakeLists.txt' (assuming Check was installed under
+C:\\Program Files\\check:
+
+set(CHECK_INSTALL_DIR "C:/Program Files/check")
+
+   Note that 'tests' comes last, because the code should be testing an
+already compiled library.
+
+   'src/CMakeLists.txt' builds 'libmoney' as an archive, and links it to
+an application simply called 'main'.  The application's behavior is not
+important to this tutorial; what's important is that none of the
+functions we want to unit test appear in 'main.c'; this probably means
+that the only function in 'main.c' should be 'main()' itself.  In order
+to test the whole application, unit testing is not appropriate: you
+should use a system testing tool like Autotest.  If you really want to
+test 'main()' using Check, rename it to something like
+'_myproject_main()' and write a wrapper around it.
+
+   Now that all this infrastructure is out of the way, we can get on
+with development.  'src/money.h' should only contain standard C header
+boilerplate:
+
+     /*
+      * Check: a unit test framework for C
+      * Copyright (C) 2001, 2002 Arien Malec
+      *
+      * This library is free software; you can redistribute it and/or
+      * modify it under the terms of the GNU Lesser General Public
+      * License as published by the Free Software Foundation; either
+      * version 2.1 of the License, or (at your option) any later version.
+      *
+      * This library 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
+      * Lesser General Public License for more details.
+      *
+      * You should have received a copy of the GNU Lesser General Public
+      * License along with this library; if not, write to the
+      * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+      * MA 02110-1301, USA.
+      */
+
+     #ifndef MONEY_H
+     #define MONEY_H
+
+     #endif /* MONEY_H */
+
+   'src/money.c' should be empty, and 'tests/check_money.c' should only
+contain an empty 'main()' function:
+
+     /*
+      * Check: a unit test framework for C
+      * Copyright (C) 2001, 2002 Arien Malec
+      *
+      * This library is free software; you can redistribute it and/or
+      * modify it under the terms of the GNU Lesser General Public
+      * License as published by the Free Software Foundation; either
+      * version 2.1 of the License, or (at your option) any later version.
+      *
+      * This library 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
+      * Lesser General Public License for more details.
+      *
+      * You should have received a copy of the GNU Lesser General Public
+      * License along with this library; if not, write to the
+      * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+      * MA 02110-1301, USA.
+      */
+
+     int main(void)
+     {
+         return 0;
+     }
+
+   Create the CMake Build System for the project and then build 'main'
+and 'libmoney.la' as follows for Unix-compatible systems:
+     $ cmake .
+     $ make
+
+   and for MSVC on Windows:
+     $ cmake -G "NMake Makefiles" .
+     $ nmake
+
+   Now build and run the 'check_money' test, with either 'make test' on
+a Unix-compatible system or 'nmake test' if on Windows using MSVC. If
+all goes well, the command should report that our tests passed.  No
+surprise, because there aren't any tests to fail.
+
+   This was tested on Windows 7 using CMake 2.8.12.1 and MSVC
+16.00.30319.01/ Visual Studios 10 in February 2014.  Please report any
+problems to <check-devel AT lists.sourceforge.net>.
+
+\1f
+File: check.info,  Node: Test a Little,  Next: Creating a Suite,  Prev: Setting Up the Money Build Using CMake,  Up: Tutorial
+
+3.4 Test a Little, Code a Little
 ================================
 
 The Test Infected
 (http://junit.sourceforge.net/doc/testinfected/testing.htm) article
-starts out with a `Money' class, and so will we.  Of course, we can't
-do classes with C, but we don't really need to.  The Test Infected
-approach to writing code says that we should write the unit test
-_before_ we write the code, and in this case, we will be even more
-dogmatic and doctrinaire than the authors of Test Infected (who clearly
-don't really get this stuff, only being some of the originators of the
-Patterns approach to software development and OO design).
-
-   Here are the changes to `check_money.c' for our first unit test:
-
-     --- tests/check_money.1.c 2009-09-23 20:44:00.000000000 +1000
-     +++ tests/check_money.2.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -1,3 +1,18 @@
+starts out with a 'Money' class, and so will we.  Of course, we can't do
+classes with C, but we don't really need to.  The Test Infected approach
+to writing code says that we should write the unit test _before_ we
+write the code, and in this case, we will be even more dogmatic and
+doctrinaire than the authors of Test Infected (who clearly don't really
+get this stuff, only being some of the originators of the Patterns
+approach to software development and OO design).
+
+   Here are the changes to 'check_money.c' for our first unit test:
+
+     --- tests/check_money.1.c
+     +++ tests/check_money.2.c
+     @@ -1,24 +1,38 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
+
      +#include <check.h>
      +#include "../src/money.h"
      +
-     +START_TEST (test_money_create)
+     +START_TEST(test_money_create)
      +{
-     +  Money *m;
-     +  m = money_create (5, "USD");
-     +  fail_unless (money_amount (m) == 5,
-     +        "Amount not set correctly on creation");
-     +  fail_unless (strcmp (money_currency (m), "USD") == 0,
-     +        "Currency not set correctly on creation");
-     +  money_free (m);
+     +    Money *m;
+     +
+     +    m = money_create(5, "USD");
+     +    ck_assert_int_eq(money_amount(m), 5);
+     +    ck_assert_str_eq(money_currency(m), "USD");
+     +    money_free(m);
      +}
      +END_TEST
      +
-      int
-      main (void)
+      int main(void)
       {
+          return 0;
+      }
 
    A unit test should just chug along and complete.  If it exits early,
-or is signaled, it will fail with a generic error message.  (Note: it
-is conceivable that you expect an early exit, or a signal and there is
+or is signaled, it will fail with a generic error message.  (Note: it is
+conceivable that you expect an early exit, or a signal and there is
 functionality in Check to specifically assert that we should expect a
-signal or an early exit.)  If we want to get some information about
-what failed, we need to use the `fail_unless()' function.  The function
-(actually a macro) takes a first Boolean argument, and an error message
-to send if the condition is not true.
+signal or an early exit.)  If we want to get some information about what
+failed, we need to use some calls that will point out a failure.  Two
+such calls are 'ck_assert_int_eq' (used to determine if two integers are
+equal) and 'ck_assert_str_eq' (used to determine if two null terminated
+strings are equal).  Both of these functions (actually macros) will
+signal an error if their arguments are not equal.
+
+   An alternative to using 'ck_assert_int_eq' and 'ck_assert_str_eq' is
+to write the expression under test directly using 'ck_assert'.  This
+takes one Boolean argument which must be True for the check to pass.
+The second test could be rewritten as follows:
+     ck_assert(strcmp (money_currency (m), "USD") == 0);
+
+   'ck_assert' will find and report failures, but will not print any
+user supplied message in the unit test result.  To print a user defined
+message along with any failures found, use 'ck_assert_msg'.  The first
+argument is a Boolean argument.  The remaining arguments support
+'varargs' and accept 'printf'-style format strings and arguments.  This
+is especially useful while debugging.  For example, the second test
+could be rewritten as:
+     ck_assert_msg(strcmp (money_currency (m), "USD") == 0,
+              "Was expecting a currency of USD, but found %s", money_currency (m));
 
    If the Boolean argument is too complicated to elegantly express
-within `fail_unless()', there is an alternate function `fail()' that
-unconditionally fails.  The second test inside `test_money_create'
-above could be rewritten as follows:
-
+within 'ck_assert()', there are the alternate functions 'ck_abort()' and
+'ck_abort_msg()' that unconditionally fail.  The second test inside
+'test_money_create' above could be rewritten as follows:
      if (strcmp (money_currency (m), "USD") != 0)
        {
-         fail ("Currency not set correctly on creation");
+         ck_abort_msg ("Currency not set correctly on creation");
        }
 
-   There is also a `fail_if()' function, which is the inverse of
-`fail_unless()'.  Using it, the above test then looks like this:
-
-     fail_if (strcmp (money_currency (m), "USD") != 0,
-              "Currency not set correctly on creation");
-
-   For your convenience all fail functions also accepts NULL as the msg
-argument and substitutes a suitable message for you.  So you could also
-write a test as follows:
-
-     fail_unless (money_amount (m) == 5, NULL);
+   For your convenience ck_assert, which does not accept a user supplied
+message, substitutes a suitable message for you.  (This is also
+equivalent to passing a NULL message to ck_assert_msg).  So you could
+also write a test as follows:
+     ck_assert (money_amount (m) == 5);
 
    This is equivalent to:
+     ck_assert_msg (money_amount (m) == 5, NULL);
+
+   which will print the file, line number, and the message '"Assertion
+'money_amount (m) == 5' failed"' if 'money_amount (m) != 5'.
+
+   When we try to compile and run the test suite now using 'make check',
+we get a whole host of compilation errors.  It may seem a bit strange to
+deliberately write code that won't compile, but notice what we are
+doing: in creating the unit test, we are also defining requirements for
+the money interface.  Compilation errors are, in a way, unit test
+failures of their own, telling us that the implementation does not match
+the specification.  If all we do is edit the sources so that the unit
+test compiles, we are actually making progress, guided by the unit
+tests, so that's what we will now do.
+
+   We will patch our header 'money.h' as follows:
+
+     --- src/money.1.h
+     +++ src/money.2.h
+     @@ -1,24 +1,31 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
 
-     fail_unless (money_amount (m) == 5,
-                  "Assertion 'money_amount (m) == 5' failed");
-
-   All fail functions also support `varargs' and accept `printf'-style
-format strings and arguments.  This is especially useful while
-debugging.  With `printf'-style formatting the message could look like
-this:
-
-     fail_unless(money_amount (m) == 5,
-                 "Amount was %d, instead of 5", money_amount (m));
-
-   When we try to compile and run the test suite now using `make
-check', we get a whole host of compilation errors.  It may seem a bit
-strange to deliberately write code that won't compile, but notice what
-we are doing: in creating the unit test, we are also defining
-requirements for the money interface.  Compilation errors are, in a
-way, unit test failures of their own, telling us that the
-implementation does not match the specification.  If all we do is edit
-the sources so that the unit test compiles, we are actually making
-progress, guided by the unit tests, so that's what we will now do.
-
-   We will patch our header `money.h' as follows:
-
-     --- src/money.1.h 2009-09-23 20:44:00.000000000 +1000
-     +++ src/money.2.h 2009-09-23 20:44:00.000000000 +1000
-     @@ -1,4 +1,11 @@
       #ifndef MONEY_H
       #define MONEY_H
 
      +typedef struct Money Money;
      +
-     +Money *money_create (int amount, char *currency);
-     +int money_amount (Money * m);
-     +char *money_currency (Money * m);
-     +void money_free (Money * m);
+     +Money *money_create(int amount, char *currency);
+     +int money_amount(Money * m);
+     +char *money_currency(Money * m);
+     +void money_free(Money * m);
      +
       #endif /* MONEY_H */
 
    Our code compiles now, and again passes all of the tests.  However,
-once we try to _use_ the functions in `libmoney' in the `main()' of
-`check_money', we'll run into more problems, as they haven't actually
+once we try to _use_ the functions in 'libmoney' in the 'main()' of
+'check_money', we'll run into more problems, as they haven't actually
 been implemented yet.
 
 \1f
 File: check.info,  Node: Creating a Suite,  Next: SRunner Output,  Prev: Test a Little,  Up: Tutorial
 
-3.4 Creating a Suite
+3.5 Creating a Suite
 ====================
 
 To run unit tests with Check, we must create some test cases, aggregate
-them into a suite, and run them with a suite runner. That's a bit of
+them into a suite, and run them with a suite runner.  That's a bit of
 overhead, but it is mostly one-off.  Here's a diff for the new version
-of `check_money.c'.  Note that we include stdlib.h to get the
-definitions of `EXIT_SUCCESS' and `EXIT_FAILURE'.
+of 'check_money.c'.  Note that we include stdlib.h to get the
+definitions of 'EXIT_SUCCESS' and 'EXIT_FAILURE'.
+
+     --- tests/check_money.2.c
+     +++ tests/check_money.3.c
+     @@ -1,38 +1,65 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
 
-     --- tests/check_money.2.c 2009-09-23 20:44:00.000000000 +1000
-     +++ tests/check_money.3.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -1,3 +1,4 @@
      +#include <stdlib.h>
       #include <check.h>
       #include "../src/money.h"
 
-     @@ -13,8 +14,27 @@
+      START_TEST(test_money_create)
+      {
+          Money *m;
+
+          m = money_create(5, "USD");
+          ck_assert_int_eq(money_amount(m), 5);
+          ck_assert_str_eq(money_currency(m), "USD");
+          money_free(m);
       }
       END_TEST
 
-     +Suite *
-     +money_suite (void)
+     +Suite * money_suite(void)
      +{
-     +  Suite *s = suite_create ("Money");
+     +    Suite *s;
+     +    TCase *tc_core;
+     +
+     +    s = suite_create("Money");
+     +
+     +    /* Core test case */
+     +    tc_core = tcase_create("Core");
      +
-     +  /* Core test case */
-     +  TCase *tc_core = tcase_create ("Core");
-     +  tcase_add_test (tc_core, test_money_create);
-     +  suite_add_tcase (s, tc_core);
+     +    tcase_add_test(tc_core, test_money_create);
+     +    suite_add_tcase(s, tc_core);
      +
-     +  return s;
+     +    return s;
      +}
      +
-      int
-      main (void)
+      int main(void)
       {
-     -  return 0;
-     +  int number_failed;
-     +  Suite *s = money_suite ();
-     +  SRunner *sr = srunner_create (s);
-     +  srunner_run_all (sr, CK_NORMAL);
-     +  number_failed = srunner_ntests_failed (sr);
-     +  srunner_free (sr);
-     +  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+     -    return 0;
+     +    int number_failed;
+     +    Suite *s;
+     +    SRunner *sr;
+     +
+     +    s = money_suite();
+     +    sr = srunner_create(s);
+     +
+     +    srunner_run_all(sr, CK_NORMAL);
+     +    number_failed = srunner_ntests_failed(sr);
+     +    srunner_free(sr);
+     +    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
       }
 
-   Most of the `money_suite()' code should be self-explanatory.  We are
+   Most of the 'money_suite()' code should be self-explanatory.  We are
 creating a suite, creating a test case, adding the test case to the
 suite, and adding the unit test we created above to the test case.  Why
 separate this off into a separate function, rather than inline it in
-`main()'?  Because any new tests will get added in `money_suite()', but
-nothing will need to change in `main()' for the rest of this example,
-so main will stay relatively clean and simple.
+'main()'?  Because any new tests will get added in 'money_suite()', but
+nothing will need to change in 'main()' for the rest of this example, so
+main will stay relatively clean and simple.
 
    Unit tests are internally defined as static functions.  This means
 that the code to add unit tests to test cases must be in the same
 compilation unit as the unit tests themselves.  This provides another
-reason to put the creation of the test suite in a separate function:
-you may later want to keep one source file per suite; defining a
-uniquely named suite creation function allows you later to define a
-header file giving prototypes for all the suite creation functions, and
-encapsulate the details of where and how unit tests are defined behind
-those functions.  See the test program defined for Check itself for an
-example of this strategy.
-
-   The code in `main()' bears some explanation.  We are creating a
-suite runner object of type `SRunner' from the `Suite' we created in
-`money_suite()'.  We then run the suite, using the `CK_NORMAL' flag to
-specify that we should print a summary of the run, and list any
-failures that may have occurred.  We capture the number of failures
-that occurred during the run, and use that to decide how to return.
-The `check' target created by Automake uses the return value to decide
-whether the tests passed or failed.
-
-   Now that the tests are actually being run by `check_money', we
-encounter linker errors again we try out `make check'.  Try it for
-yourself and see.  The reason is that the `money.c' implementation of
-the `money.h' interface hasn't been created yet.  Let's go with the
+reason to put the creation of the test suite in a separate function: you
+may later want to keep one source file per suite; defining a uniquely
+named suite creation function allows you later to define a header file
+giving prototypes for all the suite creation functions, and encapsulate
+the details of where and how unit tests are defined behind those
+functions.  See the test program defined for Check itself for an example
+of this strategy.
+
+   The code in 'main()' bears some explanation.  We are creating a suite
+runner object of type 'SRunner' from the 'Suite' we created in
+'money_suite()'.  We then run the suite, using the 'CK_NORMAL' flag to
+specify that we should print a summary of the run, and list any failures
+that may have occurred.  We capture the number of failures that occurred
+during the run, and use that to decide how to return.  The 'check'
+target created by Automake uses the return value to decide whether the
+tests passed or failed.
+
+   Now that the tests are actually being run by 'check_money', we
+encounter linker errors again we try out 'make check'.  Try it for
+yourself and see.  The reason is that the 'money.c' implementation of
+the 'money.h' interface hasn't been created yet.  Let's go with the
 fastest solution possible and implement stubs for each of the functions
-in `money.c':
+in 'money.c'.  Here is the diff:
+
+     --- src/money.1.c
+     +++ src/money.3.c
+     @@ -1,20 +1,42 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
 
-     --- src/money.1.c 2009-09-23 20:44:00.000000000 +1000
-     +++ src/money.3.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -0,0 +1,26 @@
      +#include <stdlib.h>
      +#include "money.h"
      +
-     +Money *
-     +money_create (int amount, char *currency)
+     +Money *money_create(int amount, char *currency)
      +{
-     +  return NULL;
+     +    return NULL;
      +}
      +
-     +int
-     +money_amount (Money * m)
+     +int money_amount(Money * m)
      +{
-     +  return 0;
+     +    return 0;
      +}
      +
-     +char *
-     +money_currency (Money * m)
+     +char *money_currency(Money * m)
      +{
-     +  return NULL;
+     +    return NULL;
      +}
      +
-     +void
-     +money_free (Money * m)
+     +void money_free(Money * m)
      +{
-     +  return;
+     +    return;
      +}
 
-   Note that we `#include <stdlib.h>' to get the definition of `NULL'.
-Now, the code compiles and links when we run `make check', but our unit
+   Note that we '#include <stdlib.h>' to get the definition of 'NULL'.
+Now, the code compiles and links when we run 'make check', but our unit
 test fails.  Still, this is progress, and we can focus on making the
 test pass.
 
 \1f
 File: check.info,  Node: SRunner Output,  Prev: Creating a Suite,  Up: Tutorial
 
-3.5 SRunner Output
+3.6 SRunner Output
 ==================
 
-The function to run tests in an `SRunner' is defined as follows:
-
+The functions to run tests in an 'SRunner' are defined as follows:
      void srunner_run_all (SRunner * sr, enum print_output print_mode);
 
-   This function does two things:
+     void srunner_run (SRunner *sr, const char *sname, const char *tcname,
+                       enum print_output print_mode);
+
+   Those functions do two things:
+
+  1. They run all of the unit tests for the selected test cases defined
+     for the selected suites in the SRunner, and collect the results in
+     the SRunner.  The determination of the selected test cases and
+     suites depends on the specific function used.
 
-  1. It runs all of the unit tests for all of the test cases defined
-     for all of the suites in the SRunner, and collects the results in
-     the SRunner
+     'srunner_run_all' will run all the defined test cases of all
+     defined suites except if the environment variables 'CK_RUN_CASE' or
+     'CK_RUN_SUITE' are defined.  If defined, those variables shall
+     contain the name of a test suite or a test case, defining in that
+     way the selected suite/test case.
 
-  2. It prints the results according to the `print_mode' specified.
+     'srunner_run' will run the suite/case selected by the 'sname' and
+     'tcname' parameters.  A value of 'NULL' in some of those parameters
+     means "any suite/case".
+
+  2. They print the results according to the 'print_mode' specified.
 
    For SRunners that have already been run, there is also a separate
 printing function defined as follows:
-
      void srunner_print (SRunner *sr, enum print_output print_mode);
 
-   The enumeration values of `print_output' defined in Check that
-parameter `print_mode' can assume are as follows:
+   The enumeration values of 'print_output' defined in Check that
+parameter 'print_mode' can assume are as follows:
 
-`CK_SILENT'
-     Specifies that no output is to be generated. If you use this flag,
+'CK_SILENT'
+     Specifies that no output is to be generated.  If you use this flag,
      you either need to programmatically examine the SRunner object,
      print separately, or use test logging (*note Test Logging::.)
 
-`CK_MINIMAL'
+'CK_MINIMAL'
      Only a summary of the test run will be printed (number run, passed,
      failed, errors).
 
-`CK_NORMAL'
+'CK_NORMAL'
      Prints the summary of the run, and prints one message per failed
      test.
 
-`CK_VERBOSE'
+'CK_VERBOSE'
      Prints the summary, and one message per test (passed or failed)
 
-`CK_ENV'
-     Gets the print mode from the environment variable `CK_VERBOSITY',
-     which can have the values "silent", "minimal", "normal",
-     "verbose". If the variable is not found or the value is not
-     recognized, the print mode is set to `CK_NORMAL'.
+'CK_ENV'
+     Gets the print mode from the environment variable 'CK_VERBOSITY',
+     which can have the values "silent", "minimal", "normal", "verbose".
+     If the variable is not found or the value is not recognized, the
+     print mode is set to 'CK_NORMAL'.
 
-`CK_SUBUNIT'
+'CK_SUBUNIT'
      Prints running progress through the subunit
-     (https://launchpad.net/subunit/) test runner protocol. See
+     (https://launchpad.net/subunit/) test runner protocol.  See
      'subunit support' under the Advanced Features section for more
      information.
 
-   With the `CK_NORMAL' flag specified in our `main()', let's rerun
-make check now. As before, we get the following satisfying output:
-
+   With the 'CK_NORMAL' flag specified in our 'main()', let's rerun
+'make check' now.  The output from the unit test is as follows:
      Running suite(s): Money
      0%: Checks: 1, Failures: 1, Errors: 0
-     check_money.c:10:F:Core:test_money_create: Amount not set correctly on
-     creation
+     check_money.c:9:F:Core:test_money_create:0: Assertion 'money_amount (m)==5' failed:
+     money_amount (m)==0, 5==5
      FAIL: check_money
-     ==================================================
-     1 of 1 tests failed
-     Please report to check-devel@lists.sourceforge.net
-     ==================================================
+     =====================================================
+     1 of 1 test failed
+     Please report to check-devel AT lists.sourceforge.net
+     =====================================================
+
+   Note that the output from 'make check' prior to Automake 1.13 will be
+the output of the unit test program.  Starting with 1.13 Automake will
+run all unit test programs concurrently and store the output in log
+files.  The output listed above should be present in a log file.
 
    The first number in the summary line tells us that 0% of our tests
 passed, and the rest of the line tells us that there was one check in
@@ -746,230 +1051,684 @@ tells us exactly where that failure occurred, and what kind of failure
 it was (P for pass, F for failure, E for error).
 
    After that we have some higher level output generated by Automake:
-the `check_money' program failed, and the bug-report address given in
-`configure.ac' is printed.
+the 'check_money' program failed, and the bug-report address given in
+'configure.ac' is printed.
+
+   Let's implement the 'money_amount' function, so that it will pass its
+tests.  We first have to create a Money structure to hold the amount,
+and then implement the function to return the correct amount:
+
+     --- src/money.3.c
+     +++ src/money.4.c
+     @@ -1,42 +1,47 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
 
-   Let's implement the `money_amount' function, so that it will pass
-its tests.  We first have to create a Money structure to hold the
-amount, and then implement the function to return the correct amount:
-
-     --- src/money.3.c 2009-09-23 20:44:00.000000000 +1000
-     +++ src/money.4.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -1,6 +1,11 @@
       #include <stdlib.h>
       #include "money.h"
 
      +struct Money
      +{
-     +  int amount;
+     +    int amount;
      +};
      +
-      Money *
-      money_create (int amount, char *currency)
+      Money *money_create(int amount, char *currency)
+      {
+          return NULL;
+      }
+
+      int money_amount(Money * m)
       {
-     @@ -10,7 +15,7 @@
-      int
-      money_amount (Money * m)
+     -    return 0;
+     +    return m->amount;
+      }
+
+      char *money_currency(Money * m)
       {
-     -  return 0;
-     +  return m->amount;
+          return NULL;
       }
 
-      char *
+      void money_free(Money * m)
+      {
+          return;
+      }
 
    We will now rerun make check and... what's this?  The output is now
 as follows:
-
      Running suite(s): Money
      0%: Checks: 1, Failures: 0, Errors: 1
-     check_money.c:5:E:Core:test_money_create: (after this point) Received
-     signal 11 (Segmentation fault)
+     check_money.c:5:E:Core:test_money_create:0: (after this point)
+     Received signal 11 (Segmentation fault)
 
    What does this mean?  Note that we now have an error, rather than a
 failure.  This means that our unit test either exited early, or was
 signaled.  Next note that the failure message says "after this point";
-This means that somewhere after the point noted (`check_money.c', line
+This means that somewhere after the point noted ('check_money.c', line
 5) there was a problem: signal 11 (a.k.a.  segmentation fault).  The
 last point reached is set on entry to the unit test, and after every
-call to `fail_unless()', `fail()', or the special function
-`mark_point()'.  For example, if we wrote some test code as follows:
-
+call to the 'ck_assert()', 'ck_abort()', 'ck_assert_int_*()',
+'ck_assert_str_*()', or the special function 'mark_point()'.  For
+example, if we wrote some test code as follows:
      stuff_that_works ();
      mark_point ();
      stuff_that_dies ();
 
-   then the point returned will be that marked by `mark_point()'.
+   then the point returned will be that marked by 'mark_point()'.
 
    The reason our test failed so horribly is that we haven't implemented
-`money_create()' to create any `Money'.  We'll go ahead and implement
-that, the symmetric `money_free()', and `money_currency()' too, in
-order to make our unit test pass again:
+'money_create()' to create any 'Money'.  We'll go ahead and implement
+that, the symmetric 'money_free()', and 'money_currency()' too, in order
+to make our unit test pass again, here is a diff:
+
+     --- src/money.4.c
+     +++ src/money.5.c
+     @@ -1,47 +1,58 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
+
+      #include <stdlib.h>
+      #include "money.h"
 
-     --- src/money.4.c 2009-09-23 20:44:00.000000000 +1000
-     +++ src/money.5.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -4,12 +4,21 @@
       struct Money
       {
-        int amount;
-     +  char *currency;
+          int amount;
+     +    char *currency;
       };
 
-      Money *
-      money_create (int amount, char *currency)
+      Money *money_create(int amount, char *currency)
       {
-     -  return NULL;
-     +  Money *m = malloc (sizeof (Money));
-     +  if (m == NULL)
+     -    return NULL;
+     +    Money *m = malloc(sizeof(Money));
+     +
+     +    if (m == NULL)
      +    {
-     +      return NULL;
+     +        return NULL;
      +    }
      +
-     +  m->amount = amount;
-     +  m->currency = currency;
-     +  return m;
+     +    m->amount = amount;
+     +    m->currency = currency;
+     +    return m;
+      }
+
+      int money_amount(Money * m)
+      {
+          return m->amount;
       }
 
-      int
-     @@ -21,11 +30,12 @@
-      char *
-      money_currency (Money * m)
+      char *money_currency(Money * m)
       {
-     -  return NULL;
-     +  return m->currency;
+     -    return NULL;
+     +    return m->currency;
       }
 
-      void
-      money_free (Money * m)
+      void money_free(Money * m)
       {
-     +  free (m);
-        return;
+     +    free(m);
+          return;
       }
 
 \1f
-File: check.info,  Node: Advanced Features,  Next: Conclusion and References,  Prev: Tutorial,  Up: Top
+File: check.info,  Node: Advanced Features,  Next: Supported Build Systems,  Prev: Tutorial,  Up: Top
 
 4 Advanced Features
 *******************
 
 What you've seen so far is all you need for basic unit testing.  The
 features described in this section are additions to Check that make it
-easier for the developer to write, run, and analyse tests.
+easier for the developer to write, run, and analyze tests.
 
 * Menu:
 
-* Running Multiple Cases::
-* No Fork Mode::
-* Test Fixtures::
-* Multiple Suites in one SRunner::
-* Testing Signal Handling and Exit Values::
-* Looping Tests::
-* Test Timeouts::
-* Determining Test Coverage::
-* Test Logging::
-* Subunit Support::
+* Convenience Test Functions::  
+* Running Multiple Cases::      
+* No Fork Mode::                
+* Test Fixtures::               
+* Multiple Suites in one SRunner::  
+* Selective Running of Tests::
+* Selecting Tests by Suite or Test Case::
+* Selecting Tests Based on Arbitrary Tags::
+* Testing Signal Handling and Exit Values::  
+* Looping Tests::               
+* Test Timeouts::               
+* Determining Test Coverage::   
+* Finding Memory Leaks::
+* Test Logging::                
+* Subunit Support::             
 
 \1f
-File: check.info,  Node: Running Multiple Cases,  Next: No Fork Mode,  Prev: Advanced Features,  Up: Advanced Features
+File: check.info,  Node: Convenience Test Functions,  Next: Running Multiple Cases,  Prev: Advanced Features,  Up: Advanced Features
+
+4.1 Convenience Test Functions
+==============================
+
+Using the 'ck_assert' function for all tests can lead to lot of
+repetitive code that is hard to read.  For your convenience Check
+provides a set of functions (actually macros) for testing often used
+conditions.
+
+   The typical size of an assertion message is less than 80 bytes.
+However, some of the functions listed below can generate very large
+messages (up to 4GB allocations were seen in the wild).  To prevent
+this, a limit is placed on the assertion message size.  This limit is 4K
+bytes by default.  It can be modified by setting the 'CK_MAX_MSG_SIZE'
+environment variable, or, if it is not set, by invoking the
+'check_set_max_msg_size()' function.  If used, this function must be
+called, once, before the first assertion.
+
+'ck_abort'
+     Unconditionally fails test with default message.
+
+'ck_abort_msg'
+     Unconditionally fails test with user supplied message.
+
+'ck_assert'
+     Fails test if supplied condition evaluates to false.
+
+'ck_assert_msg'
+     Fails test if supplied condition evaluates to false and displays
+     user provided message.
+
+'ck_assert_int_eq'
+'ck_assert_int_ne'
+'ck_assert_int_lt'
+'ck_assert_int_le'
+'ck_assert_int_gt'
+'ck_assert_int_ge'
+
+     Compares two signed integer values ('intmax_t') and displays a
+     predefined message with both the condition and input parameters on
+     failure.  The operator used for comparison is different for each
+     function and is indicated by the last two letters of the function
+     name.  The abbreviations 'eq', 'ne', 'lt', 'le', 'gt', and 'ge'
+     correspond to '==', '!=', '<', '<=', '>', and '>=' respectively.
+
+'ck_assert_uint_eq'
+'ck_assert_uint_ne'
+'ck_assert_uint_lt'
+'ck_assert_uint_le'
+'ck_assert_uint_gt'
+'ck_assert_uint_ge'
+
+     Similar to 'ck_assert_int_*', but compares two unsigned integer
+     values ('uintmax_t') instead.
+
+'ck_assert_float_eq'
+'ck_assert_float_ne'
+'ck_assert_float_lt'
+'ck_assert_float_le'
+'ck_assert_float_gt'
+'ck_assert_float_ge'
+
+     Compares two floating point numbers ('float') and displays a
+     predefined message with both the condition and input parameters on
+     failure.  The operator used for comparison is different for each
+     function and is indicated by the last two letters of the function
+     name.  The abbreviations 'eq', 'ne', 'lt', 'le', 'gt', and 'ge'
+     correspond to '==', '!=', '<', '<=', '>', and '>=' respectively.
+     Beware using those operators for floating point numbers because of
+     precision possible loss on every operation on floating point
+     numbers.  For example (1/3)*3==1 would return false, because
+     1/3==1.333...  (or 1.(3) notation in Europe) and cannot be
+     represented by computer logic.  As another example 1.1f in fact
+     could be 1.10000002384185791015625 and 2.1f could be
+     2.099999904632568359375 because of binary representation of
+     floating point numbers.  If you have different mathematical
+     operations used on floating point numbers consider using precision
+     comparisons or integer numbers instead.  But in some cases those
+     operators could be used.  For example if you cyclically increment
+     your floating point number only by positive or only by negative
+     values than you may use '<', '<=', '>' and '>=' operators in tests.
+     If your computations must end up with a certain value than '==' and
+     '!=' operators may be used.
+
+'ck_assert_double_eq'
+'ck_assert_double_ne'
+'ck_assert_double_lt'
+'ck_assert_double_le'
+'ck_assert_double_gt'
+'ck_assert_double_ge'
+
+     Similar to 'ck_assert_float_*', but compares two double precision
+     floating point values ('double') instead.
+
+'ck_assert_ldouble_eq'
+'ck_assert_ldouble_ne'
+'ck_assert_ldouble_lt'
+'ck_assert_ldouble_le'
+'ck_assert_ldouble_gt'
+'ck_assert_ldouble_ge'
+
+     Similar to 'ck_assert_float_*', but compares two double precision
+     floating point values ('long double') instead.
+
+'ck_assert_float_eq_tol'
+'ck_assert_float_ne_tol'
+'ck_assert_float_le_tol'
+'ck_assert_float_ge_tol'
+
+     Compares two floating point numbers ('float') with specified user
+     tolerance set by the third parameter ('float') and displays a
+     predefined message with both the condition and input parameters on
+     failure.  The abbreviations 'eq', 'ne', 'le', and 'ge' correspond
+     to '==', '!=', '<=', and '>=' respectively with acceptable error
+     (tolerance) specified by the last parameter.  Beware using those
+     functions for floating comparisons because of (1) errors coming
+     from floating point number representation, (2) rounding errors, (3)
+     floating point errors are platform dependent.  Floating point
+     numbers are often internally represented in binary so they cannot
+     be exact power of 10.  All these operators have significant error
+     in comparisons so use them only if you know what you're doing.
+     Some assertions could fail on one platform and would be passed on
+     another.  For example expression '0.02<=0.01+10^-2' is true by
+     meaning, but some platforms may calculate it as false.  IEEE 754
+     standard specifies the floating point number format representation
+     but it does not promise that the same computation carried out on
+     all hardware will produce the same result.
+
+'ck_assert_double_eq_tol'
+'ck_assert_double_ne_tol'
+'ck_assert_double_le_tol'
+'ck_assert_double_ge_tol'
+
+     Similar to 'ck_assert_float_*_tol', but compares two double
+     precision floating point values ('double') instead.
+
+'ck_assert_ldouble_eq_tol'
+'ck_assert_ldouble_ne_tol'
+'ck_assert_ldouble_le_tol'
+'ck_assert_ldouble_ge_tol'
+
+     Similar to 'ck_assert_float_*_tol', but compares two double
+     precision floating point values ('long double') instead.
+
+'ck_assert_float_finite'
+
+     Checks that a floating point number ('float') is finite and
+     displays a predefined message with both the condition and input
+     parameter on failure.  Finite means that value cannot be positive
+     infinity, negative infinity or NaN ("Not a Number").
+
+'ck_assert_double_finite'
+
+     Similar to 'ck_assert_float_finite', but checks double precision
+     floating point value ('double') instead.
+
+'ck_assert_ldouble_finite'
+
+     Similar to 'ck_assert_float_finite', but checks double precision
+     floating point value ('long double') instead.
+
+'ck_assert_float_infinite'
+
+     Checks that a floating point number ('float') is infinite and
+     displays a predefined message with both the condition and input
+     parameter on failure.  Infinite means that value may only be
+     positive infinity or negative infinity.
+
+'ck_assert_double_infinite'
+
+     Similar to 'ck_assert_float_infinite', but checks double precision
+     floating point value ('double') instead.
+
+'ck_assert_ldouble_infinite'
+
+     Similar to 'ck_assert_float_infinite', but checks double precision
+     floating point value ('long double') instead.
+
+'ck_assert_float_nan'
+
+     Checks that a floating point number ('float', 'double' or 'long
+     double' abbreviated as 'ldouble') is NaN ("Not a Number") and
+     displays a predefined message with both the condition and input
+     parameter on failure.
+
+'ck_assert_double_nan'
+
+     Similar to 'ck_assert_float_nan', but checks double precision
+     floating point value ('double') instead.
+
+'ck_assert_ldouble_nan'
+
+     Similar to 'ck_assert_float_nan', but checks double precision
+     floating point value ('long double') instead.
+
+'ck_assert_float_nonnan'
+
+     Checks that a floating point number ('float') is not NaN ("Not a
+     Number") and displays a predefined message with both the condition
+     and input parameter on failure.
+
+'ck_assert_double_nonnan'
+
+     Similar to 'ck_assert_float_nonnan', but checks double precision
+     floating point value ('double') instead.
+
+'ck_assert_ldouble_nonnan'
+
+     Similar to 'ck_assert_float_nonnan', but checks double precision
+     floating point value ('long double') instead.
+
+'ck_assert_str_eq'
+'ck_assert_str_ne'
+'ck_assert_str_lt'
+'ck_assert_str_le'
+'ck_assert_str_gt'
+'ck_assert_str_ge'
+
+     Compares two null-terminated 'char *' string values, using the
+     'strcmp()' function internally, and displays predefined message
+     with condition and input parameter values on failure.  The
+     comparison operator is again indicated by last two letters of the
+     function name.  'ck_assert_str_lt(a, b)' will pass if the unsigned
+     numerical value of the character string 'a' is less than that of
+     'b'.  If a NULL pointer is be passed to any comparison macro the
+     check will fail.
+
+'ck_assert_pstr_eq'
+'ck_assert_pstr_ne'
 
-4.1 Running Multiple Cases
+     Similar to 'ck_assert_str_*' macros, but able to check undefined
+     strings.  If a NULL pointer would be passed to a comparison macro
+     it would mean that a string is undefined.  If both strings are
+     undefined 'ck_assert_pstr_eq' would pass, but 'ck_assert_pstr_ne'
+     would fail.  If only one of strings is undefined
+     'ck_assert_pstr_eq' macro would fail and 'ck_assert_pstr_ne' would
+     pass.
+
+'ck_assert_ptr_eq'
+'ck_assert_ptr_ne'
+
+     Compares two pointers and displays predefined message with
+     condition and values of both input parameters on failure.  The
+     operator used for comparison is different for each function and is
+     indicated by the last two letters of the function name.  The
+     abbreviations 'eq' and 'ne' correspond to '==' and '!='
+     respectively.
+
+'ck_assert_ptr_null'
+'ck_assert_ptr_nonnull'
+
+     Compares a pointers against null and displays predefined message
+     with condition and value of the input parameter on failure.
+     'ck_assert_ptr_null' checks that pointer is equal to NULL and
+     'ck_assert_ptr_nonnull' checks that pointer is not equal to NULL.
+     'ck_assert_ptr_nonnull' is highly recommended to use in situations
+     when a function call can return NULL as error indication (like
+     functions that use malloc, calloc, strdup, mmap, etc).
+
+'ck_assert_mem_eq'
+'ck_assert_mem_ne'
+'ck_assert_mem_lt'
+'ck_assert_mem_le'
+'ck_assert_mem_gt'
+'ck_assert_mem_ge'
+
+     Compares contents of two memory locations of the given length,
+     using the 'memcmp()' function internally, and displays predefined
+     message with condition and input parameter values on failure.  The
+     comparison operator is again indicated by last two letters of the
+     function name.  'ck_assert_mem_lt(a, b)' will pass if the unsigned
+     numerical value of memory location 'a' is less than that of 'b'.
+
+'fail'
+     (Deprecated) Unconditionally fails test with user supplied message.
+
+'fail_if'
+     (Deprecated) Fails test if supplied condition evaluates to true and
+     displays user provided message.
+
+'fail_unless'
+     (Deprecated) Fails test if supplied condition evaluates to false
+     and displays user provided message.
+
+\1f
+File: check.info,  Node: Running Multiple Cases,  Next: No Fork Mode,  Prev: Convenience Test Functions,  Up: Advanced Features
+
+4.2 Running Multiple Cases
 ==========================
 
-What happens if we pass `-1' as the `amount' in `money_create()'?  What
+What happens if we pass '-1' as the 'amount' in 'money_create()'?  What
 should happen?  Let's write a unit test.  Since we are now testing
-limits, we should also test what happens when we create `Money' where
-`amount == 0'.  Let's put these in a separate test case called "Limits"
-so that `money_suite' is changed like so:
+limits, we should also test what happens when we create 'Money' where
+'amount == 0'.  Let's put these in a separate test case called "Limits"
+so that 'money_suite' is changed like so:
+
+     --- tests/check_money.3.c
+     +++ tests/check_money.6.c
+     @@ -1,65 +1,94 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
 
-     --- tests/check_money.3.c 2009-09-23 20:44:00.000000000 +1000
-     +++ tests/check_money.6.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -14,6 +14,23 @@
+      #include <stdlib.h>
+      #include <check.h>
+      #include "../src/money.h"
+
+      START_TEST(test_money_create)
+      {
+          Money *m;
+
+          m = money_create(5, "USD");
+          ck_assert_int_eq(money_amount(m), 5);
+          ck_assert_str_eq(money_currency(m), "USD");
+          money_free(m);
       }
       END_TEST
 
-     +START_TEST (test_money_create_neg)
+     +START_TEST(test_money_create_neg)
      +{
-     +  Money *m = money_create (-1, "USD");
-     +  fail_unless (m == NULL,
-     +        "NULL should be returned on attempt to create with "
-     +        "a negative amount");
+     +    Money *m = money_create(-1, "USD");
+     +
+     +    ck_assert_msg(m == NULL,
+     +                  "NULL should be returned on attempt to create with "
+     +                  "a negative amount");
      +}
      +END_TEST
      +
-     +START_TEST (test_money_create_zero)
+     +START_TEST(test_money_create_zero)
      +{
-     +  Money *m = money_create (0, "USD");
-     +  fail_unless (money_amount (m) == 0,
-     +        "Zero is a valid amount of money");
+     +    Money *m = money_create(0, "USD");
+     +
+     +    if (money_amount(m) != 0)
+     +    {
+     +        ck_abort_msg("Zero is a valid amount of money");
+     +    }
      +}
      +END_TEST
      +
-      Suite *
-      money_suite (void)
+      Suite * money_suite(void)
       {
-     @@ -24,6 +41,12 @@
-        tcase_add_test (tc_core, test_money_create);
-        suite_add_tcase (s, tc_core);
-
-     +  /* Limits test case */
-     +  TCase *tc_limits = tcase_create ("Limits");
-     +  tcase_add_test (tc_limits, test_money_create_neg);
-     +  tcase_add_test (tc_limits, test_money_create_zero);
-     +  suite_add_tcase (s, tc_limits);
+          Suite *s;
+          TCase *tc_core;
+     +    TCase *tc_limits;
+
+          s = suite_create("Money");
+
+          /* Core test case */
+          tc_core = tcase_create("Core");
+
+          tcase_add_test(tc_core, test_money_create);
+          suite_add_tcase(s, tc_core);
+
+     +    /* Limits test case */
+     +    tc_limits = tcase_create("Limits");
      +
-        return s;
+     +    tcase_add_test(tc_limits, test_money_create_neg);
+     +    tcase_add_test(tc_limits, test_money_create_zero);
+     +    suite_add_tcase(s, tc_limits);
+     +
+          return s;
       }
 
-   Now we can rerun our suite, and fix the problem(s). Note that errors
+      int main(void)
+      {
+          int number_failed;
+          Suite *s;
+          SRunner *sr;
+
+          s = money_suite();
+          sr = srunner_create(s);
+
+          srunner_run_all(sr, CK_NORMAL);
+          number_failed = srunner_ntests_failed(sr);
+          srunner_free(sr);
+          return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+      }
+
+   Now we can rerun our suite, and fix the problem(s).  Note that errors
 in the "Core" test case will be reported as "Core", and errors in the
 "Limits" test case will be reported as "Limits", giving you additional
 information about where things broke.
 
-     --- src/money.5.c 2009-09-23 20:44:00.000000000 +1000
-     +++ src/money.6.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -10,6 +10,11 @@
-      Money *
-      money_create (int amount, char *currency)
+     --- src/money.5.c
+     +++ src/money.6.c
+     @@ -1,58 +1,65 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
+
+      #include <stdlib.h>
+      #include "money.h"
+
+      struct Money
+      {
+          int amount;
+          char *currency;
+      };
+
+      Money *money_create(int amount, char *currency)
       {
-     +  if (amount < 0)
+     -    Money *m = malloc(sizeof(Money));
+     +    Money *m;
+     +
+     +    if (amount < 0)
      +    {
-     +      return NULL;
+     +        return NULL;
      +    }
      +
-        Money *m = malloc (sizeof (Money));
-        if (m == NULL)
+     +    m = malloc(sizeof(Money));
+
+          if (m == NULL)
           {
+              return NULL;
+          }
+
+          m->amount = amount;
+          m->currency = currency;
+          return m;
+      }
+
+      int money_amount(Money * m)
+      {
+          return m->amount;
+      }
+
+      char *money_currency(Money * m)
+      {
+          return m->currency;
+      }
+
+      void money_free(Money * m)
+      {
+          free(m);
+          return;
+      }
 
 \1f
 File: check.info,  Node: No Fork Mode,  Next: Test Fixtures,  Prev: Running Multiple Cases,  Up: Advanced Features
 
-4.2 No Fork Mode
+4.3 No Fork Mode
 ================
 
 Check normally forks to create a separate address space.  This allows a
 signal or early exit to be caught and reported, rather than taking down
-the entire test program, and is normally very useful.  However, when
-you are trying to debug why the segmentation fault or other program
-error occurred, forking makes it difficult to use debugging tools.  To
-define fork mode for an `SRunner' object, you can do one of the
-following:
+the entire test program, and is normally very useful.  However, when you
+are trying to debug why the segmentation fault or other program error
+occurred, forking makes it difficult to use debugging tools.  To define
+fork mode for an 'SRunner' object, you can do one of the following:
 
   1. Define the CK_FORK environment variable to equal "no".
 
   2. Explicitly define the fork status through the use of the following
      function:
 
-
      void srunner_set_fork_status (SRunner * sr, enum fork_status fstat);
 
-   The enum `fork_status' allows the `fstat' parameter to assume the
-following values: `CK_FORK' and `CK_NOFORK'.  An explicit call to
-`srunner_set_fork_status()' overrides the `CK_FORK' environment
+   The enum 'fork_status' allows the 'fstat' parameter to assume the
+following values: 'CK_FORK' and 'CK_NOFORK'.  An explicit call to
+'srunner_set_fork_status()' overrides the 'CK_FORK' environment
 variable.
 
 \1f
 File: check.info,  Node: Test Fixtures,  Next: Multiple Suites in one SRunner,  Prev: No Fork Mode,  Up: Advanced Features
 
-4.3 Test Fixtures
+4.4 Test Fixtures
 =================
 
 We may want multiple tests that all use the same Money.  In such cases,
@@ -980,30 +1739,32 @@ fixture" in test-driven development jargon.
 
    A fixture is created by defining a setup and/or a teardown function,
 and associating it with a test case.  There are two kinds of test
-fixtures in Check: checked and unchecked fixtures. These are defined as
+fixtures in Check: checked and unchecked fixtures.  These are defined as
 follows:
 
 Checked fixtures
      are run inside the address space created by the fork to create the
-     unit test.  Before each unit test in a test case, the `setup()'
-     function is run, if defined. After each unit test, the
-     `teardown()' function is run, if defined.  Since they run inside
+     unit test.  Before each unit test in a test case, the 'setup()'
+     function is run, if defined.  After each unit test, the
+     'teardown()' function is run, if defined.  Since they run inside
      the forked address space, if checked fixtures signal or otherwise
-     fail, they will be caught and reported by the `SRunner'.  A
-     checked `teardown()' fixture will run even if the unit test fails.
+     fail, they will be caught and reported by the 'SRunner'.  A checked
+     'teardown()' fixture will not run if the unit test fails.
 
 Unchecked fixtures
-     are run in the same address space as the test program. Therefore
-     they may not signal or exit, but may use the fail functions. The
-     unchecked `setup()', if defined, is run before the test case is
-     started. The unchecked `teardown()', if defined, is run after the
-     test case is done.
-
-   So for a test case that contains `check_one()' and `check_two()'
-unit tests, `checked_setup()'/`checked_teardown()' checked fixtures, and
-`unchecked_setup()'/`unchecked_teardown()' unchecked fixtures, the
+     are run in the same address space as the test program.  Therefore
+     they may not signal or exit, but may use the fail functions.  The
+     unchecked 'setup()', if defined, is run before the test case is
+     started.  The unchecked 'teardown()', if defined, is run after the
+     test case is done.  An unchecked 'teardown()' fixture will run even
+     if a unit test fails.
+
+   An important difference is that the checked fixtures are run once per
+unit test and the unchecked fixtures are run once per test case.  So for
+a test case that contains 'check_one()' and 'check_two()' unit tests,
+'checked_setup()'/'checked_teardown()' checked fixtures, and
+'unchecked_setup()'/'unchecked_teardown()' unchecked fixtures, the
 control flow would be:
-
      unchecked_setup();
      fork();
      checked_setup();
@@ -1019,127 +1780,197 @@ control flow would be:
 
 * Menu:
 
-* Test Fixture Examples::
-* Checked vs Unchecked Fixtures::
+* Test Fixture Examples::       
+* Checked vs Unchecked Fixtures::  
 
 \1f
 File: check.info,  Node: Test Fixture Examples,  Next: Checked vs Unchecked Fixtures,  Prev: Test Fixtures,  Up: Test Fixtures
 
-4.3.1 Test Fixture Examples
+4.4.1 Test Fixture Examples
 ---------------------------
 
 We create a test fixture in Check as follows:
 
   1. Define global variables, and functions to setup and teardown the
-     globals.  The functions both take `void' and return `void'.  In
-     our example, we'll make `five_dollars' be a global created and
-     freed by `setup()' and `teardown()' respectively.
+     globals.  The functions both take 'void' and return 'void'.  In our
+     example, we'll make 'five_dollars' be a global created and freed by
+     'setup()' and 'teardown()' respectively.
 
-  2. Add the `setup()' and `teardown()' functions to the test case with
-     `tcase_add_checked_fixture()'.  In our example, this belongs in
-     the suite setup function `money_suite'.
+  2. Add the 'setup()' and 'teardown()' functions to the test case with
+     'tcase_add_checked_fixture()'.  In our example, this belongs in the
+     suite setup function 'money_suite'.
 
   3. Rewrite tests to use the globals.  We'll rewrite our first to use
-     `five_dollars'.
+     'five_dollars'.
 
    Note that the functions used for setup and teardown do not need to be
-named `setup()' and `teardown()', but they must take `void' and return
-`void'.  We'll update `check_money.c' as follows:
+named 'setup()' and 'teardown()', but they must take 'void' and return
+'void'.  We'll update 'check_money.c' with the following patch:
+
+     --- tests/check_money.6.c
+     +++ tests/check_money.7.c
+     @@ -1,94 +1,103 @@
+      /*
+       * Check: a unit test framework for C
+       * Copyright (C) 2001, 2002 Arien Malec
+       *
+       * This library is free software; you can redistribute it and/or
+       * modify it under the terms of the GNU Lesser General Public
+       * License as published by the Free Software Foundation; either
+       * version 2.1 of the License, or (at your option) any later version.
+       *
+       * This library 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
+       * Lesser General Public License for more details.
+       *
+       * You should have received a copy of the GNU Lesser General Public
+       * License along with this library; if not, write to the
+       * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+       * MA 02110-1301, USA.
+       */
 
-     --- tests/check_money.6.c 2009-09-23 20:44:00.000000000 +1000
-     +++ tests/check_money.7.c 2009-09-23 20:44:00.000000000 +1000
-     @@ -2,15 +2,26 @@
+      #include <stdlib.h>
       #include <check.h>
       #include "../src/money.h"
 
+     -START_TEST(test_money_create)
      +Money *five_dollars;
      +
-     +void
-     +setup (void)
+     +void setup(void)
      +{
-     +  five_dollars = money_create (5, "USD");
+     +    five_dollars = money_create(5, "USD");
      +}
      +
-     +void
-     +teardown (void)
-     +{
-     +  money_free (five_dollars);
+     +void teardown(void)
+      {
+     -    Money *m;
+     +    money_free(five_dollars);
      +}
-     +
-      START_TEST (test_money_create)
+
+     -    m = money_create(5, "USD");
+     -    ck_assert_int_eq(money_amount(m), 5);
+     -    ck_assert_str_eq(money_currency(m), "USD");
+     -    money_free(m);
+     +START_TEST(test_money_create)
+     +{
+     +    ck_assert_int_eq(money_amount(five_dollars), 5);
+     +    ck_assert_str_eq(money_currency(five_dollars), "USD");
+      }
+      END_TEST
+
+      START_TEST(test_money_create_neg)
+      {
+          Money *m = money_create(-1, "USD");
+
+          ck_assert_msg(m == NULL,
+                        "NULL should be returned on attempt to create with "
+                        "a negative amount");
+      }
+      END_TEST
+
+      START_TEST(test_money_create_zero)
       {
-     -  Money *m;
-     -  m = money_create (5, "USD");
-     -  fail_unless (money_amount (m) == 5,
-     +  fail_unless (money_amount (five_dollars) == 5,
-              "Amount not set correctly on creation");
-     -  fail_unless (strcmp (money_currency (m), "USD") == 0,
-     +  fail_unless (strcmp (money_currency (five_dollars), "USD") == 0,
-              "Currency not set correctly on creation");
-     -  money_free (m);
+          Money *m = money_create(0, "USD");
+
+          if (money_amount(m) != 0)
+          {
+              ck_abort_msg("Zero is a valid amount of money");
+          }
       }
       END_TEST
 
-     @@ -38,6 +49,7 @@
+      Suite * money_suite(void)
+      {
+          Suite *s;
+          TCase *tc_core;
+          TCase *tc_limits;
+
+          s = suite_create("Money");
+
+          /* Core test case */
+          tc_core = tcase_create("Core");
 
-        /* Core test case */
-        TCase *tc_core = tcase_create ("Core");
-     +  tcase_add_checked_fixture (tc_core, setup, teardown);
-        tcase_add_test (tc_core, test_money_create);
-        suite_add_tcase (s, tc_core);
+     +    tcase_add_checked_fixture(tc_core, setup, teardown);
+          tcase_add_test(tc_core, test_money_create);
+          suite_add_tcase(s, tc_core);
+
+          /* Limits test case */
+          tc_limits = tcase_create("Limits");
+
+          tcase_add_test(tc_limits, test_money_create_neg);
+          tcase_add_test(tc_limits, test_money_create_zero);
+          suite_add_tcase(s, tc_limits);
+
+          return s;
+      }
+
+      int main(void)
+      {
+          int number_failed;
+          Suite *s;
+          SRunner *sr;
+
+          s = money_suite();
+          sr = srunner_create(s);
+
+          srunner_run_all(sr, CK_NORMAL);
+          number_failed = srunner_ntests_failed(sr);
+          srunner_free(sr);
+          return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+      }
 
 \1f
 File: check.info,  Node: Checked vs Unchecked Fixtures,  Prev: Test Fixture Examples,  Up: Test Fixtures
 
-4.3.2 Checked vs Unchecked Fixtures
+4.4.2 Checked vs Unchecked Fixtures
 -----------------------------------
 
-Checked fixtures run once for each unit test in a test case, and so
-they should not be used for expensive setup.  However, if a checked
-fixture fails and `CK_FORK' mode is being used, it will not bring down
-the entire framework.
+Checked fixtures run once for each unit test in a test case, and so they
+should not be used for expensive setup.  However, if a checked fixture
+fails and 'CK_FORK' mode is being used, it will not bring down the
+entire framework.
 
    On the other hand, unchecked fixtures run once for an entire test
-case, as opposed to once per unit test, and so can be used for
-expensive setup.  However, since they may take down the entire test
-program, they should only be used if they are known to be safe.
+case, as opposed to once per unit test, and so can be used for expensive
+setup.  However, since they may take down the entire test program, they
+should only be used if they are known to be safe.
 
    Additionally, the isolation of objects created by unchecked fixtures
-is not guaranteed by `CK_NOFORK' mode.  Normally, in `CK_FORK' mode,
+is not guaranteed by 'CK_NOFORK' mode.  Normally, in 'CK_FORK' mode,
 unit tests may abuse the objects created in an unchecked fixture with
 impunity, without affecting other unit tests in the same test case,
 because the fork creates a separate address space.  However, in
-`CK_NOFORK' mode, all tests live in the same address space, and side
+'CK_NOFORK' mode, all tests live in the same address space, and side
 effects in one test will affect the unchecked fixture for the other
 tests.
 
    A checked fixture will generally not be affected by unit test side
-effects, since the `setup()' is run before each unit test.  There is an
+effects, since the 'setup()' is run before each unit test.  There is an
 exception for side effects to the total environment in which the test
-program lives: for example, if the `setup()' function initializes a
-file that a unit test then changes, the combination of the `teardown()'
-function and `setup()' fuction must be able to restore the environment
+program lives: for example, if the 'setup()' function initializes a file
+that a unit test then changes, the combination of the 'teardown()'
+function and 'setup()' function must be able to restore the environment
 for the next unit test.
 
-   If the `setup()' function in a fixture fails, in either checked or
+   If the 'setup()' function in a fixture fails, in either checked or
 unchecked fixtures, the unit tests for the test case, and the
-`teardown()' function for the fixture will not be run.  A fixture error
-will be created and reported to the `SRunner'.
+'teardown()' function for the fixture will not be run.  A fixture error
+will be created and reported to the 'SRunner'.
 
 \1f
-File: check.info,  Node: Multiple Suites in one SRunner,  Next: Testing Signal Handling and Exit Values,  Prev: Test Fixtures,  Up: Advanced Features
+File: check.info,  Node: Multiple Suites in one SRunner,  Next: Selective Running of Tests,  Prev: Test Fixtures,  Up: Advanced Features
 
-4.4 Multiple Suites in one SRunner
+4.5 Multiple Suites in one SRunner
 ==================================
 
 In a large program, it will be convenient to create multiple suites,
-each testing a module of the program.  While one can create several
-test programs, each running one `Suite', it may be convenient to create
-one main test program, and use it to run multiple suites.  The Check
-test suite provides an example of how to do this. The main testing
-program is called `check_check', and has a header file that declares
-suite creation functions for all the module tests:
-
+each testing a module of the program.  While one can create several test
+programs, each running one 'Suite', it may be convenient to create one
+main test program, and use it to run multiple suites.  The Check test
+suite provides an example of how to do this.  The main testing program
+is called 'check_check', and has a header file that declares suite
+creation functions for all the module tests:
      Suite *make_sub_suite (void);
      Suite *make_sub2_suite (void);
      Suite *make_master_suite (void);
@@ -1151,10 +1982,9 @@ suite creation functions for all the module tests:
      Suite *make_fixture_suite (void);
      Suite *make_pack_suite (void);
 
-   The function `srunner_add_suite()' is used to add additional suites
-to an `SRunner'.  Here is the code that sets up and runs the `SRunner'
-in the `main()' function in `check_check_main.c':
-
+   The function 'srunner_add_suite()' is used to add additional suites
+to an 'SRunner'.  Here is the code that sets up and runs the 'SRunner'
+in the 'main()' function in 'check_check_main.c':
      SRunner *sr;
      sr = srunner_create (make_master_suite ());
      srunner_add_suite (sr, make_list_suite ());
@@ -1166,22 +1996,116 @@ in the `main()' function in `check_check_main.c':
      srunner_add_suite (sr, make_pack_suite ());
 
 \1f
-File: check.info,  Node: Testing Signal Handling and Exit Values,  Next: Looping Tests,  Prev: Multiple Suites in one SRunner,  Up: Advanced Features
+File: check.info,  Node: Selective Running of Tests,  Next: Testing Signal Handling and Exit Values,  Prev: Multiple Suites in one SRunner,  Up: Advanced Features
+
+4.6 Selective Running of Tests
+==============================
+
+After adding a couple of suites and some test cases in each, it is
+sometimes practical to be able to run only one suite, or one specific
+test case, without recompiling the test code.  Check provides two ways
+to accomplish this, either by specifying a suite or test case by name or
+by assigning tags to test cases and specifying one or more tags to run.
+
+* Menu:
+
+* Selecting Tests by Suite or Test Case::
+* Selecting Tests Based on Arbitrary Tags::
+
+\1f
+File: check.info,  Node: Selecting Tests by Suite or Test Case,  Next: Selecting Tests Based on Arbitrary Tags,  Prev: Selective Running of Tests,  Up: Selective Running of Tests
+
+4.6.1 Selecting Tests by Suite or Test Case
+-------------------------------------------
+
+There are two environment variables available that offer this ability,
+'CK_RUN_SUITE' and 'CK_RUN_CASE'.  Just set the value to the name of the
+suite and/or test case you want to run.  These environment variables can
+also be a good integration tool for running specific tests from within
+another tool, e.g.  an IDE.
+
+\1f
+File: check.info,  Node: Selecting Tests Based on Arbitrary Tags,  Prev: Selecting Tests by Suite or Test Case,  Up: Selective Running of Tests
+
+4.6.2 Selecting Tests Based on Arbitrary Tags
+---------------------------------------------
 
-4.5 Testing Signal Handling and Exit Values
+It can be useful to dynamically include or exclude groups of tests to be
+run based on criteria other than the suite or test case name.  For
+example, one or more tags can be assigned to test cases.  The tags could
+indicate if a test runs for a long time, so such tests could be excluded
+in order to run quicker tests for a sanity check.  Alternately, tags may
+be used to indicate which functional areas test cover.  Tests can then
+be run that include all test cases for a given set of functional areas.
+
+   In Check, a tag is a string of characters without white space.  One
+or more tags can be assigned to a test case by using the
+'tcase_set_tags' function.  This function accepts a string, and multiple
+tags can be specified by delimiting them with spaces.  For example:
+
+         Suite *s;
+
+         TCase *red, *blue, *purple, *yellow, *black;
+
+         s = suite_create("Check Tag Filtering");
+
+         red = tcase_create("Red");
+         tcase_set_tags(red, "Red");
+         suite_add_tcase (s, red);
+         tcase_add_test(red, red_test1);
+
+         blue = tcase_create("Blue");
+         tcase_set_tags(blue, "Blue");
+         suite_add_tcase (s, blue);
+         tcase_add_test(blue, blue_test1);
+
+         purple = tcase_create("Purple");
+         tcase_set_tags(purple, "Red Blue");
+         suite_add_tcase (s, purple);
+         tcase_add_test(purple, purple_test1);
+
+
+   Once test cases are tagged they may be selectively run in one of two
+ways:
+
+   a) Using Environment Variables
+
+   There are two environment variables available for selecting test
+cases based on tags: 'CK_INCLUDE_TAGS' and 'CK_EXCLUDE_TAGS'.  These can
+be set to a space separated list of tag names.  If 'CK_INCLUDE_TAGS' is
+set then test cases which include at least one tag in common with
+'CK_INCLUDE_TAGS' will be run.  If 'CK_EXCLUDE_TAGS' is set then test
+cases with one tag in common with 'CK_EXCLUDE_TAGS' will not be run.  In
+cases where both 'CK_INCLUDE_TAGS' and 'CK_EXCLUDE_TAGS' match a tag for
+a test case the test will be excluded.
+
+   Both 'CK_INCLUDE_TAGS' and 'CK_EXCLUDE_TAGS' can be specified in
+conjunction with 'CK_RUN_SUITE' or even 'CK_RUN_CASE' in which case they
+will have the effect of further narrowing the selection.
+
+   b) Programmatically
+
+   The 'srunner_run_tagged' function allows one to specify which tags to
+run or exclude from a suite runner.  This can be used to
+programmatically control which test cases may run.
+
+\1f
+File: check.info,  Node: Testing Signal Handling and Exit Values,  Next: Looping Tests,  Prev: Selective Running of Tests,  Up: Advanced Features
+
+4.7 Testing Signal Handling and Exit Values
 ===========================================
 
 To enable testing of signal handling, there is a function
-`tcase_add_test_raise_signal()' which is used instead of
-`tcase_add_test()'.  This function takes an additional signal argument,
+'tcase_add_test_raise_signal()' which is used instead of
+'tcase_add_test()'.  This function takes an additional signal argument,
 specifying a signal that the test expects to receive.  If no signal is
-received this is logged as a failure.  If a different signal is
-received this is logged as an error.
+received this is logged as a failure.  If a different signal is received
+this is logged as an error.
 
    The signal handling functionality only works in CK_FORK mode.
 
    To enable testing of expected exits, there is a function
-`tcase_add_exit_test()' which is used instead of `tcase_add_test()'.
+'tcase_add_exit_test()' which is used instead of 'tcase_add_test()'.
 This function takes an additional expected exit value argument,
 specifying a value that the test is expected to exit with.  If the test
 exits with any other value this is logged as a failure.  If the test
@@ -1192,27 +2116,25 @@ exits early this is logged as an error.
 \1f
 File: check.info,  Node: Looping Tests,  Next: Test Timeouts,  Prev: Testing Signal Handling and Exit Values,  Up: Advanced Features
 
-4.6 Looping Tests
+4.8 Looping Tests
 =================
 
-Looping tests are tests that are called with a new context for each
-loop iteration.  This makes them ideal for table based tests.  If loops
-are used inside ordinary tests to test multiple values, only the first
-error will be shown before the test exits.  However, looping tests
-allow for all errors to be shown at once, which can help out with
-debugging.
+Looping tests are tests that are called with a new context for each loop
+iteration.  This makes them ideal for table based tests.  If loops are
+used inside ordinary tests to test multiple values, only the first error
+will be shown before the test exits.  However, looping tests allow for
+all errors to be shown at once, which can help out with debugging.
 
-   Adding a normal test with `tcase_add_loop_test()' instead of
-`tcase_add_test()' will make the test function the body of a `for'
-loop, with the addition of a fork before each call.  The loop variable
-`_i' is available for use inside the test function; for example, it
-could serve as an index into a table.  For failures, the iteration
-which caused the failure is available in error messages and logs.
+   Adding a normal test with 'tcase_add_loop_test()' instead of
+'tcase_add_test()' will make the test function the body of a 'for' loop,
+with the addition of a fork before each call.  The loop variable '_i' is
+available for use inside the test function; for example, it could serve
+as an index into a table.  For failures, the iteration which caused the
+failure is available in error messages and logs.
 
    Start and end values for the loop are supplied when adding the test.
-The values are used as in a normal `for' loop.  Below is some
+The values are used as in a normal 'for' loop.  Below is some
 pseudo-code to show the concept:
-
      for (_i = tfun->loop_start; _i < tfun->loop_end; _i++)
      {
        fork();      /* New context */
@@ -1221,12 +2143,11 @@ pseudo-code to show the concept:
      }
 
    An example of looping test usage follows:
-
      static const int primes[5] = {2,3,5,7,11};
 
      START_TEST (check_is_prime)
      {
-       fail_unless (is_prime (primes[_i]));
+       ck_assert (is_prime (primes[_i]));
      }
      END_TEST
 
@@ -1234,13 +2155,13 @@ pseudo-code to show the concept:
 
      tcase_add_loop_test (tcase, check_is_prime, 0, 5);
 
-   Looping tests work in `CK_NOFORK' mode as well, but without the
+   Looping tests work in 'CK_NOFORK' mode as well, but without the
 forking.  This means that only the first error will be shown.
 
 \1f
 File: check.info,  Node: Test Timeouts,  Next: Determining Test Coverage,  Prev: Looping Tests,  Up: Advanced Features
 
-4.7 Test Timeouts
+4.9 Test Timeouts
 =================
 
 To be certain that a test won't hang indefinitely, all tests are run
@@ -1248,28 +2169,29 @@ with a timeout, the default being 4 seconds.  If the test is not
 finished within that time, it is killed and logged as an error.
 
    The timeout for a specific test case, which may contain multiple unit
-tests, can be changed with the `tcase_set_timeout()' function.  The
+tests, can be changed with the 'tcase_set_timeout()' function.  The
 default timeout used for all test cases can be changed with the
-environment variable `CK_DEFAULT_TIMEOUT', but this will not override
-an explicitly set timeout.  Another way to change the timeout length is
-to use the `CK_TIMEOUT_MULTIPLIER' environment variable, which
-multiplies all timeouts, including those set with
-`tcase_set_timeout()', with the supplied integer value. All timeout
-arguments are in seconds and a timeout of 0 seconds turns off the
-timeout functionality.
+environment variable 'CK_DEFAULT_TIMEOUT', but this will not override an
+explicitly set timeout.  Another way to change the timeout length is to
+use the 'CK_TIMEOUT_MULTIPLIER' environment variable, which multiplies
+all timeouts, including those set with 'tcase_set_timeout()', with the
+supplied integer value.  All timeout arguments are in seconds and a
+timeout of 0 seconds turns off the timeout functionality.  On systems
+that support it, the timeout can be specified using a nanosecond
+precision.  Otherwise, second precision is used.
 
    Test timeouts are only available in CK_FORK mode.
 
 \1f
-File: check.info,  Node: Determining Test Coverage,  Next: Test Logging,  Prev: Test Timeouts,  Up: Advanced Features
+File: check.info,  Node: Determining Test Coverage,  Next: Finding Memory Leaks,  Prev: Test Timeouts,  Up: Advanced Features
 
-4.8 Determining Test Coverage
-=============================
+4.10 Determining Test Coverage
+==============================
 
 The term "code coverage" refers to the extent that the statements of a
-program are executed during a run.  Thus, "test coverage" refers to
-code coverage when executing unit tests.  This information can help you
-to do two things:
+program are executed during a run.  Thus, "test coverage" refers to code
+coverage when executing unit tests.  This information can help you to do
+two things:
 
    * Write better tests that more fully exercise your code, thereby
      improving confidence in it.
@@ -1277,26 +2199,23 @@ to do two things:
    * Detect dead code that could be factored away.
 
    Check itself does not provide any means to determine this test
-coverage; rather, this is the job of the compiler and its related
-tools.  In the case of `gcc' this information is easy to obtain, and
-other compilers should provide similar facilities.
+coverage; rather, this is the job of the compiler and its related tools.
+In the case of 'gcc' this information is easy to obtain, and other
+compilers should provide similar facilities.
 
-   Using `gcc', first enable test coverage profiling when building your
-source by specifying the `-fprofile-arcs' and `-ftest-coverage'
+   Using 'gcc', first enable test coverage profiling when building your
+source by specifying the '-fprofile-arcs' and '-ftest-coverage'
 switches:
-
      $ gcc -g -Wall -fprofile-arcs -ftest-coverage -o foo foo.c foo_check.c
 
-   You will see that an additional `.gcno' file is created for each
-`.c' input file.  After running your tests the normal way, a `.gcda'
-file is created for each `.gcno' file.  These contain the coverage data
-in a raw format.  To combine this information and a source file into a
-more readable format you can use the `gcov' utility:
-
+   You will see that an additional '.gcno' file is created for each '.c'
+input file.  After running your tests the normal way, a '.gcda' file is
+created for each '.gcno' file.  These contain the coverage data in a raw
+format.  To combine this information and a source file into a more
+readable format you can use the 'gcov' utility:
      $ gcov foo.c
 
-   This will produce the file `foo.c.gcov' which looks like this:
-
+   This will produce the file 'foo.c.gcov' which looks like this:
           -:   41:     * object */
          18:   42:    if (ht->table[p] != NULL) {
           -:   43:        /* replaces the current entry */
@@ -1306,27 +2225,112 @@ more readable format you can use the `gcov' utility:
 
    As you can see this is an annotated source file with three columns:
 usage information, line numbers, and the original source.  The usage
-information in the first column can either be '-', which means that
-this line does not contain code that could be executed; '#####', which
-means this line was never executed although it does contain code--these
-are the lines that are probably most interesting for you; or a number,
-which indicates how often that line was executed.
+information in the first column can either be '-', which means that this
+line does not contain code that could be executed; '#####', which means
+this line was never executed although it does contain code--these are
+the lines that are probably most interesting for you; or a number, which
+indicates how often that line was executed.
 
    This is of course only a very brief overview, but it should
-illustrate how determining test coverage generally works, and how it
-can help you.  For more information or help with other compilers,
-please refer to the relevant manuals.
+illustrate how determining test coverage generally works, and how it can
+help you.  For more information or help with other compilers, please
+refer to the relevant manuals.
 
 \1f
-File: check.info,  Node: Test Logging,  Next: Subunit Support,  Prev: Determining Test Coverage,  Up: Advanced Features
+File: check.info,  Node: Finding Memory Leaks,  Next: Test Logging,  Prev: Determining Test Coverage,  Up: Advanced Features
 
-4.9 Test Logging
-================
+4.11 Finding Memory Leaks
+=========================
 
-Check supports an operation to log the results of a test run.  To use
-test logging, call the `srunner_set_log()' function with the name of
-the log file you wish to create:
+It is possible to determine if any code under test leaks memory during a
+test.  Check itself does not have an API for memory leak detection,
+however Valgrind can be used against a unit testing program to search
+for potential leaks.
+
+   Before discussing memory leak detection, first a "memory leak" should
+be better defined.  There are two primary definitions of a memory leak:
+
+  1. Memory that is allocated but not freed before a program terminates.
+     However, it was possible for the program to free the memory if it
+     had wanted to.  Valgrind refers to these as "still reachable"
+     leaks.
+  2. Memory that is allocated, and any reference to the memory is lost.
+     The program could not have freed the memory.  Valgrind refers to
+     these as "definitely lost" leaks.
+
+   Valgrind uses the second definition by default when defining a memory
+leak.  These leaks are the ones which are likely to cause a program
+issues due to heap depletion.
+
+   If one wanted to run Valgrind against a unit testing program to
+determine if leaks are present, the following invocation of Valgrind
+will work:
 
+     valgrind --leak-check=full ${UNIT_TEST_PROGRAM}
+     ...
+     ==3979== LEAK SUMMARY:
+     ==3979==    definitely lost: 0 bytes in 0 blocks
+     ==3979==    indirectly lost: 0 bytes in 0 blocks
+     ==3979==      possibly lost: 0 bytes in 0 blocks
+     ==3979==    still reachable: 548 bytes in 24 blocks
+     ==3979==         suppressed: 0 bytes in 0 blocks
+
+   In that example, there were no "definitely lost" memory leaks found.
+However, why would there be such a large number of "still reachable"
+memory leaks?  It turns out this is a consequence of using 'fork()' to
+run a unit test in its own process memory space, which Check does by
+default on platforms with 'fork()' available.
+
+   Consider the example where a unit test program creates one suite with
+one test.  The flow of the program will look like the following:
+
+     Main process:       Unit test process:
+     create suite
+     srunner_run_all()
+        fork unit test     unit test process created
+        wait for test      start test
+        ...                end test
+        ...                exit(0)
+        test complete
+     report result
+     free suite
+     exit(0)
+
+   The unit testing process has a copy of all memory that the main
+process allocated.  In this example, that would include the suite
+allocated in main.  When the unit testing process calls 'exit(0)', the
+suite allocated in 'main()' is reachable but not freed.  As the unit
+test has no reason to do anything besides die when its test is finished,
+and it has no reasonable way to free everything before it dies, Valgrind
+reports that some memory is still reachable but not freed.
+
+   If the "still reachable" memory leaks are a concern, and one required
+that the unit test program report that there were no memory leaks
+regardless of the type, then the unit test program needs to run without
+fork.  To accomplish this, either define the 'CK_FORK=no' environment
+variable, or use the 'srunner_set_fork_status()' function to set the
+fork mode as 'CK_NOFORK' for all suite runners.
+
+   Running the same unit test program by disabling 'fork()' results in
+the following:
+
+     CK_FORK=no valgrind --leak-check=full ${UNIT_TEST_PROGRAM}
+     ...
+     ==4924== HEAP SUMMARY:
+     ==4924==     in use at exit: 0 bytes in 0 blocks
+     ==4924==   total heap usage: 482 allocs, 482 frees, 122,351 bytes allocated
+     ==4924==
+     ==4924== All heap blocks were freed -- no leaks are possible
+
+\1f
+File: check.info,  Node: Test Logging,  Next: Subunit Support,  Prev: Finding Memory Leaks,  Up: Advanced Features
+
+4.12 Test Logging
+=================
+
+Check supports an operation to log the results of a test run.  To use
+test logging, call the 'srunner_set_log()' function with the name of the
+log file you wish to create:
      SRunner *sr;
      sr = srunner_create (make_s1_suite ());
      srunner_add_suite (sr, make_s2_suite ());
@@ -1334,11 +2338,9 @@ the log file you wish to create:
      srunner_run_all (sr, CK_NORMAL);
 
    In this example, Check will write the results of the run to
-`test.log'.  The `print_mode' argument to `srunner_run_all()' is
-ignored during test logging; the log will contain a result entry,
-organized by suite, for every test run.  Here is an example of test log
-output:
-
+'test.log'.  The 'print_mode' argument to 'srunner_run_all()' is ignored
+during test logging; the log will contain a result entry, organized by
+suite, for every test run.  Here is an example of test log output:
      Running suite S1
      ex_log_output.c:8:P:Core:test_pass: Test passed
      ex_log_output.c:14:F:Core:test_fail: Failure
@@ -1349,50 +2351,65 @@ output:
      Results for all suites run:
      50%: Checks: 4, Failures: 1, Errors: 1
 
+   Another way to enable test logging is to use the 'CK_LOG_FILE_NAME'
+environment variable.  When set tests will be logged to the specified
+file name.  If log file is specified with both 'CK_LOG_FILE_NAME' and
+'srunner_set_log()', the name provided to 'srunner_set_log()' will be
+used.
+
+   If the log name is set to "-" either via 'srunner_set_log()' or
+'CK_LOG_FILE_NAME', the log data will be printed to stdout instead of to
+a file.
+
 * Menu:
 
-* XML Logging::
+* XML Logging::                 
+* TAP Logging::
 
 \1f
 File: check.info,  Node: XML Logging,  Prev: Test Logging,  Up: Test Logging
 
-4.9.1 XML Logging
------------------
+4.12.1 XML Logging
+------------------
 
-The log can also be written in XML.  The following functions define the
+The log can also be written in XML. The following functions define the
 interface for XML logs:
-
      void srunner_set_xml (SRunner *sr, const char *fname);
      int srunner_has_xml (SRunner *sr);
      const char *srunner_xml_fname (SRunner *sr);
 
-   The only thing you need to do to get XML output is call
-`srunner_set_xml()' before the tests are run.  Here is an example of
-the same log output as before but in XML:
-
+   XML output is enabled by a call to 'srunner_set_xml()' before the
+tests are run.  Here is an example of an XML log:
      <?xml version="1.0"?>
+     <?xml-stylesheet type="text/xsl" href="http://check.sourceforge.net/xml/check_unittest.xslt"?>
      <testsuites xmlns="http://check.sourceforge.net/ns">
-       <datetime>2004-08-20 12:53:32</datetime>
+       <datetime>2012-10-19 09:56:06</datetime>
        <suite>
          <title>S1</title>
          <test result="success">
            <path>.</path>
-           <fn>ex_xml_output.c:8</fn>
+           <fn>ex_xml_output.c:10</fn>
            <id>test_pass</id>
+           <iteration>0</iteration>
+           <duration>0.000013</duration>
            <description>Core</description>
            <message>Passed</message>
          </test>
          <test result="failure">
            <path>.</path>
-           <fn>ex_xml_output.c:14</fn>
+           <fn>ex_xml_output.c:16</fn>
            <id>test_fail</id>
+           <iteration>0</iteration>
+           <duration>-1.000000</duration>
            <description>Core</description>
            <message>Failure</message>
          </test>
          <test result="error">
            <path>.</path>
-           <fn>ex_xml_output.c:18</fn>
+           <fn>ex_xml_output.c:20</fn>
            <id>test_exit</id>
+           <iteration>0</iteration>
+           <duration>-1.000000</duration>
            <description>Core</description>
            <message>Early exit with return value 1</message>
          </test>
@@ -1401,36 +2418,125 @@ the same log output as before but in XML:
          <title>S2</title>
          <test result="success">
            <path>.</path>
-           <fn>ex_xml_output.c:26</fn>
+           <fn>ex_xml_output.c:28</fn>
            <id>test_pass2</id>
+           <iteration>0</iteration>
+           <duration>0.000011</duration>
+           <description>Core</description>
+           <message>Passed</message>
+         </test>
+         <test result="failure">
+           <path>.</path>
+           <fn>ex_xml_output.c:34</fn>
+           <id>test_loop</id>
+           <iteration>0</iteration>
+           <duration>-1.000000</duration>
+           <description>Core</description>
+           <message>Iteration 0 failed</message>
+         </test>
+         <test result="success">
+           <path>.</path>
+           <fn>ex_xml_output.c:34</fn>
+           <id>test_loop</id>
+           <iteration>1</iteration>
+           <duration>0.000010</duration>
            <description>Core</description>
            <message>Passed</message>
          </test>
+         <test result="failure">
+           <path>.</path>
+           <fn>ex_xml_output.c:34</fn>
+           <id>test_loop</id>
+           <iteration>2</iteration>
+           <duration>-1.000000</duration>
+           <description>Core</description>
+           <message>Iteration 2 failed</message>
+         </test>
        </suite>
-       <duration>0.304875</duration>
+       <suite>
+         <title>XML escape &quot; &apos; &lt; &gt; &amp; tests</title>
+         <test result="failure">
+           <path>.</path>
+           <fn>ex_xml_output.c:40</fn>
+           <id>test_xml_esc_fail_msg</id>
+           <iteration>0</iteration>
+           <duration>-1.000000</duration>
+           <description>description &quot; &apos; &lt; &gt; &amp;</description>
+           <message>fail &quot; &apos; &lt; &gt; &amp; message</message>
+         </test>
+       </suite>
+       <duration>0.001610</duration>
      </testsuites>
 
+   XML logging can be enabled by an environment variable as well.  If
+'CK_XML_LOG_FILE_NAME' environment variable is set, the XML test log
+will be written to specified file name.  If XML log file is specified
+with both 'CK_XML_LOG_FILE_NAME' and 'srunner_set_xml()', the name
+provided to 'srunner_set_xml()' will be used.
+
+   If the log name is set to "-" either via 'srunner_set_xml()' or
+'CK_XML_LOG_FILE_NAME', the log data will be printed to stdout instead
+of to a file.
+
+   If both plain text and XML log files are specified, by any of above
+methods, then check will log to both files.  In other words logging in
+plain text and XML format simultaneously is supported.
+
+\1f
+File: check.info,  Node: TAP Logging,  Prev: Test Logging,  Up: Test Logging
+
+4.12.2 TAP Logging
+------------------
+
+The log can also be written in Test Anything Protocol (TAP) format.
+Refer to the TAP Specification (http://podwiki.hexten.net/TAP/TAP.html)
+for information on valid TAP output and parsers of TAP. The following
+functions define the interface for TAP logs:
+     void srunner_set_tap (SRunner *sr, const char *fname);
+     int srunner_has_tap (SRunner *sr);
+     const char *srunner_tap_fname (SRunner *sr);
+
+   TAP output is enabled by a call to 'srunner_set_tap()' before the
+tests are run.  Here is an example of an TAP log:
+     ok 1 - mytests.c:test_suite_name:my_test_1: Passed
+     ok 2 - mytests.c:test_suite_name:my_test_2: Passed
+     not ok 3 - mytests.c:test_suite_name:my_test_3: Foo happened
+     ok 4 - mytests.c:test_suite_name:my_test_1: Passed
+     1..4
+
+   TAP logging can be enabled by an environment variable as well.  If
+'CK_TAP_LOG_FILE_NAME' environment variable is set, the TAP test log
+will be written to specified file name.  If TAP log file is specified
+with both 'CK_TAP_LOG_FILE_NAME' and 'srunner_set_tap()', the name
+provided to 'srunner_set_tap()' will be used.
+
+   If the log name is set to "-" either via 'srunner_set_tap()' or
+'CK_TAP_LOG_FILE_NAME', the log data will be printed to stdout instead
+of to a file.
+
+   If both plain text and TAP log files are specified, by any of above
+methods, then check will log to both files.  In other words logging in
+plain text and TAP format simultaneously is supported.
+
 \1f
 File: check.info,  Node: Subunit Support,  Prev: Test Logging,  Up: Advanced Features
 
-4.10 Subunit Support
+4.13 Subunit Support
 ====================
 
-Check supports running test suites with subunit output. This can be
+Check supports running test suites with subunit output.  This can be
 useful to combine test results from multiple languages, or to perform
 programmatic analysis on the results of multiple check test suites or
-otherise handle test results in a programmatic manner. Using subunit
-with check is very straight forward. There are two steps: 1) In your
+otherwise handle test results in a programmatic manner.  Using subunit
+with check is very straight forward.  There are two steps: 1) In your
 check test suite driver pass 'CK_SUBUNIT' as the output mode for your
 srunner.
-
      SRunner *sr;
      sr = srunner_create (make_s1_suite ());
      srunner_add_suite (sr, make_s2_suite ());
      srunner_run_all (sr, CK_SUBUNIT);
    2) Setup your main language test runner to run your check based test
-executable. For instance using python:
-
+executable.  For instance using python:
 
      import subunit
 
@@ -1452,17 +2558,104 @@ any test runner - unittest.py, tribunal, trial, nose or others) will run
 future plans, and source code control details.
 
 \1f
-File: check.info,  Node: Conclusion and References,  Next: AM_PATH_CHECK,  Prev: Advanced Features,  Up: Top
+File: check.info,  Node: Supported Build Systems,  Next: Conclusion and References,  Prev: Advanced Features,  Up: Top
+
+5 Supported Build Systems
+*************************
+
+Check officially supports two build systems: Autotools and CMake.
+Primarily it is recommended to use Autotools where possible, as CMake is
+only officially supported for Windows.  Information on using Check in
+either build system follows.
+
+* Menu:
+
+* Autotools::
+* CMake::
+
+\1f
+File: check.info,  Node: Autotools,  Next: CMake,  Prev: Supported Build Systems,  Up: Supported Build Systems
+
+5.1 Autotools
+=============
+
+It is recommended to use pkg-config where possible to locate and use
+Check in an Autotools project.  This can be accomplished by including
+the following in the project's 'configure.ac' file:
+
+   PKG_CHECK_MODULES([CHECK], [check >= MINIMUM-VERSION])
 
-5 Conclusion and References
+   where MINIMUM-VERSION is the lowest version which is sufficient for
+the project.  For example, to guarantee that at least version 0.9.6 is
+available, use the following:
+
+   PKG_CHECK_MODULES([CHECK], [check >= 0.9.6])
+
+   An example of a 'configure.ac' script for a project is included in
+the 'doc/example' directory in Check's source.  This macro should
+provide everything necessary to integrate Check into an Autotools
+project.
+
+   If one does not wish to use pkg-config Check also provides its own
+macro, 'AM_PATH_CHECK()', which may be used.  This macro is deprecated,
+but is still included with Check for backwards compatibility.
+
+   The 'AM_PATH_CHECK()' macro is defined in the file 'check.m4' which
+is installed by Check.  It has some optional parameters that you might
+find useful in your 'configure.ac':
+AM_PATH_CHECK([MINIMUM-VERSION,
+               [ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]])
+
+   'AM_PATH_CHECK' does several things:
+
+  1. It ensures check.h is available
+
+  2. It ensures a compatible version of Check is installed
+
+  3. It sets 'CHECK_CFLAGS' and 'CHECK_LIBS' for use by Automake.
+
+   If you include 'AM_PATH_CHECK()' in 'configure.ac' and subsequently
+see warnings when attempting to create 'configure', it probably means
+one of the following things:
+
+  1. You forgot to call 'aclocal'.  'autoreconf' will do this for you.
+
+  2. 'aclocal' can't find 'check.m4'.  Here are some possible solutions:
+
+       a. Call 'aclocal' with '-I' set to the location of 'check.m4'.
+          This means you have to call both 'aclocal' and 'autoreconf'.
+
+       b. Add the location of 'check.m4' to the 'dirlist' used by
+          'aclocal' and then call 'autoreconf'.  This means you need
+          permission to modify the 'dirlist'.
+
+       c. Set 'ACLOCAL_AMFLAGS' in your top-level 'Makefile.am' to
+          include '-I DIR' with 'DIR' being the location of 'check.m4'.
+          Then call 'autoreconf'.
+
+\1f
+File: check.info,  Node: CMake,  Prev: Autotools,  Up: Supported Build Systems
+
+5.2 CMake
+=========
+
+Those unable to use Autotools in their project may use CMake instead.
+Officially CMake is supported only for Windows.
+
+   Documentation for using CMake is forthcoming.  In the meantime, look
+at the example CMake project in Check's 'doc/examples' directory.
+
+\1f
+File: check.info,  Node: Conclusion and References,  Next: Environment Variable Reference,  Prev: Supported Build Systems,  Up: Top
+
+6 Conclusion and References
 ***************************
 
 The tutorial and description of advanced features has provided an
-introduction to all of the functionality available in Check.
-Hopefully, this is enough to get you started writing unit tests with
-Check.  All the rest is simply application of what has been learned so
-far with repeated application of the "test a little, code a little"
-strategy.
+introduction to all of the functionality available in Check.  Hopefully,
+this is enough to get you started writing unit tests with Check.  All
+the rest is simply application of what has been learned so far with
+repeated application of the "test a little, code a little" strategy.
 
    For further reference, see Kent Beck, "Test-Driven Development: By
 Example", 1st ed., Addison-Wesley, 2003.  ISBN 0-321-14653-0.
@@ -1471,50 +2664,58 @@ Example", 1st ed., Addison-Wesley, 2003.  ISBN 0-321-14653-0.
 test-driven development, please send us a patch to this manual.
 
 \1f
-File: check.info,  Node: AM_PATH_CHECK,  Next: Copying This Manual,  Prev: Conclusion and References,  Up: Top
+File: check.info,  Node: Environment Variable Reference,  Next: Copying This Manual,  Prev: Conclusion and References,  Up: Top
 
-6 AM_PATH_CHECK
-***************
+Appendix A Environment Variable Reference
+*****************************************
 
-The `AM_PATH_CHECK()' macro is defined in the file `check.m4' which is
-installed by Check.  It has some optional parameters that you might
-find useful in your `configure.ac':
+This is a reference to environment variables that Check recognized and
+their use.
 
-AM_PATH_CHECK([MINIMUM-VERSION,
-               [ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]])
+   CK_RUN_CASE: Name of a test case, runs only that test.  See section
+*note Selective Running of Tests::.
 
-   `AM_PATH_CHECK' does several things:
+   CK_RUN_SUITE: Name of a test suite, runs only that suite.  See
+section *note Selective Running of Tests::.
 
-  1. It ensures check.h is available
+   CK_INCLUDE_TAGS: String of space separated tags, runs only test cases
+associated with at least one of the tags, See section *note Selecting
+Tests Based on Arbitrary Tags::.
 
-  2. It ensures a compatible version of Check is installed
+   CK_EXCLUDE_TAGS: String of space separated tags, runs only test cases
+not associated with any of the tags, See section *note Selecting Tests
+Based on Arbitrary Tags::.
 
-  3. It sets `CHECK_CFLAGS' and `CHECK_LIBS' for use by Automake.
+   CK_VERBOSITY: How much output to emit, accepts: "silent", "minimal",
+"normal", "subunit", or "verbose".  See section *note SRunner Output::.
 
-   If you include `AM_PATH_CHECK()' in `configure.ac' and subsequently
-see warnings when attempting to create `configure', it probably means
-one of the following things:
+   CK_FORK: Set to "no" to disable using fork() to run unit tests in
+their own process.  This is useful for debugging segmentation faults.
+See section *note No Fork Mode::.
 
-  1. You forgot to call `aclocal'.  `autoreconf' will do this for you.
+   CK_DEFAULT_TIMEOUT: Override Check's default unit test timeout, a
+floating value in seconds.  "0" means no timeout.  See section *note
+Test Timeouts::.
 
-  2. `aclocal' can't find  `check.m4'.  Here are some possible
-     solutions:
+   CK_TIMEOUT_MULTIPLIER: A multiplier used against the default unit
+test timeout.  An integer, defaults to "1".  See section *note Test
+Timeouts::.
 
-       a. Call `aclocal' with `-I' set to the location of `check.m4'.
-          This means you have to call both `aclocal' and `autoreconf'.
+   CK_LOG_FILE_NAME: Filename to write logs to.  See section *note Test
+Logging::.
 
-       b. Add the location of `check.m4' to the `dirlist' used by
-          `aclocal' and then call `autoreconf'.  This means you need
-          permission to modify the `dirlist'.
+   CK_XML_LOG_FILE_NAME: Filename to write XML log to.  See section
+*note XML Logging::.
 
-       c. Set `ACLOCAL_AMFLAGS' in your top-level `Makefile.am' to
-          include `-I DIR' with `DIR' being the location of `check.m4'.
-          Then call `autoreconf'.
+   CK_TAP_LOG_FILE_NAME: Filename to write TAP (Test Anything Protocol)
+output to.  See section *note TAP Logging::.
+
+   CK_MAX_MSG_SIZE: Maximal assertion message size.
 
 \1f
-File: check.info,  Node: Copying This Manual,  Next: Index,  Prev: AM_PATH_CHECK,  Up: Top
+File: check.info,  Node: Copying This Manual,  Next: Index,  Prev: Environment Variable Reference,  Up: Top
 
-Appendix A Copying This Manual
+Appendix B Copying This Manual
 ******************************
 
 * Menu:
@@ -1524,7 +2725,7 @@ Appendix A Copying This Manual
 \1f
 File: check.info,  Node: GNU Free Documentation License,  Up: Copying This Manual
 
-A.1 GNU Free Documentation License
+B.1 GNU Free Documentation License
 ==================================
 
                       Version 1.2, November 2002
@@ -1555,21 +2756,21 @@ A.1 GNU Free Documentation License
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
      "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     of the public is a licensee, and is addressed as "you".  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
      A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
@@ -1587,12 +2788,12 @@ A.1 GNU Free Documentation License
      regarding them.
 
      The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
      The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -1603,27 +2804,27 @@ A.1 GNU Free Documentation License
      A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
 
      The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
@@ -1658,8 +2859,8 @@ A.1 GNU Free Documentation License
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -1673,12 +2874,11 @@ A.1 GNU Free Documentation License
      these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -1686,40 +2886,39 @@ A.1 GNU Free Documentation License
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -1749,31 +2948,30 @@ A.1 GNU Free Documentation License
 
        I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled "History" in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
+          previous versions it was based on.  These may be placed in the
+          "History" section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
 
        K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
        M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
@@ -1786,11 +2984,11 @@ A.1 GNU Free Documentation License
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version's
+     license notice.  These titles must be distinct from any other
+     section titles.
 
      You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
@@ -1799,15 +2997,15 @@ A.1 GNU Free Documentation License
      definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -1817,8 +3015,8 @@ A.1 GNU Free Documentation License
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -1845,20 +3043,20 @@ A.1 GNU Free Documentation License
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
      legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
@@ -1901,28 +3099,28 @@ A.1 GNU Free Documentation License
      attempt to copy, modify, sublicense or distribute the Document is
      void, and will automatically terminate your rights under this
      License.  However, parties who have received copies, or rights,
-     from you under this License will not have their licenses
-     terminated so long as such parties remain in full compliance.
+     from you under this License will not have their licenses terminated
+     so long as such parties remain in full compliance.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
 10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
      version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.
 
-A.1.1 ADDENDUM: How to use this License for your documents
+B.1.1 ADDENDUM: How to use this License for your documents
 ----------------------------------------------------------
 
 To use this License in a document you have written, include a copy of
@@ -1938,7 +3136,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts."  line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -1949,9 +3147,9 @@ combination of the three, merge those two alternatives to suit the
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 \1f
 File: check.info,  Node: Index,  Prev: Copying This Manual,  Up: Top
@@ -1962,76 +3160,264 @@ Index
 \0\b[index\0\b]
 * Menu:
 
-* AM_PATH_CHECK():                       AM_PATH_CHECK.       (line   6)
+* check_set_max_msg_size:                Convenience Test Functions.
+                                                              (line  11)
+* ck_abort:                              Test a Little.       (line  87)
+* ck_abort <1>:                          Convenience Test Functions.
+                                                              (line  20)
+* ck_abort_msg:                          Test a Little.       (line  87)
+* ck_abort_msg <1>:                      Convenience Test Functions.
+                                                              (line  23)
+* ck_assert:                             Test a Little.       (line  71)
+* ck_assert <1>:                         Convenience Test Functions.
+                                                              (line  26)
+* ck_assert_double_eq:                   Convenience Test Functions.
+                                                              (line  86)
+* ck_assert_double_eq_tol:               Convenience Test Functions.
+                                                              (line 130)
+* ck_assert_double_finite:               Convenience Test Functions.
+                                                              (line 153)
+* ck_assert_double_ge:                   Convenience Test Functions.
+                                                              (line  91)
+* ck_assert_double_ge_tol:               Convenience Test Functions.
+                                                              (line 133)
+* ck_assert_double_gt:                   Convenience Test Functions.
+                                                              (line  90)
+* ck_assert_double_infinite:             Convenience Test Functions.
+                                                              (line 170)
+* ck_assert_double_le:                   Convenience Test Functions.
+                                                              (line  89)
+* ck_assert_double_le_tol:               Convenience Test Functions.
+                                                              (line 132)
+* ck_assert_double_lt:                   Convenience Test Functions.
+                                                              (line  88)
+* ck_assert_double_nan:                  Convenience Test Functions.
+                                                              (line 187)
+* ck_assert_double_ne:                   Convenience Test Functions.
+                                                              (line  87)
+* ck_assert_double_ne_tol:               Convenience Test Functions.
+                                                              (line 131)
+* ck_assert_double_nonnan:               Convenience Test Functions.
+                                                              (line 203)
+* ck_assert_float_eq:                    Convenience Test Functions.
+                                                              (line  57)
+* ck_assert_float_eq_tol:                Convenience Test Functions.
+                                                              (line 106)
+* ck_assert_float_finite:                Convenience Test Functions.
+                                                              (line 146)
+* ck_assert_float_ge:                    Convenience Test Functions.
+                                                              (line  62)
+* ck_assert_float_ge_tol:                Convenience Test Functions.
+                                                              (line 109)
+* ck_assert_float_gt:                    Convenience Test Functions.
+                                                              (line  61)
+* ck_assert_float_infinite:              Convenience Test Functions.
+                                                              (line 163)
+* ck_assert_float_le:                    Convenience Test Functions.
+                                                              (line  60)
+* ck_assert_float_le_tol:                Convenience Test Functions.
+                                                              (line 108)
+* ck_assert_float_lt:                    Convenience Test Functions.
+                                                              (line  59)
+* ck_assert_float_nan:                   Convenience Test Functions.
+                                                              (line 180)
+* ck_assert_float_ne:                    Convenience Test Functions.
+                                                              (line  58)
+* ck_assert_float_ne_tol:                Convenience Test Functions.
+                                                              (line 107)
+* ck_assert_float_nonnan:                Convenience Test Functions.
+                                                              (line 197)
+* ck_assert_int_eq:                      Test a Little.       (line  60)
+* ck_assert_int_eq <1>:                  Convenience Test Functions.
+                                                              (line  33)
+* ck_assert_int_ge:                      Convenience Test Functions.
+                                                              (line  38)
+* ck_assert_int_gt:                      Convenience Test Functions.
+                                                              (line  37)
+* ck_assert_int_le:                      Convenience Test Functions.
+                                                              (line  36)
+* ck_assert_int_lt:                      Convenience Test Functions.
+                                                              (line  35)
+* ck_assert_int_ne:                      Convenience Test Functions.
+                                                              (line  34)
+* ck_assert_ldouble_eq:                  Convenience Test Functions.
+                                                              (line  96)
+* ck_assert_ldouble_eq_tol:              Convenience Test Functions.
+                                                              (line 138)
+* ck_assert_ldouble_finite:              Convenience Test Functions.
+                                                              (line 158)
+* ck_assert_ldouble_ge:                  Convenience Test Functions.
+                                                              (line 101)
+* ck_assert_ldouble_ge_tol:              Convenience Test Functions.
+                                                              (line 141)
+* ck_assert_ldouble_gt:                  Convenience Test Functions.
+                                                              (line 100)
+* ck_assert_ldouble_infinite:            Convenience Test Functions.
+                                                              (line 175)
+* ck_assert_ldouble_le:                  Convenience Test Functions.
+                                                              (line  99)
+* ck_assert_ldouble_le_tol:              Convenience Test Functions.
+                                                              (line 140)
+* ck_assert_ldouble_lt:                  Convenience Test Functions.
+                                                              (line  98)
+* ck_assert_ldouble_nan:                 Convenience Test Functions.
+                                                              (line 192)
+* ck_assert_ldouble_ne:                  Convenience Test Functions.
+                                                              (line  97)
+* ck_assert_ldouble_ne_tol:              Convenience Test Functions.
+                                                              (line 139)
+* ck_assert_ldouble_nonnan:              Convenience Test Functions.
+                                                              (line 208)
+* ck_assert_mem_eq:                      Convenience Test Functions.
+                                                              (line 261)
+* ck_assert_mem_ge:                      Convenience Test Functions.
+                                                              (line 266)
+* ck_assert_mem_gt:                      Convenience Test Functions.
+                                                              (line 265)
+* ck_assert_mem_le:                      Convenience Test Functions.
+                                                              (line 264)
+* ck_assert_mem_lt:                      Convenience Test Functions.
+                                                              (line 263)
+* ck_assert_mem_ne:                      Convenience Test Functions.
+                                                              (line 262)
+* ck_assert_msg:                         Test a Little.       (line  77)
+* ck_assert_msg <1>:                     Convenience Test Functions.
+                                                              (line  29)
+* ck_assert_pstr_eq:                     Convenience Test Functions.
+                                                              (line 229)
+* ck_assert_pstr_ne:                     Convenience Test Functions.
+                                                              (line 230)
+* ck_assert_ptr_eq:                      Convenience Test Functions.
+                                                              (line 240)
+* ck_assert_ptr_ne:                      Convenience Test Functions.
+                                                              (line 241)
+* ck_assert_ptr_nonnull:                 Convenience Test Functions.
+                                                              (line 251)
+* ck_assert_ptr_null:                    Convenience Test Functions.
+                                                              (line 250)
+* ck_assert_str_eq:                      Test a Little.       (line  60)
+* ck_assert_str_eq <1>:                  Convenience Test Functions.
+                                                              (line 213)
+* ck_assert_str_ge:                      Convenience Test Functions.
+                                                              (line 218)
+* ck_assert_str_gt:                      Convenience Test Functions.
+                                                              (line 217)
+* ck_assert_str_le:                      Convenience Test Functions.
+                                                              (line 216)
+* ck_assert_str_lt:                      Convenience Test Functions.
+                                                              (line 215)
+* ck_assert_str_ne:                      Convenience Test Functions.
+                                                              (line 214)
+* ck_assert_uint_eq:                     Convenience Test Functions.
+                                                              (line  47)
+* ck_assert_uint_ge:                     Convenience Test Functions.
+                                                              (line  52)
+* ck_assert_uint_gt:                     Convenience Test Functions.
+                                                              (line  51)
+* ck_assert_uint_le:                     Convenience Test Functions.
+                                                              (line  50)
+* ck_assert_uint_lt:                     Convenience Test Functions.
+                                                              (line  49)
+* ck_assert_uint_ne:                     Convenience Test Functions.
+                                                              (line  48)
 * CK_DEFAULT_TIMEOUT:                    Test Timeouts.       (line   6)
-* CK_ENV:                                SRunner Output.      (line  42)
-* CK_FORK:                               No Fork Mode.        (line  14)
-* CK_MINIMAL:                            SRunner Output.      (line  31)
-* CK_NORMAL:                             SRunner Output.      (line  35)
-* CK_SILENT:                             SRunner Output.      (line  26)
-* CK_SUBUNIT:                            SRunner Output.      (line  48)
+* CK_ENV:                                SRunner Output.      (line  54)
+* CK_EXCLUDE_TAGS:                       Selecting Tests Based on Arbitrary Tags.
+                                                              (line   6)
+* CK_FORK:                               No Fork Mode.        (line  13)
+* CK_INCLUDE_TAGS:                       Selecting Tests Based on Arbitrary Tags.
+                                                              (line   6)
+* CK_MAX_MSG_SIZE:                       Convenience Test Functions.
+                                                              (line  11)
+* CK_MINIMAL:                            SRunner Output.      (line  43)
+* CK_NORMAL:                             SRunner Output.      (line  47)
+* CK_RUN_CASE:                           Selecting Tests by Suite or Test Case.
+                                                              (line   6)
+* CK_RUN_SUITE:                          Selecting Tests by Suite or Test Case.
+                                                              (line   6)
+* CK_SILENT:                             SRunner Output.      (line  38)
+* CK_SUBUNIT:                            SRunner Output.      (line  60)
 * CK_TIMEOUT_MULTIPLIER:                 Test Timeouts.       (line   6)
-* CK_VERBOSE:                            SRunner Output.      (line  39)
-* CK_VERBOSITY:                          SRunner Output.      (line  42)
-* fail():                                Test a Little.       (line  49)
-* fail_if():                             Test a Little.       (line  59)
-* fail_unless():                         Test a Little.       (line  40)
+* CK_VERBOSE:                            SRunner Output.      (line  51)
+* CK_VERBOSITY:                          SRunner Output.      (line  54)
+* fail:                                  Convenience Test Functions.
+                                                              (line 275)
+* fail_if:                               Convenience Test Functions.
+                                                              (line 278)
+* fail_unless:                           Convenience Test Functions.
+                                                              (line 282)
 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
                                                               (line   6)
 * frameworks:                            Other Frameworks for C.
                                                               (line   6)
 * introduction:                          Introduction.        (line   6)
-* mark_point():                          SRunner Output.      (line 113)
+* mark_point:                            SRunner Output.      (line 156)
 * other frameworks:                      Other Frameworks for C.
                                                               (line   6)
-* srunner_add_suite():                   Multiple Suites in one SRunner.
-                                                              (line  25)
-* srunner_has_xml():                     XML Logging.         (line   6)
-* srunner_run_all():                     SRunner Output.      (line   6)
-* srunner_set_fork_status():             No Fork Mode.        (line  14)
-* srunner_set_log():                     Test Logging.        (line   6)
-* srunner_set_xml():                     XML Logging.         (line   6)
-* srunner_xml_fname():                   XML Logging.         (line   6)
-* tcase_add_checked_fixture():           Test Fixture Examples.
+* srunner_add_suite:                     Multiple Suites in one SRunner.
+                                                              (line  24)
+* srunner_has_tap:                       TAP Logging.         (line   6)
+* srunner_has_xml:                       XML Logging.         (line   6)
+* srunner_run:                           SRunner Output.      (line   6)
+* srunner_run_all:                       SRunner Output.      (line   6)
+* srunner_set_fork_status:               No Fork Mode.        (line  13)
+* srunner_set_log:                       Test Logging.        (line   6)
+* srunner_set_tap:                       TAP Logging.         (line   6)
+* srunner_set_xml:                       XML Logging.         (line   6)
+* srunner_tap_fname:                     TAP Logging.         (line   6)
+* srunner_xml_fname:                     XML Logging.         (line   6)
+* Supported Build Systems:               Supported Build Systems.
+                                                              (line   6)
+* tcase_add_checked_fixture:             Test Fixture Examples.
                                                               (line  13)
-* tcase_add_exit_test():                 Testing Signal Handling and Exit Values.
+* tcase_add_exit_test:                   Testing Signal Handling and Exit Values.
                                                               (line  15)
-* tcase_add_loop_test():                 Looping Tests.       (line  13)
-* tcase_add_test_raise_signal():         Testing Signal Handling and Exit Values.
+* tcase_add_loop_test:                   Looping Tests.       (line  12)
+* tcase_add_test_raise_signal:           Testing Signal Handling and Exit Values.
                                                               (line   6)
-* tcase_set_timeout():                   Test Timeouts.       (line   6)
+* tcase_set_timeout:                     Test Timeouts.       (line   6)
 
 
 \1f
 Tag Table:
-Node: Top\7f768
-Node: Introduction\7f2573
-Node: Unit Testing in C\7f4709
-Node: Other Frameworks for C\7f6478
-Node: Tutorial\7f10265
-Node: How to Write a Test\7f11040
-Node: Setting Up the Money Build\7f11691
-Node: Test a Little\7f16919
-Node: Creating a Suite\7f21486
-Node: SRunner Output\7f25671
-Node: Advanced Features\7f31125
-Node: Running Multiple Cases\7f31727
-Node: No Fork Mode\7f33950
-Node: Test Fixtures\7f34966
-Node: Test Fixture Examples\7f37033
-Node: Checked vs Unchecked Fixtures\7f39195
-Node: Multiple Suites in one SRunner\7f41059
-Node: Testing Signal Handling and Exit Values\7f42719
-Node: Looping Tests\7f43826
-Node: Test Timeouts\7f45538
-Node: Determining Test Coverage\7f46568
-Node: Test Logging\7f49044
-Node: XML Logging\7f50241
-Node: Subunit Support\7f52006
-Node: Conclusion and References\7f53472
-Node: AM_PATH_CHECK\7f54254
-Node: Copying This Manual\7f55694
-Node: GNU Free Documentation License\7f55930
-Node: Index\7f78339
+Node: Top\7f781
+Node: Introduction\7f3101
+Node: Unit Testing in C\7f5236
+Node: Other Frameworks for C\7f7110
+Node: Tutorial\7f11040
+Node: How to Write a Test\7f11924
+Node: Setting Up the Money Build Using Autotools\7f12590
+Node: Setting Up the Money Build Using CMake\7f19694
+Node: Test a Little\7f25898
+Node: Creating a Suite\7f32793
+Node: SRunner Output\7f39020
+Node: Advanced Features\7f47559
+Node: Convenience Test Functions\7f48437
+Node: Running Multiple Cases\7f59369
+Node: No Fork Mode\7f64838
+Node: Test Fixtures\7f65853
+Node: Test Fixture Examples\7f68144
+Node: Checked vs Unchecked Fixtures\7f72406
+Node: Multiple Suites in one SRunner\7f74271
+Node: Selective Running of Tests\7f75917
+Node: Selecting Tests by Suite or Test Case\7f76596
+Node: Selecting Tests Based on Arbitrary Tags\7f77184
+Node: Testing Signal Handling and Exit Values\7f79858
+Node: Looping Tests\7f80961
+Node: Test Timeouts\7f82669
+Node: Determining Test Coverage\7f83826
+Node: Finding Memory Leaks\7f86308
+Node: Test Logging\7f90024
+Node: XML Logging\7f91686
+Node: TAP Logging\7f95906
+Node: Subunit Support\7f97469
+Node: Supported Build Systems\7f98938
+Node: Autotools\7f99386
+Node: CMake\7f101708
+Node: Conclusion and References\7f102069
+Node: Environment Variable Reference\7f102875
+Node: Copying This Manual\7f104712
+Node: GNU Free Documentation License\7f104965
+Node: Index\7f127355
 \1f
 End Tag Table
index 22d419e..0630906 100644 (file)
@@ -13,8 +13,8 @@ This manual is for Check
 (version @value{VERSION}, @value{UPDATED}),
 a unit testing framework for C.
 
-Copyright @copyright{} 2001--2009 Arien Malec, Chris Pickett, Fredrik
-Hugosson, and Robert Lemmen.
+Copyright @copyright{} 2001--2014 Arien Malec, Branden Archer, Chris Pickett,
+Fredrik Hugosson, and Robert Lemmen.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -36,6 +36,7 @@ entitled ``@acronym{GNU} Free Documentation License.''
 @subtitle A Unit Testing Framework for C
 @subtitle for version @value{VERSION}, @value{UPDATED}
 @author Arien Malec 
+@author Branden Archer
 @author Chris Pickett
 @author Fredrik Hugosson
 @author Robert Lemmen
@@ -59,17 +60,18 @@ entitled ``@acronym{GNU} Free Documentation License.''
 Please send corrections to this manual to
 @email{check-devel AT lists.sourceforge.net}.  We'd prefer it if you can
 send a unified diff (@command{diff -u}) against the
-@file{doc/check.texi} file that ships with Check, but something is
-still better than nothing if you can't manage that.
+@file{doc/check.texi} file that ships with Check, but if that is not
+possible something is better than nothing.
 @end ifnottex
 
 @menu
 * Introduction::                
 * Unit Testing in C::           
 * Tutorial::                    
-* Advanced Features::           
+* Advanced Features::
+* Supported Build Systems::
 * Conclusion and References::   
-* AM_PATH_CHECK::               
+* Environment Variable Reference::
 * Copying This Manual::         
 * Index::                       
 
@@ -83,23 +85,27 @@ Unit Testing in C
 Tutorial: Basic Unit Testing
 
 * How to Write a Test::         
-* Setting Up the Money Build::  
+* Setting Up the Money Build Using Autotools::
+* Setting Up the Money Build Using CMake::
 * Test a Little::               
 * Creating a Suite::            
 * SRunner Output::              
 
 Advanced Features
 
+* Convenience Test Functions::  
 * Running Multiple Cases::      
 * No Fork Mode::                
 * Test Fixtures::               
 * Multiple Suites in one SRunner::  
-* Testing Signal Handling and Exit Values::     
+* Selective Running of Tests::
+* Testing Signal Handling and Exit Values::  
 * Looping Tests::               
 * Test Timeouts::               
 * Determining Test Coverage::   
+* Finding Memory Leaks::
 * Test Logging::                
-* Subunit Support::
+* Subunit Support::             
 
 Test Fixtures
 
@@ -109,6 +115,9 @@ Test Fixtures
 Test Logging
 
 * XML Logging::                 
+* TAP Logging::
+
+Environment Variable Reference
 
 Copying This Manual
 
@@ -192,12 +201,13 @@ test framework will happily note a unit test error, and chug along.
 The Check framework is also designed to play happily with common
 development environments for C programming.  The author designed Check
 around Autoconf/Automake (thus the name Check: @command{make check} is
-the idiom used for testing with Autoconf/Automake), and the test
-failure messages thrown up by Check use the common idiom of
-@samp{filename:linenumber:message} used by @command{gcc} and family to
-report problems in source code.  With (X)Emacs, the output of Check
-allows one to quickly navigate to the location of the unit test that
-failed; presumably that also works in VI and IDEs.
+the idiom used for testing with Autoconf/Automake). Note however that
+Autoconf/Automake are NOT necessary to use Check; any build system
+is sufficient. The test failure messages thrown up by Check use the
+common idiom of @samp{filename:linenumber:message} used by @command{gcc}
+and family to report problems in source code.  With (X)Emacs, the output
+of Check allows one to quickly navigate to the location of the unit test
+that failed; presumably that also works in VI and IDEs.
 
 @menu
 * Other Frameworks for C::      
@@ -215,7 +225,7 @@ for C:
 
 @item AceUnit
 AceUnit (Advanced C and Embedded Unit) bills itself as a comfortable C
-code unit test framework.  It tries to mimick JUnit 4.x and includes
+code unit test framework.  It tries to mimic JUnit 4.x and includes
 reflection-like capabilities.  AceUnit can be used in resource
 constraint environments, e.g. embedded software development, and
 importantly it runs fine in environments where you cannot include a
@@ -226,14 +236,13 @@ expressed interest in adding such a feature.  See the
 @uref{http://aceunit.sourceforge.net/, AceUnit homepage}.
 
 @item GNU Autounit
-Much along the same lines as Check, including forking to run unit
-tests in a separate address space (in fact, the original author of
-Check borrowed the idea from @acronym{GNU} Autounit).  @acronym{GNU}
-Autounit uses GLib extensively, which means that linking and such need
-special options, but this may not be a big problem to you, especially
-if you are already using GTK or GLib.  See the
-@uref{http://www.recursism.com/s2004/zp/products/gnu+autounit, GNU
-Autounit homepage}.
+Much along the same lines as Check, including forking to run unit tests
+in a separate address space (in fact, the original author of Check
+borrowed the idea from @acronym{GNU} Autounit).  @acronym{GNU} Autounit
+uses GLib extensively, which means that linking and such need special
+options, but this may not be a big problem to you, especially if you are
+already using GTK or GLib.  See the @uref{http://autounit.tigris.org/,
+GNU Autounit homepage}.
 
 @item cUnit
 Also uses GLib, but does not fork to protect the address space of unit
@@ -247,6 +256,11 @@ currently fork or otherwise protect the address space of unit tests.
 In early development.  See the @uref{http://cunit.sourceforge.net,
 CUnit homepage}.
 
+@item CuTest
+A simple framework with just one .c and one .h file that you drop into
+your source tree.  See the @uref{http://cutest.sourceforge.net, CuTest
+homepage}.
+
 @item CppUnit
 The premier unit testing framework for C++; you can also use it to test C
 code.  It is stable, actively developed, and has a GUI interface.  The
@@ -304,13 +318,14 @@ sure we are constantly thinking about how to test our code.
 
 @menu
 * How to Write a Test::         
-* Setting Up the Money Build::  
+* Setting Up the Money Build Using Autotools::
+* Setting Up the Money Build Using CMake::
 * Test a Little::               
 * Creating a Suite::            
 * SRunner Output::              
 @end menu
 
-@node How to Write a Test, Setting Up the Money Build, Tutorial, Tutorial
+@node How to Write a Test, Setting Up the Money Build Using Autotools, Tutorial, Tutorial
 @section How to Write a Test
 
 Test writing using Check is very simple. The file in which the checks
@@ -337,8 +352,8 @@ structures to permit testing.  It is a mistake to leave off the
 @code{END_TEST} marker; doing so produces all sorts of strange errors
 when the check is compiled.
 
-@node Setting Up the Money Build, Test a Little, How to Write a Test, Tutorial
-@section Setting Up the Money Build
+@node Setting Up the Money Build Using Autotools, Setting Up the Money Build Using CMake, How to Write a Test, Tutorial
+@section Setting Up the Money Build Using Autotools
 
 Since we are creating a library to handle money, we will first create
 an interface in @file{money.h}, an implementation in @file{money.c},
@@ -346,9 +361,10 @@ and a place to store our unit tests, @file{check_money.c}.  We want to
 integrate these core files into our build system, and will need some
 additional structure. To manage everything we'll use Autoconf,
 Automake, and friends (collectively known as Autotools) for this
-example.  One could do something similar with ordinary Makefiles, but
-in the authors' opinion, it is generally easier to use Autotools than
-bare Makefiles, and they provide built-in support for running tests.
+example.  Note that one could do something similar with ordinary
+Makefiles, or any other build system. It is in the authors' opinion that
+it is generally easier to use Autotools than bare Makefiles, and they
+provide built-in support for running tests.
 
 Note that this is not the place to explain how Autotools works.  If
 you need help understanding what's going on beyond the explanations
@@ -386,7 +402,7 @@ We set up a directory structure as follows:
 
 Note that this is the output of @command{tree}, a great directory
 visualization tool.  The top-level @file{Makefile.am} is simple; it
-merely tells Automake how to process subdirectories:
+merely tells Automake how to process sub-directories:
 @example
 @verbatim
 SUBDIRS = src . tests
@@ -396,12 +412,11 @@ SUBDIRS = src . tests
 Note that @code{tests} comes last, because the code should be testing
 an already compiled library.  @file{configure.ac} is standard Autoconf
 boilerplate, as specified by the Autotools tutorial and as suggested
-by @command{autoscan}.  The @code{AM_PATH_CHECK()} is the only line
-particular to Check @pxref{AM_PATH_CHECK}.
+by @command{autoscan}.
 
 @file{src/Makefile.am} builds @samp{libmoney} as a Libtool archive,
 and links it to an application simply called @command{main}.  The
-application's behaviour is not important to this tutorial; what's
+application's behavior is not important to this tutorial; what's
 important is that none of the functions we want to unit test appear in
 @file{main.c}; this probably means that the only function in
 @file{main.c} should be @code{main()} itself.  In order to test the
@@ -413,9 +428,11 @@ system testing tool like Autotest.  If you really want to test
 The primary build instructions for our unit tests are in
 @file{tests/Makefile.am}:
 
+@cartouche
 @example
 @verbatiminclude example/tests/Makefile.am
 @end example
+@end cartouche
 
 @code{TESTS} tells Automake which test programs to run for
 @command{make check}.  Similarly, the @code{check_} prefix in
@@ -433,16 +450,20 @@ Now that all this infrastructure is out of the way, we can get on with
 development.  @file{src/money.h} should only contain standard C header
 boilerplate:
 
+@cartouche
 @example
 @verbatiminclude example/src/money.1.h
 @end example
+@end cartouche
 
 @file{src/money.c} should be empty, and @file{tests/check_money.c}
 should only contain an empty @code{main()} function:
 
+@cartouche
 @example
 @verbatiminclude example/tests/check_money.1.c
 @end example
+@end cartouche
 
 Create the GNU Build System for the project and then build @file{main}
 and @file{libmoney.la} as follows:
@@ -462,14 +483,135 @@ Previously one would use a script called @command{autogen.sh} or
 Now build and run the @command{check_money} test with @command{make
 check}.  If all goes well, @command{make} should report that our tests
 passed.  No surprise, because there aren't any tests to fail.  If you
-have problems, make sure to see @ref{AM_PATH_CHECK}.
+have problems, make sure to see @ref{Supported Build Systems}.
+
+This was tested on the isadora distribution of Linux Mint
+GNU/Linux in November 2012, using Autoconf 2.65, Automake 1.11.1,
+and Libtool 2.2.6b.  Please report any problems to
+@email{check-devel AT lists.sourceforge.net}.
+
+@node Setting Up the Money Build Using CMake, Test a Little, Setting Up the Money Build Using Autotools, Tutorial
+@section Setting Up the Money Build Using CMake
+
+Since we are creating a library to handle money, we will first create
+an interface in @file{money.h}, an implementation in @file{money.c},
+and a place to store our unit tests, @file{check_money.c}.  We want to
+integrate these core files into our build system, and will need some
+additional structure. To manage everything we'll use CMake for this
+example.  Note that one could do something similar with ordinary
+Makefiles, or any other build system. It is in the authors' opinion that
+it is generally easier to use CMake than bare Makefiles, and they
+provide built-in support for running tests.
+
+Note that this is not the place to explain how CMake works.  If
+you need help understanding what's going on beyond the explanations
+here, the best place to start is probably the @uref{http://www.cmake.org,
+CMake project's homepage}.
+
+The examples in this section are part of the Check distribution; you
+don't need to spend time cutting and pasting or (worse) retyping them.
+Locate the Check documentation on your system and look in the
+@samp{example} directory, or look in the Check source. If on a GNU/Linux
+system the standard directory should be @samp{/usr/share/doc/check/example}.
+This directory contains the final version reached the end of the tutorial.  If
+you want to follow along, create backups of @file{money.h},
+@file{money.c}, and @file{check_money.c}, and then delete the originals.
+
+We set up a directory structure as follows:
+@example
+@verbatim
+.
+|-- Makefile.am
+|-- README
+|-- CMakeLists.txt
+|-- cmake
+|   |-- config.h.in
+|   |-- FindCheck.cmake
+|-- src
+|   |-- CMakeLists.txt
+|   |-- main.c
+|   |-- money.c
+|   `-- money.h
+`-- tests
+    |-- CMakeLists.txt
+    `-- check_money.c
+@end verbatim
+@end example
+
+The top-level @file{CMakeLists.txt} contains the configuration checks
+for available libraries and types, and also defines sub-directories
+to process. The @file{cmake/FindCheck.cmake} file contains instructions
+for locating Check on the system and setting up the build to use it.
+If the system does not have pkg-config installed, @file{cmake/FindCheck.cmake}
+may not be able to locate Check successfully. In this case, the install
+directory of Check must be located manually, and the following line
+added to @file{tests/CMakeLists.txt} (assuming Check was installed under
+C:\\Program Files\\check:
+
+@verbatim
+set(CHECK_INSTALL_DIR "C:/Program Files/check")
+@end verbatim
+
+Note that @code{tests} comes last, because the code should be testing
+an already compiled library.
+
+@file{src/CMakeLists.txt} builds @samp{libmoney} as an archive,
+and links it to an application simply called @command{main}.  The
+application's behavior is not important to this tutorial; what's
+important is that none of the functions we want to unit test appear in
+@file{main.c}; this probably means that the only function in
+@file{main.c} should be @code{main()} itself.  In order to test the
+whole application, unit testing is not appropriate: you should use a
+system testing tool like Autotest.  If you really want to test
+@code{main()} using Check, rename it to something like
+@code{_myproject_main()} and write a wrapper around it.
+
+Now that all this infrastructure is out of the way, we can get on with
+development.  @file{src/money.h} should only contain standard C header
+boilerplate:
+
+@cartouche
+@example
+@verbatiminclude example/src/money.1.h
+@end example
+@end cartouche
+
+@file{src/money.c} should be empty, and @file{tests/check_money.c}
+should only contain an empty @code{main()} function:
+
+@cartouche
+@example
+@verbatiminclude example/tests/check_money.1.c
+@end example
+@end cartouche
+
+Create the CMake Build System for the project and then build @file{main}
+and @file{libmoney.la} as follows for Unix-compatible systems:
+@example
+@verbatim
+$ cmake .
+$ make
+@end verbatim
+@end example
 
-This was tested on the i386 ``testing'' distribution of Debian
-GNU/Linux (etch) in March 2006, using Autoconf 2.59, Automake 1.9.6,
-and Libtool 1.5.22.  Please report any problems to
+and for MSVC on Windows:
+@example
+@verbatim
+$ cmake -G "NMake Makefiles" .
+$ nmake
+@end verbatim
+@end example
+
+Now build and run the @command{check_money} test, with either @command{make
+test} on a Unix-compatible system or @command{nmake test} if on Windows using MSVC.
+If all goes well, the command should report that our tests
+passed.  No surprise, because there aren't any tests to fail.
+
+This was tested on Windows 7 using CMake 2.8.12.1 and MSVC 16.00.30319.01/
+Visual Studios 10 in February 2014. Please report any problems to
 @email{check-devel AT lists.sourceforge.net}.
 
-@node Test a Little, Creating a Suite, Setting Up the Money Build, Tutorial
+@node Test a Little, Creating a Suite, Setting Up the Money Build Using CMake, Tutorial
 @section Test a Little, Code a Little
 
 The @uref{http://junit.sourceforge.net/doc/testinfected/testing.htm,
@@ -484,73 +626,86 @@ software development and OO design).
 
 Here are the changes to @file{check_money.c} for our first unit test:
 
+@cartouche
 @example
 @verbatiminclude check_money.1-2.c.diff
 @end example
+@end cartouche
 
-@findex fail_unless()
+@findex ck_assert_int_eq
+@findex ck_assert_str_eq
 A unit test should just chug along and complete.  If it exits early,
 or is signaled, it will fail with a generic error message.  (Note: it
 is conceivable that you expect an early exit, or a signal and there is
 functionality in Check to specifically assert that we should expect a
 signal or an early exit.)  If we want to get some information
-about what failed, we need to use the @code{fail_unless()} function.  The
-function (actually a macro) takes a first Boolean argument, and an error
-message to send if the condition is not true.
-
-@findex fail()
-If the Boolean argument is too complicated to elegantly express within
-@code{fail_unless()}, there is an alternate function @code{fail()}
-that unconditionally fails.  The second test inside
-@code{test_money_create} above could be rewritten as follows:
+about what failed, we need to use some calls that will point out a failure.
+Two such calls are @code{ck_assert_int_eq} (used to determine if two integers
+are equal) and @code{ck_assert_str_eq} (used to determine if two null terminated
+strings are equal). Both of these functions (actually macros) will signal an error 
+if their arguments are not equal.
+
+@findex ck_assert
+An alternative to using @code{ck_assert_int_eq} and @code{ck_assert_str_eq}
+is to write the expression under test directly using @code{ck_assert}.
+This takes one Boolean argument which must be True for the check to pass.
+The second test could be rewritten as follows:
 @example
 @verbatim
-if (strcmp (money_currency (m), "USD") != 0) 
-  {
-    fail ("Currency not set correctly on creation");
-  }
+ck_assert(strcmp (money_currency (m), "USD") == 0);
 @end verbatim
 @end example
 
-@findex fail_if()
-There is also a @code{fail_if()} function, which is the
-inverse of @code{fail_unless()}.  Using it, the above test then
-looks like this:
+@findex ck_assert_msg
+@code{ck_assert} will find and report failures, but will not print any
+user supplied message in the unit test result. To print a user defined
+message along with any failures found, use @code{ck_assert_msg}. The first
+argument is a Boolean argument. The remaining arguments support @code{varargs} 
+and accept @code{printf}-style format strings and arguments.  This is especially
+useful while debugging. For example, the second test could be rewritten as:
 @example
 @verbatim
-fail_if (strcmp (money_currency (m), "USD") != 0,
-         "Currency not set correctly on creation");
+ck_assert_msg(strcmp (money_currency (m), "USD") == 0,
+         "Was expecting a currency of USD, but found %s", money_currency (m));
 @end verbatim
 @end example
 
-For your convenience all fail functions also accepts NULL as the msg
-argument and substitutes a suitable message for you.  So you could also
-write a test as follows:
+@findex ck_abort
+@findex ck_abort_msg
+If the Boolean argument is too complicated to elegantly express within
+@code{ck_assert()}, there are the alternate functions @code{ck_abort()}
+and @code{ck_abort_msg()} that unconditionally fail.  The second test inside
+@code{test_money_create} above could be rewritten as follows:
 @example
 @verbatim
-fail_unless (money_amount (m) == 5, NULL);
+if (strcmp (money_currency (m), "USD") != 0) 
+  {
+    ck_abort_msg ("Currency not set correctly on creation");
+  }
 @end verbatim
 @end example
 
-This is equivalent to:
+For your convenience ck_assert, which does not accept a user supplied message,
+substitutes a suitable message for you. (This is also equivalent to
+passing a NULL message to ck_assert_msg). So you could also
+write a test as follows:
 @example
 @verbatim
-fail_unless (money_amount (m) == 5, 
-             "Assertion 'money_amount (m) == 5' failed");
+ck_assert (money_amount (m) == 5);
 @end verbatim
 @end example
 
-All fail functions also support @code{varargs} and accept
-@code{printf}-style format strings and arguments.  This is especially
-useful while debugging.  With @code{printf}-style formatting the
-message could look like this:
+This is equivalent to:
 @example
 @verbatim
-fail_unless(money_amount (m) == 5,
-            "Amount was %d, instead of 5", money_amount (m));
+ck_assert_msg (money_amount (m) == 5, NULL);
 @end verbatim
 @end example
 
+which will print the file, line number, and the message
+@code{"Assertion 'money_amount (m) == 5' failed"} if
+@code{money_amount (m) != 5}.
+
 When we try to compile and run the test suite now using @command{make
 check}, we get a whole host of compilation errors.  It may seem a bit
 strange to deliberately write code that won't compile, but notice what
@@ -563,9 +718,11 @@ progress, guided by the unit tests, so that's what we will now do.
 
 We will patch our header @file{money.h} as follows:
 
+@cartouche
 @example
 @verbatiminclude money.1-2.h.diff
 @end example
+@end cartouche
 
 Our code compiles now, and again passes all of the tests.  However,
 once we try to @emph{use} the functions in @code{libmoney} in the
@@ -581,9 +738,11 @@ a bit of overhead, but it is mostly one-off.  Here's a diff for the
 new version of @file{check_money.c}.  Note that we include stdlib.h to
 get the definitions of @code{EXIT_SUCCESS} and @code{EXIT_FAILURE}.
 
+@cartouche
 @example
 @verbatiminclude check_money.2-3.c.diff
 @end example
+@end cartouche
 
 Most of the @code{money_suite()} code should be self-explanatory.  We are
 creating a suite, creating a test case, adding the test case to the
@@ -619,11 +778,13 @@ encounter linker errors again we try out @code{make check}.  Try it
 for yourself and see.  The reason is that the @file{money.c}
 implementation of the @file{money.h} interface hasn't been created
 yet.  Let's go with the fastest solution possible and implement stubs
-for each of the functions in @code{money.c}:
+for each of the functions in @code{money.c}. Here is the diff:
 
+@cartouche
 @example
 @verbatiminclude money.1-3.c.diff
 @end example
+@end cartouche
 
 Note that we @code{#include <stdlib.h>} to get the definition of
 @code{NULL}.  Now, the code compiles and links when we run @code{make
@@ -633,23 +794,39 @@ focus on making the test pass.
 @node SRunner Output,  , Creating a Suite, Tutorial
 @section SRunner Output
 
-@findex srunner_run_all()
-The function to run tests in an @code{SRunner} is defined as follows:
+@findex srunner_run_all
+@findex srunner_run
+The functions to run tests in an @code{SRunner} are defined as follows:
 @example
 @verbatim
 void srunner_run_all (SRunner * sr, enum print_output print_mode);
+
+void srunner_run (SRunner *sr, const char *sname, const char *tcname,
+                  enum print_output print_mode);
 @end verbatim
 @end example
 
-This function does two things:
+Those functions do two things:
 
 @enumerate
 @item
-It runs all of the unit tests for all of the test cases defined for all
-of the suites in the SRunner, and collects the results in the SRunner
+They run all of the unit tests for the selected test cases defined for
+the selected suites in the SRunner, and collect the results in the
+SRunner.  The determination of the selected test cases and suites
+depends on the specific function used.
+
+@code{srunner_run_all} will run all the defined test cases of all
+defined suites except if the environment variables @code{CK_RUN_CASE}
+or @code{CK_RUN_SUITE} are defined.  If defined, those variables shall
+contain the name of a test suite or a test case, defining in that way
+the selected suite/test case.
+
+@code{srunner_run} will run the suite/case selected by the
+@code{sname} and @code{tcname} parameters.  A value of @code{NULL}
+in some of those parameters means ``any suite/case''.
 
 @item
-It prints the results according to the @code{print_mode} specified.
+They print the results according to the @code{print_mode} specified.
 @end enumerate
 
 For SRunners that have already been run, there is also a separate
@@ -699,22 +876,26 @@ subunit} test runner protocol. See 'subunit support' under the Advanced Features
 @end table
 
 With the @code{CK_NORMAL} flag specified in our @code{main()}, let's
-rerun make check now. As before, we get the following satisfying
-output:
+rerun @code{make check} now. The output from the unit test is as follows:
 @example
 @verbatim
 Running suite(s): Money
-0%: Checks: 1, Failures: 1, Errors: 0 
-check_money.c:10:F:Core:test_money_create: Amount not set correctly on
-creation
+0%: Checks: 1, Failures: 1, Errors: 0
+check_money.c:9:F:Core:test_money_create:0: Assertion 'money_amount (m)==5' failed: 
+money_amount (m)==0, 5==5
 FAIL: check_money
-==================================================
-1 of 1 tests failed
-Please report to check-devel@lists.sourceforge.net
-==================================================
+=====================================================
+1 of 1 test failed
+Please report to check-devel AT lists.sourceforge.net
+=====================================================
 @end verbatim
 @end example
 
+Note that the output from @code{make check} prior to Automake 1.13 will
+be the output of the unit test program. Starting with 1.13 Automake will
+run all unit test programs concurrently and store the output in
+log files. The output listed above should be present in a log file.
+
 The first number in the summary line tells us that 0% of our tests
 passed, and the rest of the line tells us that there was one check in
 total, and of those checks, one failure and zero errors.  The next
@@ -729,9 +910,11 @@ Let's implement the @code{money_amount} function, so that it will pass
 its tests.  We first have to create a Money structure to hold the
 amount, and then implement the function to return the correct amount:
 
+@cartouche
 @example
 @verbatiminclude money.3-4.c.diff
 @end example
+@end cartouche
 
 We will now rerun make check and@dots{} what's this?  The output is
 now as follows:
@@ -739,21 +922,22 @@ now as follows:
 @verbatim
 Running suite(s): Money
 0%: Checks: 1, Failures: 0, Errors: 1
-check_money.c:5:E:Core:test_money_create: (after this point) Received
-signal 11 (Segmentation fault)
+check_money.c:5:E:Core:test_money_create:0: (after this point) 
+Received signal 11 (Segmentation fault)
 @end verbatim
 @end example
 
-@findex mark_point()
+@findex mark_point
 What does this mean?  Note that we now have an error, rather than a
 failure.  This means that our unit test either exited early, or was
 signaled.  Next note that the failure message says ``after this
 point''; This means that somewhere after the point noted
 (@file{check_money.c}, line 5) there was a problem: signal 11 (a.k.a.
 segmentation fault).  The last point reached is set on entry to the
-unit test, and after every call to @code{fail_unless()},
-@code{fail()}, or the special function @code{mark_point()}.  For
-example, if we wrote some test code as follows:
+unit test, and after every call to the @code{ck_assert()},
+@code{ck_abort()}, @code{ck_assert_int_*()}, @code{ck_assert_str_*()}, 
+or the special function @code{mark_point()}.  For example, if we wrote some test 
+code as follows:
 @example
 @verbatim
 stuff_that_works ();
@@ -767,33 +951,329 @@ then the point returned will be that marked by @code{mark_point()}.
 The reason our test failed so horribly is that we haven't implemented
 @code{money_create()} to create any @code{Money}.  We'll go ahead and
 implement that, the symmetric @code{money_free()}, and
-@code{money_currency()} too, in order to make our unit test pass again:
+@code{money_currency()} too, in order to make our unit test pass again,
+here is a diff:
 
+@cartouche
 @example
 @verbatiminclude money.4-5.c.diff
 @end example
+@end cartouche
 
-@node Advanced Features, Conclusion and References, Tutorial, Top
+@node Advanced Features, Supported Build Systems, Tutorial, Top
 @chapter Advanced Features
 
 What you've seen so far is all you need for basic unit testing.  The
 features described in this section are additions to Check that make it
-easier for the developer to write, run, and analyse tests.
+easier for the developer to write, run, and analyze tests.
 
 @menu
+* Convenience Test Functions::  
 * Running Multiple Cases::      
 * No Fork Mode::                
 * Test Fixtures::               
 * Multiple Suites in one SRunner::  
-* Testing Signal Handling and Exit Values::     
+* Selective Running of Tests::
+* Selecting Tests by Suite or Test Case::
+* Selecting Tests Based on Arbitrary Tags::
+* Testing Signal Handling and Exit Values::  
 * Looping Tests::               
 * Test Timeouts::               
 * Determining Test Coverage::   
+* Finding Memory Leaks::
 * Test Logging::                
-* Subunit Support::
+* Subunit Support::             
 @end menu
 
-@node Running Multiple Cases, No Fork Mode, Advanced Features, Advanced Features
+@node Convenience Test Functions, Running Multiple Cases, Advanced Features, Advanced Features
+@section Convenience Test Functions
+
+Using the @code{ck_assert} function for all tests can lead to lot of
+repetitive code that is hard to read.  For your convenience Check
+provides a set of functions (actually macros) for testing often used
+conditions.
+
+@findex check_set_max_msg_size
+@vindex CK_MAX_MSG_SIZE
+The typical size of an assertion message is less than 80 bytes.
+However, some of the functions listed below can generate very large messages
+(up to 4GB allocations were seen in the wild).
+To prevent this, a limit is placed on the assertion message size.
+This limit is 4K bytes by default.
+It can be modified by setting the @code{CK_MAX_MSG_SIZE} environment variable,
+or, if it is not set, by invoking the @code{check_set_max_msg_size()} function.
+If used, this function must be called, once, before the first assertion.
+
+@ftable @code
+@item ck_abort
+Unconditionally fails test with default message.
+
+@item ck_abort_msg
+Unconditionally fails test with user supplied message.
+
+@item ck_assert
+Fails test if supplied condition evaluates to false.
+
+@item ck_assert_msg
+Fails test if supplied condition evaluates to false and displays user
+provided message.
+
+@item ck_assert_int_eq
+@itemx ck_assert_int_ne
+@itemx ck_assert_int_lt
+@itemx ck_assert_int_le
+@itemx ck_assert_int_gt
+@itemx ck_assert_int_ge
+
+Compares two signed integer values (@code{intmax_t}) and displays a predefined
+message with both the condition and input parameters on failure.  The
+operator used for comparison is different for each function and is indicated
+by the last two letters of the function name.  The abbreviations @code{eq},
+@code{ne}, @code{lt}, @code{le}, @code{gt}, and @code{ge} correspond to
+@code{==}, @code{!=}, @code{<}, @code{<=}, @code{>}, and @code{>=}
+respectively.
+
+@item ck_assert_uint_eq
+@itemx ck_assert_uint_ne
+@itemx ck_assert_uint_lt
+@itemx ck_assert_uint_le
+@itemx ck_assert_uint_gt
+@itemx ck_assert_uint_ge
+
+Similar to @code{ck_assert_int_*}, but compares two unsigned integer values
+(@code{uintmax_t}) instead.
+
+@item ck_assert_float_eq
+@itemx ck_assert_float_ne
+@itemx ck_assert_float_lt
+@itemx ck_assert_float_le
+@itemx ck_assert_float_gt
+@itemx ck_assert_float_ge
+
+Compares two floating point numbers (@code{float}) and displays a predefined
+message with both the condition and input parameters on failure.
+The operator used for comparison is different for each function
+and is indicated by the last two letters of the function name. 
+The abbreviations @code{eq}, @code{ne}, @code{lt}, @code{le}, @code{gt},
+and @code{ge} correspond to @code{==}, @code{!=}, @code{<}, @code{<=}, @code{>},
+and @code{>=} respectively.
+Beware using those operators for floating point numbers because of precision
+possible loss on every operation on floating point numbers. For example
+(1/3)*3==1 would return false, because 1/3==1.333... (or 1.(3) notation
+in Europe) and cannot be represented by computer logic. As another example
+1.1f in fact could be 1.10000002384185791015625 and 2.1f could be
+2.099999904632568359375 because of binary representation of floating
+point numbers.
+If you have different mathematical operations used on floating point numbers
+consider using precision comparisons or integer numbers instead. But in some
+cases those operators could be used. For example if you cyclically increment
+your floating point number only by positive or only by negative values than
+you may use @code{<}, @code{<=}, @code{>} and @code{>=} operators in tests.
+If your computations must end up with a certain value than @code{==} and
+@code{!=} operators may be used.
+
+@item ck_assert_double_eq
+@itemx ck_assert_double_ne
+@itemx ck_assert_double_lt
+@itemx ck_assert_double_le
+@itemx ck_assert_double_gt
+@itemx ck_assert_double_ge
+
+Similar to @code{ck_assert_float_*}, but compares two double precision
+floating point values (@code{double}) instead.
+
+@item ck_assert_ldouble_eq
+@itemx ck_assert_ldouble_ne
+@itemx ck_assert_ldouble_lt
+@itemx ck_assert_ldouble_le
+@itemx ck_assert_ldouble_gt
+@itemx ck_assert_ldouble_ge
+
+Similar to @code{ck_assert_float_*}, but compares two double precision
+floating point values (@code{long double}) instead.
+
+@item ck_assert_float_eq_tol
+@itemx ck_assert_float_ne_tol
+@itemx ck_assert_float_le_tol
+@itemx ck_assert_float_ge_tol
+
+Compares two floating point numbers (@code{float}) with specified user tolerance
+set by the third parameter (@code{float}) and displays a predefined message
+with both the condition and input parameters on failure.
+The abbreviations @code{eq}, @code{ne}, @code{le}, and @code{ge} correspond
+to @code{==}, @code{!=}, @code{<=}, and @code{>=} respectively with acceptable
+error (tolerance) specified by the last parameter.
+Beware using those functions for floating comparisons because of
+(1) errors coming from floating point number representation,
+(2) rounding errors,
+(3) floating point errors are platform dependent.
+Floating point numbers are often internally represented in binary
+so they cannot be exact power of 10. All these operators have significant
+error in comparisons so use them only if you know what you're doing.
+Some assertions could fail on one platform and would be passed on another.
+For example expression @code{0.02<=0.01+10^-2} is true by meaning,
+but some platforms may calculate it as false. IEEE 754 standard specifies
+the floating point number format representation but it does not promise that
+the same computation carried out on all hardware will produce the same result.
+
+@item ck_assert_double_eq_tol
+@itemx ck_assert_double_ne_tol
+@itemx ck_assert_double_le_tol
+@itemx ck_assert_double_ge_tol
+
+Similar to @code{ck_assert_float_*_tol}, but compares two double precision
+floating point values (@code{double}) instead.
+
+@item ck_assert_ldouble_eq_tol
+@itemx ck_assert_ldouble_ne_tol
+@itemx ck_assert_ldouble_le_tol
+@itemx ck_assert_ldouble_ge_tol
+
+Similar to @code{ck_assert_float_*_tol}, but compares two double precision
+floating point values (@code{long double}) instead.
+
+@item ck_assert_float_finite
+
+Checks that a floating point number (@code{float}) is finite and displays
+a predefined message with both the condition and input parameter on failure.
+Finite means that value cannot be positive infinity, negative infinity
+or NaN ("Not a Number").
+
+@item ck_assert_double_finite
+
+Similar to @code{ck_assert_float_finite}, but checks double precision
+floating point value (@code{double}) instead.
+
+
+@item ck_assert_ldouble_finite
+
+Similar to @code{ck_assert_float_finite}, but checks double precision
+floating point value (@code{long double}) instead.
+
+@item ck_assert_float_infinite
+
+Checks that a floating point number (@code{float}) is infinite and displays
+a predefined message with both the condition and input parameter on failure.
+Infinite means that value may only be positive infinity or negative infinity.
+
+@item ck_assert_double_infinite
+
+Similar to @code{ck_assert_float_infinite}, but checks double precision
+floating point value (@code{double}) instead.
+
+@item ck_assert_ldouble_infinite
+
+Similar to @code{ck_assert_float_infinite}, but checks double precision
+floating point value (@code{long double}) instead.
+
+@item ck_assert_float_nan
+
+Checks that a floating point number (@code{float}, @code{double} or
+@code{long double} abbreviated as @code{ldouble}) is NaN ("Not a Number")
+and displays a predefined message with both the condition and input parameter
+on failure.
+
+@item ck_assert_double_nan
+
+Similar to @code{ck_assert_float_nan}, but checks double precision
+floating point value (@code{double}) instead.
+
+@item ck_assert_ldouble_nan
+
+Similar to @code{ck_assert_float_nan}, but checks double precision
+floating point value (@code{long double}) instead.
+
+@item ck_assert_float_nonnan
+
+Checks that a floating point number (@code{float}) is not NaN ("Not a Number")
+and displays a predefined message with both the condition and input parameter
+on failure.
+
+@item ck_assert_double_nonnan
+
+Similar to @code{ck_assert_float_nonnan}, but checks double precision
+floating point value (@code{double}) instead.
+
+@item ck_assert_ldouble_nonnan
+
+Similar to @code{ck_assert_float_nonnan}, but checks double precision
+floating point value (@code{long double}) instead.
+
+
+@item ck_assert_str_eq
+@itemx ck_assert_str_ne
+@itemx ck_assert_str_lt
+@itemx ck_assert_str_le
+@itemx ck_assert_str_gt
+@itemx ck_assert_str_ge
+
+Compares two null-terminated @code{char *} string values, using the
+@code{strcmp()} function internally, and displays predefined message
+with condition and input parameter values on failure. The comparison
+operator is again indicated by last two letters of the function name.
+@code{ck_assert_str_lt(a, b)} will pass if the unsigned numerical value
+of the character string @code{a} is less than that of @code{b}.
+If a NULL pointer is be passed to any comparison macro the check will fail.
+
+@item ck_assert_pstr_eq
+@itemx ck_assert_pstr_ne
+
+Similar to @code{ck_assert_str_*} macros, but able to check undefined strings.
+If a NULL pointer would be passed to a comparison macro it would mean that
+a string is undefined. If both strings are undefined @code{ck_assert_pstr_eq}
+would pass, but @code{ck_assert_pstr_ne} would fail. If only one of strings is
+undefined @code{ck_assert_pstr_eq} macro would fail and @code{ck_assert_pstr_ne}
+would pass.
+
+@item ck_assert_ptr_eq
+@itemx ck_assert_ptr_ne
+
+Compares two pointers and displays predefined message with
+condition and values of both input parameters on failure.  The operator
+used for comparison is different for each function and is indicated by
+the last two letters of the function name.  The abbreviations @code{eq} and
+@code{ne} correspond to @code{==} and @code{!=} respectively.
+
+@item ck_assert_ptr_null
+@itemx ck_assert_ptr_nonnull
+
+Compares a pointers against null and displays predefined message with
+condition and value of the input parameter on failure.
+@code{ck_assert_ptr_null} checks that pointer is equal to NULL and
+@code{ck_assert_ptr_nonnull} checks that pointer is not equal to NULL.
+@code{ck_assert_ptr_nonnull} is highly recommended to use in situations
+when a function call can return NULL as error indication (like functions
+that use malloc, calloc, strdup, mmap, etc).
+
+@item ck_assert_mem_eq
+@itemx ck_assert_mem_ne
+@itemx ck_assert_mem_lt
+@itemx ck_assert_mem_le
+@itemx ck_assert_mem_gt
+@itemx ck_assert_mem_ge
+
+Compares contents of two memory locations of the given length, using the
+@code{memcmp()} function internally, and displays predefined message
+with condition and input parameter values on failure.  The comparison
+operator is again indicated by last two letters of the function name.
+@code{ck_assert_mem_lt(a, b)} will pass if the unsigned numerical value
+of memory location @code{a} is less than that of @code{b}.
+
+@item fail
+(Deprecated) Unconditionally fails test with user supplied message.
+
+@item fail_if
+(Deprecated) Fails test if supplied condition evaluates to true and
+displays user provided message.
+
+@item fail_unless
+(Deprecated) Fails test if supplied condition evaluates to false and
+displays user provided message.
+
+
+@end ftable
+
+@node Running Multiple Cases, No Fork Mode, Convenience Test Functions, Advanced Features
 @section Running Multiple Cases
 
 What happens if we pass @code{-1} as the @code{amount} in
@@ -803,18 +1283,22 @@ we create @code{Money} where @code{amount == 0}.  Let's put these in a
 separate test case called ``Limits'' so that @code{money_suite} is
 changed like so:
 
+@cartouche
 @example
 @verbatiminclude check_money.3-6.c.diff
 @end example
+@end cartouche
 
 Now we can rerun our suite, and fix the problem(s). Note that errors
 in the ``Core'' test case will be reported as ``Core'', and errors in
 the ``Limits'' test case will be reported as ``Limits'', giving you
 additional information about where things broke.
 
+@cartouche
 @example
 @verbatiminclude money.5-6.c.diff
 @end example
+@end cartouche
 
 @node No Fork Mode, Test Fixtures, Running Multiple Cases, Advanced Features
 @section No Fork Mode
@@ -828,7 +1312,7 @@ tools.  To define fork mode for an @code{SRunner} object, you can do
 one of the following:
 
 @vindex CK_FORK
-@findex srunner_set_fork_status()
+@findex srunner_set_fork_status
 @enumerate
 @item
 Define the CK_FORK environment variable to equal ``no''.
@@ -869,7 +1353,7 @@ function is run, if defined. After each unit test, the
 @code{teardown()} function is run, if defined.  Since they run inside
 the forked address space, if checked fixtures signal or otherwise
 fail, they will be caught and reported by the @code{SRunner}.  A
-checked @code{teardown()} fixture will run even if the unit test
+checked @code{teardown()} fixture will not run if the unit test
 fails.
 
 @item Unchecked fixtures
@@ -877,9 +1361,12 @@ are run in the same address space as the test program. Therefore they
 may not signal or exit, but may use the fail functions. The unchecked
 @code{setup()}, if defined, is run before the test case is
 started. The unchecked @code{teardown()}, if defined, is run after the
-test case is done.
+test case is done. An unchecked @code{teardown()} fixture will run even
+if a unit test fails.
 @end table
 
+An important  difference is that the checked fixtures are run once per
+unit test and the unchecked fixtures are run once per test case.
 So for a test case that contains @code{check_one()} and
 @code{check_two()} unit tests,
 @code{checked_setup()}/@code{checked_teardown()} checked fixtures, and
@@ -920,7 +1407,7 @@ In our example, we'll make @code{five_dollars} be a global created and
 freed by @code{setup()} and @code{teardown()} respectively.
 
 @item
-@findex tcase_add_checked_fixture()     
+@findex tcase_add_checked_fixture 
 Add the @code{setup()} and @code{teardown()} functions to the test
 case with @code{tcase_add_checked_fixture()}.  In our example, this
 belongs in the suite setup function @code{money_suite}.
@@ -933,11 +1420,13 @@ Rewrite tests to use the globals.  We'll rewrite our first to use
 Note that the functions used for setup and teardown do not need to be
 named @code{setup()} and @code{teardown()}, but they must take
 @code{void} and return @code{void}.  We'll update @file{check_money.c}
-as follows:
+with the following patch:
 
+@cartouche
 @example
 @verbatiminclude check_money.6-7.c.diff
 @end example
+@end cartouche
 
 @node Checked vs Unchecked Fixtures,  , Test Fixture Examples, Test Fixtures
 @subsection Checked vs Unchecked Fixtures
@@ -966,7 +1455,7 @@ effects, since the @code{setup()} is run before each unit test.  There
 is an exception for side effects to the total environment in which the
 test program lives: for example, if the @code{setup()} function
 initializes a file that a unit test then changes, the combination of
-the @code{teardown()} function and @code{setup()} fuction must be able
+the @code{teardown()} function and @code{setup()} function must be able
 to restore the environment for the next unit test.
 
 If the @code{setup()} function in a fixture fails, in either checked
@@ -974,7 +1463,7 @@ or unchecked fixtures, the unit tests for the test case, and the
 @code{teardown()} function for the fixture will not be run.  A fixture
 error will be created and reported to the @code{SRunner}.
 
-@node Multiple Suites in one SRunner, Testing Signal Handling and Exit Values, Test Fixtures, Advanced Features
+@node Multiple Suites in one SRunner, Selective Running of Tests, Test Fixtures, Advanced Features
 @section Multiple Suites in one SRunner
 
 In a large program, it will be convenient to create multiple suites,
@@ -999,7 +1488,7 @@ Suite *make_pack_suite (void);
 @end verbatim
 @end example
 
-@findex srunner_add_suite()
+@findex srunner_add_suite
 The function @code{srunner_add_suite()} is used to add additional
 suites to an @code{SRunner}.  Here is the code that sets up and runs
 the @code{SRunner} in the @code{main()} function in
@@ -1018,10 +1507,110 @@ srunner_add_suite (sr, make_pack_suite ());
 @end verbatim
 @end example
 
-@node Testing Signal Handling and Exit Values, Looping Tests, Multiple Suites in one SRunner, Advanced Features
+@node Selective Running of Tests, Testing Signal Handling and Exit Values, Multiple Suites in one SRunner, Advanced Features
+
+@section Selective Running of Tests
+
+After adding a couple of suites and some test cases in each, it is
+sometimes practical to be able to run only one suite, or one specific
+test case, without recompiling the test code.  Check provides two ways
+to accomplish this, either by specifying a suite or test case by name
+or by assigning tags to test cases and specifying one or more tags to
+run.
+
+@menu
+* Selecting Tests by Suite or Test Case::
+* Selecting Tests Based on Arbitrary Tags::
+@end menu
+
+@node Selecting Tests by Suite or Test Case, Selecting Tests Based on Arbitrary Tags, Selective Running of Tests, Selective Running of Tests
+@subsection Selecting Tests by Suite or Test Case
+
+@vindex CK_RUN_SUITE
+@vindex CK_RUN_CASE
+
+There are two environment variables available that offer this
+ability, @code{CK_RUN_SUITE} and @code{CK_RUN_CASE}. Just set the
+value to the name of the suite and/or test case you want to run. These
+environment variables can also be a good integration tool for running
+specific tests from within another tool, e.g. an IDE.
+
+@node Selecting Tests Based on Arbitrary Tags, ,Selecting Tests by Suite or Test Case, Selective Running of Tests
+@subsection Selecting Tests Based on Arbitrary Tags
+
+@vindex CK_INCLUDE_TAGS
+@vindex CK_EXCLUDE_TAGS
+
+It can be useful to dynamically include or exclude groups of tests to
+be run based on criteria other than the suite or test case name. For
+example, one or more tags can be assigned to test cases. The tags
+could indicate if a test runs for a long time, so such tests could be
+excluded in order to run quicker tests for a sanity
+check. Alternately, tags may be used to indicate which functional
+areas test cover. Tests can then be run that include all test cases
+for a given set of functional areas.
+
+In Check, a tag is a string of characters without white space. One or
+more tags can be assigned to a test case by using the
+@code{tcase_set_tags} function. This function accepts a string, and
+multiple tags can be specified by delimiting them with spaces. For
+example:
+
+@example
+@verbatim
+    Suite *s;
+
+    TCase *red, *blue, *purple, *yellow, *black;
+
+    s = suite_create("Check Tag Filtering");
+
+    red = tcase_create("Red");
+    tcase_set_tags(red, "Red");
+    suite_add_tcase (s, red);
+    tcase_add_test(red, red_test1);
+
+    blue = tcase_create("Blue");
+    tcase_set_tags(blue, "Blue");
+    suite_add_tcase (s, blue);
+    tcase_add_test(blue, blue_test1);
+
+    purple = tcase_create("Purple");
+    tcase_set_tags(purple, "Red Blue");
+    suite_add_tcase (s, purple);
+    tcase_add_test(purple, purple_test1);
+
+@end verbatim
+@end example
+
+Once test cases are tagged they may be selectively run in one of two ways:
+
+a) Using Environment Variables
+
+There are two environment variables available for selecting test cases
+based on tags: @code{CK_INCLUDE_TAGS} and
+@code{CK_EXCLUDE_TAGS}. These can be set to a space separated list of
+tag names. If @code{CK_INCLUDE_TAGS} is set then test cases which
+include at least one tag in common with @code{CK_INCLUDE_TAGS} will be
+run. If @code{CK_EXCLUDE_TAGS} is set then test cases with one tag in
+common with @code{CK_EXCLUDE_TAGS} will not be run. In cases where
+both @code{CK_INCLUDE_TAGS} and @code{CK_EXCLUDE_TAGS} match a tag for
+a test case the test will be excluded.
+
+Both @code{CK_INCLUDE_TAGS} and @code{CK_EXCLUDE_TAGS} can be
+specified in conjunction with @code{CK_RUN_SUITE} or even
+@code{CK_RUN_CASE} in which case they will have the effect of further
+narrowing the selection.
+
+b) Programmatically
+
+The @code{srunner_run_tagged} function allows one to specify which
+tags to run or exclude from a suite runner. This can be used to
+programmatically control which test cases may run.
+
+@node Testing Signal Handling and Exit Values, Looping Tests, Selective Running of Tests, Advanced Features
 @section Testing Signal Handling and Exit Values
 
-@findex tcase_add_test_raise_signal()
+@findex tcase_add_test_raise_signal
 
 To enable testing of signal handling, there is a function
 @code{tcase_add_test_raise_signal()} which is used instead of
@@ -1032,7 +1621,7 @@ is received this is logged as an error.
 
 The signal handling functionality only works in CK_FORK mode.
 
-@findex tcase_add_exit_test()
+@findex tcase_add_exit_test
 
 To enable testing of expected exits, there is a function
 @code{tcase_add_exit_test()} which is used instead of @code{tcase_add_test()}.
@@ -1053,7 +1642,7 @@ first error will be shown before the test exits.  However, looping
 tests allow for all errors to be shown at once, which can help out
 with debugging.
 
-@findex tcase_add_loop_test()
+@findex tcase_add_loop_test
 Adding a normal test with @code{tcase_add_loop_test()} instead of
 @code{tcase_add_test()} will make the test function the body of a
 @code{for} loop, with the addition of a fork before each call.  The
@@ -1083,7 +1672,7 @@ static const int primes[5] = {2,3,5,7,11};
 
 START_TEST (check_is_prime)
 {
-  fail_unless (is_prime (primes[_i]));
+  ck_assert (is_prime (primes[_i]));
 }
 END_TEST
 
@@ -1099,7 +1688,7 @@ forking.  This means that only the first error will be shown.
 @node Test Timeouts, Determining Test Coverage, Looping Tests, Advanced Features
 @section Test Timeouts
 
-@findex tcase_set_timeout()
+@findex tcase_set_timeout
 @vindex CK_DEFAULT_TIMEOUT
 @vindex CK_TIMEOUT_MULTIPLIER
 To be certain that a test won't hang indefinitely, all tests are run
@@ -1115,11 +1704,12 @@ length is to use the @code{CK_TIMEOUT_MULTIPLIER} environment variable,
 which multiplies all timeouts, including those set with
 @code{tcase_set_timeout()}, with the supplied integer value. All timeout
 arguments are in seconds and a timeout of 0 seconds turns off the timeout
-functionality.
+functionality. On systems that support it, the timeout can be specified
+using a nanosecond precision. Otherwise, second precision is used.
 
 Test timeouts are only available in CK_FORK mode.
 
-@node Determining Test Coverage, Test Logging, Test Timeouts, Advanced Features
+@node Determining Test Coverage, Finding Memory Leaks, Test Timeouts, Advanced Features
 @section Determining Test Coverage
 
 The term @dfn{code coverage} refers to the extent that the statements
@@ -1187,10 +1777,105 @@ how determining test coverage generally works, and how it can help
 you.  For more information or help with other compilers, please refer
 to the relevant manuals.
 
-@node Test Logging, Subunit Support, Determining Test Coverage, Advanced Features
+@node Finding Memory Leaks, Test Logging, Determining Test Coverage, Advanced Features
+@section Finding Memory Leaks
+
+It is possible to determine if any code under test leaks memory during
+a test. Check itself does not have an API for memory leak detection,
+however Valgrind can be used against a unit testing program to search
+for potential leaks.
+
+Before discussing memory leak detection, first a "memory leak" should be
+better defined. There are two primary definitions of a memory leak:
+
+@enumerate
+@item
+Memory that is allocated but not freed before a program terminates.
+However, it was possible for the program to free the memory if it had
+wanted to. Valgrind refers to these as "still reachable" leaks.
+@item
+Memory that is allocated, and any reference to the memory is lost.
+The program could not have freed the memory. Valgrind refers to these
+as "definitely lost" leaks.
+@end enumerate
+
+Valgrind uses the second definition by default when defining a memory leak.
+These leaks are the ones which are likely to cause a program issues due
+to heap depletion.
+
+If one wanted to run Valgrind against a unit testing program to determine
+if leaks are present, the following invocation of Valgrind will work:
+
+@example
+@verbatim
+valgrind --leak-check=full ${UNIT_TEST_PROGRAM}
+...
+==3979== LEAK SUMMARY:
+==3979==    definitely lost: 0 bytes in 0 blocks
+==3979==    indirectly lost: 0 bytes in 0 blocks
+==3979==      possibly lost: 0 bytes in 0 blocks
+==3979==    still reachable: 548 bytes in 24 blocks
+==3979==         suppressed: 0 bytes in 0 blocks
+@end verbatim
+@end example
+
+In that example, there were no "definitely lost" memory leaks found.
+However, why would there be such a large number of "still reachable"
+memory leaks? It turns out this is a consequence of using @code{fork()}
+to run a unit test in its own process memory space, which Check does by
+default on platforms with @code{fork()} available.
+
+Consider the example where a unit test program creates one suite with
+one test. The flow of the program will look like the following:
+
+@example
+@b{Main process:}       @b{Unit test process:}
+create suite
+srunner_run_all()
+   fork unit test     unit test process created
+   wait for test      start test
+   ...                end test
+   ...                exit(0)
+   test complete
+report result
+free suite
+exit(0)
+@end example
+
+The unit testing process has a copy of all memory that the main process
+allocated. In this example, that would include the suite allocated in
+main. When the unit testing process calls @code{exit(0)}, the suite
+allocated in @code{main()} is reachable but not freed. As the unit test
+has no reason to do anything besides die when its test is finished, and
+it has no reasonable way to free everything before it dies, Valgrind
+reports that some memory is still reachable but not freed.
+
+If the "still reachable" memory leaks are a concern, and one required that
+the unit test program report that there were no memory leaks regardless
+of the type, then the unit test program needs to run without fork. To
+accomplish this, either define the @code{CK_FORK=no} environment variable,
+or use the @code{srunner_set_fork_status()} function to set the fork mode
+as @code{CK_NOFORK} for all suite runners.
+
+Running the same unit test program by disabling @code{fork()} results
+in the following:
+
+@example
+@verbatim
+CK_FORK=no valgrind --leak-check=full ${UNIT_TEST_PROGRAM}
+...
+==4924== HEAP SUMMARY:
+==4924==     in use at exit: 0 bytes in 0 blocks
+==4924==   total heap usage: 482 allocs, 482 frees, 122,351 bytes allocated
+==4924== 
+==4924== All heap blocks were freed -- no leaks are possible
+@end verbatim
+@end example
+
+@node Test Logging, Subunit Support, Finding Memory Leaks, Advanced Features
 @section Test Logging
 
-@findex srunner_set_log()
+@findex srunner_set_log
 Check supports an operation to log the results of a test run.  To use
 test logging, call the @code{srunner_set_log()} function with the name
 of the log file you wish to create:
@@ -1223,16 +1908,28 @@ Results for all suites run:
 @end verbatim
 @end example
 
+Another way to enable test logging is to use the @code{CK_LOG_FILE_NAME}
+environment variable. When set tests will be logged to the specified file name.
+If log file is specified with both @code{CK_LOG_FILE_NAME} and
+@code{srunner_set_log()}, the name provided to @code{srunner_set_log()} will
+be used.
+
+If the log name is set to "-" either via @code{srunner_set_log()} or
+@code{CK_LOG_FILE_NAME}, the log data will be printed to stdout instead
+of to a file.
+
+
 @menu
 * XML Logging::                 
+* TAP Logging::
 @end menu
 
 @node XML Logging,  , Test Logging, Test Logging
 @subsection XML Logging
 
-@findex srunner_set_xml()
-@findex srunner_has_xml()
-@findex srunner_xml_fname()
+@findex srunner_set_xml
+@findex srunner_has_xml
+@findex srunner_xml_fname
 The log can also be written in XML.  The following functions define
 the interface for XML logs:
 @example
@@ -1243,34 +1940,40 @@ const char *srunner_xml_fname (SRunner *sr);
 @end verbatim
 @end example
 
-The only thing you need to do to get XML output is call
-@code{srunner_set_xml()} before the tests are run.  Here is an example
-of the same log output as before but in XML:
+XML output is enabled by a call to @code{srunner_set_xml()} before the tests
+are run. Here is an example of an XML log:
 @example
 @verbatim
 <?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="http://check.sourceforge.net/xml/check_unittest.xslt"?>
 <testsuites xmlns="http://check.sourceforge.net/ns">
-  <datetime>2004-08-20 12:53:32</datetime>
+  <datetime>2012-10-19 09:56:06</datetime>
   <suite>
     <title>S1</title>
     <test result="success">
       <path>.</path>
-      <fn>ex_xml_output.c:8</fn>
+      <fn>ex_xml_output.c:10</fn>
       <id>test_pass</id>
+      <iteration>0</iteration>
+      <duration>0.000013</duration>
       <description>Core</description>
       <message>Passed</message>
     </test>
     <test result="failure">
       <path>.</path>
-      <fn>ex_xml_output.c:14</fn>
+      <fn>ex_xml_output.c:16</fn>
       <id>test_fail</id>
+      <iteration>0</iteration>
+      <duration>-1.000000</duration>
       <description>Core</description>
       <message>Failure</message>
     </test>
     <test result="error">
       <path>.</path>
-      <fn>ex_xml_output.c:18</fn>
+      <fn>ex_xml_output.c:20</fn>
       <id>test_exit</id>
+      <iteration>0</iteration>
+      <duration>-1.000000</duration>
       <description>Core</description>
       <message>Early exit with return value 1</message>
     </test>
@@ -1279,23 +1982,123 @@ of the same log output as before but in XML:
     <title>S2</title>
     <test result="success">
       <path>.</path>
-      <fn>ex_xml_output.c:26</fn>
+      <fn>ex_xml_output.c:28</fn>
       <id>test_pass2</id>
+      <iteration>0</iteration>
+      <duration>0.000011</duration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result="failure">
+      <path>.</path>
+      <fn>ex_xml_output.c:34</fn>
+      <id>test_loop</id>
+      <iteration>0</iteration>
+      <duration>-1.000000</duration>
+      <description>Core</description>
+      <message>Iteration 0 failed</message>
+    </test>
+    <test result="success">
+      <path>.</path>
+      <fn>ex_xml_output.c:34</fn>
+      <id>test_loop</id>
+      <iteration>1</iteration>
+      <duration>0.000010</duration>
       <description>Core</description>
       <message>Passed</message>
     </test>
+    <test result="failure">
+      <path>.</path>
+      <fn>ex_xml_output.c:34</fn>
+      <id>test_loop</id>
+      <iteration>2</iteration>
+      <duration>-1.000000</duration>
+      <description>Core</description>
+      <message>Iteration 2 failed</message>
+    </test>
+  </suite>
+  <suite>
+    <title>XML escape &quot; &apos; &lt; &gt; &amp; tests</title>
+    <test result="failure">
+      <path>.</path>
+      <fn>ex_xml_output.c:40</fn>
+      <id>test_xml_esc_fail_msg</id>
+      <iteration>0</iteration>
+      <duration>-1.000000</duration>
+      <description>description &quot; &apos; &lt; &gt; &amp;</description>
+      <message>fail &quot; &apos; &lt; &gt; &amp; message</message>
+    </test>
   </suite>
-  <duration>0.304875</duration>
+  <duration>0.001610</duration>
 </testsuites>
 @end verbatim
 @end example
 
-@node Subunit Support, , Test Logging, Advanced Features
+XML logging can be enabled by an environment variable as well. If
+@code{CK_XML_LOG_FILE_NAME} environment variable is set, the XML test log will
+be written to specified file name. If XML log file is specified with both
+@code{CK_XML_LOG_FILE_NAME} and @code{srunner_set_xml()}, the name provided
+to @code{srunner_set_xml()} will be used.
+
+If the log name is set to "-" either via @code{srunner_set_xml()} or
+@code{CK_XML_LOG_FILE_NAME}, the log data will be printed to stdout instead
+of to a file.
+
+If both plain text and XML log files are specified, by any of above methods,
+then check will log to both files. In other words logging in plain text and XML
+format simultaneously is supported.
+
+@node TAP Logging,  , Test Logging, Test Logging
+@subsection TAP Logging
+
+@findex srunner_set_tap
+@findex srunner_has_tap
+@findex srunner_tap_fname
+The log can also be written in Test Anything Protocol (TAP) format.
+Refer to the @uref{http://podwiki.hexten.net/TAP/TAP.html,TAP Specification}
+for information on valid TAP output and parsers of TAP. The following
+functions define the interface for TAP logs:
+@example
+@verbatim
+void srunner_set_tap (SRunner *sr, const char *fname);
+int srunner_has_tap (SRunner *sr);
+const char *srunner_tap_fname (SRunner *sr);
+@end verbatim
+@end example
+
+TAP output is enabled by a call to @code{srunner_set_tap()} before the tests
+are run. Here is an example of an TAP log:
+@example
+@verbatim
+ok 1 - mytests.c:test_suite_name:my_test_1: Passed
+ok 2 - mytests.c:test_suite_name:my_test_2: Passed
+not ok 3 - mytests.c:test_suite_name:my_test_3: Foo happened
+ok 4 - mytests.c:test_suite_name:my_test_1: Passed
+1..4
+@end verbatim
+@end example
+
+TAP logging can be enabled by an environment variable as well. If
+@code{CK_TAP_LOG_FILE_NAME} environment variable is set, the TAP test log will
+be written to specified file name. If TAP log file is specified with both
+@code{CK_TAP_LOG_FILE_NAME} and @code{srunner_set_tap()}, the name provided
+to @code{srunner_set_tap()} will be used.
+
+If the log name is set to "-" either via @code{srunner_set_tap()} or
+@code{CK_TAP_LOG_FILE_NAME}, the log data will be printed to stdout instead
+of to a file.
+
+If both plain text and TAP log files are specified, by any of above methods,
+then check will log to both files. In other words logging in plain text and TAP
+format simultaneously is supported.
+
+
+@node Subunit Support,  , Test Logging, Advanced Features
 @section Subunit Support
 
 Check supports running test suites with subunit output. This can be useful to
 combine test results from multiple languages, or to perform programmatic
-analysis on the results of multiple check test suites or otherise handle test
+analysis on the results of multiple check test suites or otherwise handle test
 results in a programmatic manner. Using subunit with check is very straight
 forward. There are two steps:
 1) In your check test suite driver pass 'CK_SUBUNIT' as the output mode
@@ -1334,24 +2137,47 @@ Subunit is hosted on launchpad - the @uref{https://launchpad.net/subunit/,
 subunit} project there contains bug tracker, future plans, and source code
 control details.
 
-@node Conclusion and References, AM_PATH_CHECK, Advanced Features, Top
-@chapter Conclusion and References
-The tutorial and description of advanced features has provided an
-introduction to all of the functionality available in Check.
-Hopefully, this is enough to get you started writing unit tests with
-Check.  All the rest is simply application of what has been learned so
-far with repeated application of the ``test a little, code a little''
-strategy.
+@node Supported Build Systems, Conclusion and References, Advanced Features, Top
+@chapter Supported Build Systems
+@findex Supported Build Systems
 
-For further reference, see Kent Beck, ``Test-Driven Development: By
-Example'', 1st ed., Addison-Wesley, 2003.  ISBN 0-321-14653-0.
+Check officially supports two build systems: Autotools and CMake.
+Primarily it is recommended to use Autotools where possible, as CMake is
+only officially supported for Windows. Information on using Check in
+either build system follows.
 
-If you know of other authoritative references to unit testing and
-test-driven development, please send us a patch to this manual.
+@menu
+* Autotools::
+* CMake::
+@end menu
+
+@node Autotools, CMake, Supported Build Systems, Supported Build Systems
+@section Autotools
+
+It is recommended to use pkg-config where possible to locate and use
+Check in an Autotools project. This can be accomplished by including
+the following in the project's @file{configure.ac} file:
+
+@verbatim
+   PKG_CHECK_MODULES([CHECK], [check >= MINIMUM-VERSION])
+@end verbatim
+
+where MINIMUM-VERSION is the lowest version which is sufficient for
+the project. For example, to guarantee that at least version 0.9.6 is
+available, use the following:
+
+@verbatim
+   PKG_CHECK_MODULES([CHECK], [check >= 0.9.6])
+@end verbatim
+
+An example of a @file{configure.ac} script for a project is
+included in the @file{doc/example} directory in Check's source.
+This macro should provide everything necessary to integrate Check
+into an Autotools project.
 
-@node AM_PATH_CHECK, Copying This Manual, Conclusion and References, Top
-@chapter AM_PATH_CHECK
-@findex AM_PATH_CHECK()
+If one does not wish to use pkg-config Check also provides its own
+macro, @code{AM_PATH_CHECK()}, which may be used. This macro is
+deprecated, but is still included with Check for backwards compatibility.
 
 The @code{AM_PATH_CHECK()} macro is defined in the file
 @file{check.m4} which is installed by Check.  It has some optional
@@ -1405,7 +2231,64 @@ include @option{-I DIR} with @code{DIR} being the location of
 @end enumerate
 @end enumerate
 
-@node Copying This Manual, Index, AM_PATH_CHECK, Top
+
+@node CMake, , Autotools, Supported Build Systems
+@section CMake
+
+Those unable to use Autotools in their project may use CMake instead.
+Officially CMake is supported only for Windows.
+
+Documentation for using CMake is forthcoming. In the meantime, look
+at the example CMake project in Check's @file{doc/examples} directory.
+
+
+
+@node Conclusion and References, Environment Variable Reference, Supported Build Systems, Top
+@chapter Conclusion and References
+The tutorial and description of advanced features has provided an
+introduction to all of the functionality available in Check.
+Hopefully, this is enough to get you started writing unit tests with
+Check.  All the rest is simply application of what has been learned so
+far with repeated application of the ``test a little, code a little''
+strategy.
+
+For further reference, see Kent Beck, ``Test-Driven Development: By
+Example'', 1st ed., Addison-Wesley, 2003.  ISBN 0-321-14653-0.
+
+If you know of other authoritative references to unit testing and
+test-driven development, please send us a patch to this manual.
+
+@node Environment Variable Reference, Copying This Manual, Conclusion and References, Top
+@appendix Environment Variable Reference
+
+This is a reference to environment variables that Check recognized and their use.
+
+CK_RUN_CASE: Name of a test case, runs only that test. See section @ref{Selective Running of Tests}.
+
+CK_RUN_SUITE: Name of a test suite, runs only that suite. See section @ref{Selective Running of Tests}.
+
+CK_INCLUDE_TAGS: String of space separated tags, runs only test cases associated with at least one of the tags, See section @ref{Selecting Tests Based on Arbitrary Tags}.
+
+CK_EXCLUDE_TAGS: String of space separated tags, runs only test cases not associated with any of the tags, See section @ref{Selecting Tests Based on Arbitrary Tags}.
+CK_VERBOSITY: How much output to emit, accepts: ``silent'', ``minimal'', ``normal'', ``subunit'', or ``verbose''.  See section @ref{SRunner Output}.
+
+CK_FORK: Set to ``no'' to disable using fork() to run unit tests in their own process. This is useful for debugging segmentation faults.  See section @ref{No Fork Mode}.
+
+CK_DEFAULT_TIMEOUT: Override Check's default unit test timeout, a floating value in seconds. ``0'' means no timeout.  See section @ref{Test Timeouts}.
+
+CK_TIMEOUT_MULTIPLIER: A multiplier used against the default unit test timeout. An integer, defaults to ``1''.  See section @ref{Test Timeouts}.
+
+CK_LOG_FILE_NAME: Filename to write logs to.  See section @ref{Test Logging}.
+
+CK_XML_LOG_FILE_NAME: Filename to write XML log to. See section @ref{XML Logging}.
+
+CK_TAP_LOG_FILE_NAME: Filename to write TAP (Test Anything Protocol) output to.  See section @ref{TAP Logging}.
+
+CK_MAX_MSG_SIZE: Maximal assertion message size.
+
+
+@node Copying This Manual, Index, Environment Variable Reference, Top
 @appendix Copying This Manual
 
 @menu
diff --git a/doc/example/CMakeLists.txt b/doc/example/CMakeLists.txt
new file mode 100644 (file)
index 0000000..136988c
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright (c) 2017, Branden Archer
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of this project nor the names of its contributors may
+#       be used to endorse or promote products derived from this software without
+#       specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL Branden Archer 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.
+
+project(money C)
+
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+###############################################################################
+# Set build features
+set(CMAKE_BUILD_TYPE Debug)
+
+###############################################################################
+include(CheckCSourceCompiles)
+include(CheckCSourceRuns)
+include(CheckFunctionExists)
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckLibraryExists)
+include(CheckSymbolExists)
+include(CheckTypeSize)
+
+###############################################################################
+# Check headers
+set(INCLUDES "")
+macro(ck_check_include_file header var)
+  check_include_files("${INCLUDES};${header}" ${var})
+  if(${var})
+    set(INCLUDES ${INCLUDES} ${header})
+  endif(${var})
+endmacro(ck_check_include_file)
+
+ck_check_include_file("stdlib.h" HAVE_STDLIB_H)
+
+###############################################################################
+# Check functions
+# (Nothing to check for the money example)
+
+###############################################################################
+# Check defines
+# (Nothing to check for the money example)
+
+###############################################################################
+# Check struct members
+# (Nothing to check for the money example)
+
+###############################################################################
+# Check for integer types
+# (The following are used in check.h. Regardless if they are used in
+# the project, they will need to be checked in order to use Check).
+check_type_size(intmax_t INTMAX_T)
+check_type_size(uintmax_t UINTMAX_T)
+
+check_type_size(pid_t PID_T)
+if(NOT HAVE_PID_T)
+  if(WIN32)
+    set(pid_t "int")
+  else(WIN32)
+    MESSAGE(FATAL_ERROR "pid_t doesn't exist on this platform?")
+  endif(WIN32)
+endif(NOT HAVE_PID_T)
+
+###############################################################################
+# Check libraries
+
+###############################################################################
+# Generate "config.h" from "cmake/config.h.cmake"
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in
+  ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+add_definitions(-DHAVE_CONFIG_H)
+set(CONFIG_HEADER ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+###############################################################################
+# Subdirectories
+add_subdirectory(src)
+add_subdirectory(tests)
+
+###############################################################################
+# Unit tests
+enable_testing()
+add_test(NAME check_money COMMAND check_money)
+
index bc89980..f11245a 100644 (file)
@@ -1,10 +1,16 @@
 This is the "money example" from the Check tutorial.
 
+This demonstrates using Check along with one of two build systems:
+autotools and CMake.
+
+========================
+Autotools:
+
 You need the following programs installed on your system:
   -- Autoconf 2.59
   -- Automake 1.9.6
   -- Libtool 1.5.22
-  -- Check 0.9.
+  -- Check 0.9.9
 
 Somewhat earlier versions of these programs might work.
 
@@ -21,4 +27,63 @@ money.c and money.h are built as a library.  src/main.c:main() is a
 client of libmoney.la, just as tests/check_money.c:main() is a client
 of libmoney.la
 
+To use the autotools example in another project, start with the following
+files:
+
+   example
+   |--- configure.ac
+   |--- Makefile.am
+   |--- src
+   |    |--- Makefile.am
+   |--- tests
+        |--- Makefile.am
+
+Please send bug reports to check-devel AT lists.sourceforge.net.
+
+========================
+CMake:
+
+You need the following programs installed on your system:
+  -- CMake 2.8
+  -- Check 0.9.9
+  -- (pkg-config 0.26 is optional)
+
+Somewhat earlier versions of these programs might work.
+
+NOTE: If pkg-config is not installed on the system, and MSVC is being used,
+the install location of Check must be inserted manually into the
+tests/CMakeLists.txt file, by setting the variable CHECK_INSTALL_DIR
+to the install location. Look at the tests/CMakeLists.txt file for
+a commented out example.
+
+Then, do as follows for a Unix-compatible shell:
+
+$ cmake .
+$ make
+$ make test
+
+or the following for MSVC:
+
+$ cmake -G "NMake Makefiles" .
+$ nmake
+$ nmake test
+
+Don't do "make install" or "nmake install" unless you want to install the money example.
+
+money.c and money.h are built as a library.  src/main.c:main() is a
+client of libmoney.la, just as tests/check_money.c:main() is a client
+of libmoney.la
+
+To use the CMake example in another project, start with the following files:
+
+   example
+   |--- CMakeFiles.txt
+   |--- cmake
+   |    |--- config.h.in
+   |    |--- FindCheck.cmake
+   |--- src
+   |    |--- CMakeFiles.txt
+   |--- tests
+        |--- CMakeFiles.txt
+
 Please send bug reports to check-devel AT lists.sourceforge.net.
diff --git a/doc/example/cmake/COPYING-CMAKE-SCRIPTS.txt b/doc/example/cmake/COPYING-CMAKE-SCRIPTS.txt
new file mode 100644 (file)
index 0000000..53b6b71
--- /dev/null
@@ -0,0 +1,22 @@
+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 copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
diff --git a/doc/example/cmake/FindCheck.cmake b/doc/example/cmake/FindCheck.cmake
new file mode 100644 (file)
index 0000000..4392d88
--- /dev/null
@@ -0,0 +1,57 @@
+# - Try to find the CHECK libraries
+#  Once done this will define
+#
+#  CHECK_FOUND - system has check
+#  CHECK_INCLUDE_DIR - the check include directory
+#  CHECK_LIBRARIES - check library
+#
+#  This configuration file for finding libcheck is originally from
+#  the opensync project. The originally was downloaded from here:
+#  opensync.org/browser/branches/3rd-party-cmake-modules/modules/FindCheck.cmake
+#
+#  Copyright (c) 2007 Daniel Gollub <dgollub@suse.de>
+#  Copyright (c) 2007 Bjoern Ricks  <b.ricks@fh-osnabrueck.de>
+#
+#  Redistribution and use is allowed according to the terms of the New
+#  BSD license.
+#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+INCLUDE( FindPkgConfig )
+
+# Take care about check.pc settings
+PKG_SEARCH_MODULE( CHECK check )
+
+# Look for CHECK include dir and libraries
+IF( NOT CHECK_FOUND )
+       IF ( CHECK_INSTALL_DIR )
+               MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
+               SET ( CHECK_INCLUDE_DIR  "${CHECK_INSTALL_DIR}/include" )
+               SET ( CHECK_INCLUDE_DIRS "${CHECK_INCLUDE_DIR}" )
+               FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
+               FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
+               SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
+       ELSE ( CHECK_INSTALL_DIR )
+               FIND_PATH( CHECK_INCLUDE_DIR check.h )
+               FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
+       ENDIF ( CHECK_INSTALL_DIR )
+
+       IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
+               SET( CHECK_FOUND 1 )
+               IF ( NOT Check_FIND_QUIETLY )
+                       MESSAGE ( STATUS "Found CHECK: ${CHECK_LIBRARIES}" )
+               ENDIF ( NOT Check_FIND_QUIETLY )
+       ELSE ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
+               IF ( Check_FIND_REQUIRED )
+                       MESSAGE( FATAL_ERROR "Could NOT find CHECK" )
+               ELSE ( Check_FIND_REQUIRED )
+                       IF ( NOT Check_FIND_QUIETLY )
+                               MESSAGE( STATUS "Could NOT find CHECK" )        
+                       ENDIF ( NOT Check_FIND_QUIETLY )
+               ENDIF ( Check_FIND_REQUIRED )
+       ENDIF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
+ENDIF( NOT CHECK_FOUND )
+
+# Hide advanced variables from CMake GUIs
+MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES )
+
diff --git a/doc/example/cmake/config.h.in b/doc/example/cmake/config.h.in
new file mode 100644 (file)
index 0000000..a66634b
--- /dev/null
@@ -0,0 +1,24 @@
+/*-*- mode:C; -*- */
+/* config.h.  Generated from build/cmake/config.h.in by cmake configure */
+
+/*
+ * Ensure we have C99-style int64_t, etc, all defined.
+ */
+
+/* First, we need to know if the system has already defined them. */
+#cmakedefine HAVE_INTMAX_T
+#cmakedefine HAVE_UINTMAX_T
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#cmakedefine pid_t ${pid_t}
+
+/* Define intmax_t and uintmax_t if they are not already defined. */
+#if !defined(HAVE_INTMAX_T)
+typedef int64_t intmax_t;
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#endif
+
+#if !defined(HAVE_UINTMAX_T)
+typedef uint64_t uintmax_t;
+#endif
index a25417b..bf630fe 100644 (file)
@@ -3,16 +3,14 @@
 # Prelude.
 AC_PREREQ([2.59])
 AC_INIT([Money], [0.3], [check-devel AT lists.sourceforge.net])
+AM_PROG_AR
 
 # unique source file --- primitive safety check 
 AC_CONFIG_SRCDIR([src/money.c])
 
-# place to put some extra build scripts installed
-AC_CONFIG_AUX_DIR([build-aux])
-
 # fairly severe build strictness
 # change foreign to gnu or gnits to comply with gnu standards
-AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.9.6])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign 1.11.2])
 
 # Checks for programs.
 AC_PROG_CC
@@ -20,12 +18,8 @@ AC_PROG_LIBTOOL
 
 # Checks for libraries.
 
-# This macro is defined in check.m4 and tests if check.h and
-# libcheck.a are installed in your system. It sets CHECK_CFLAGS and
-# CHECK_LIBS accordingly.  
-#  AM_PATH_CHECK([MINIMUM-VERSION,
-#                [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-AM_PATH_CHECK()
+PKG_CHECK_MODULES([CHECK], [check >= 0.9.6])
+AM_PROG_CC_C_O
 
 # Checks for header files.
 AC_HEADER_STDC
diff --git a/doc/example/src/CMakeLists.txt b/doc/example/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b5e211e
--- /dev/null
@@ -0,0 +1,24 @@
+set(LIB_SOURCES
+  money.c
+)
+
+set(MAIN_SOURCES
+  main.c
+)
+
+set(HEADERS 
+  ${CONFIG_HEADER}
+  money.h
+)
+
+add_library(money STATIC ${LIB_SOURCES} ${HEADERS})
+
+add_executable(main ${HEADERS} ${MAIN_SOURCES})
+target_link_libraries(main money)
+
+install(TARGETS money
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib)
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/money.h DESTINATION include)
index caeae4a..382a3e2 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "money.h"
 
 /* only main should be in this file, to make all other functions in
@@ -5,8 +25,7 @@
    whole program testing framework like Autotest.
 */
 
-int
-main (void)
+int main(void)
 {
-  return 0;
+    return 0;
 }
index e69de29..8e1e65b 100644 (file)
@@ -0,0 +1,20 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
index d1b2094..3bdd083 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #ifndef MONEY_H
 #define MONEY_H
 
index 1897415..5550c23 100644 (file)
@@ -1,11 +1,31 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #ifndef MONEY_H
 #define MONEY_H
 
 typedef struct Money Money;
 
-Money *money_create (int amount, char *currency);
-int money_amount (Money * m);
-char *money_currency (Money * m);
-void money_free (Money * m);
+Money *money_create(int amount, char *currency);
+int money_amount(Money * m);
+char *money_currency(Money * m);
+void money_free(Money * m);
 
 #endif /* MONEY_H */
index 52ac9ea..8474a8c 100644 (file)
@@ -1,26 +1,42 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include "money.h"
 
-Money *
-money_create (int amount, char *currency)
+Money *money_create(int amount, char *currency)
 {
-  return NULL;
+    return NULL;
 }
 
-int
-money_amount (Money * m)
+int money_amount(Money * m)
 {
-  return 0;
+    return 0;
 }
 
-char *
-money_currency (Money * m)
+char *money_currency(Money * m)
 {
-  return NULL;
+    return NULL;
 }
 
-void
-money_free (Money * m)
+void money_free(Money * m)
 {
-  return;
+    return;
 }
index e925672..69a4368 100644 (file)
@@ -1,31 +1,47 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include "money.h"
 
 struct Money
 {
-  int amount;
+    int amount;
 };
 
-Money *
-money_create (int amount, char *currency)
+Money *money_create(int amount, char *currency)
 {
-  return NULL;
+    return NULL;
 }
 
-int
-money_amount (Money * m)
+int money_amount(Money * m)
 {
-  return m->amount;
+    return m->amount;
 }
 
-char *
-money_currency (Money * m)
+char *money_currency(Money * m)
 {
-  return NULL;
+    return NULL;
 }
 
-void
-money_free (Money * m)
+void money_free(Money * m)
 {
-  return;
+    return;
 }
index 64267a9..5c7f335 100644 (file)
@@ -1,41 +1,58 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include "money.h"
 
 struct Money
 {
-  int amount;
-  char *currency;
+    int amount;
+    char *currency;
 };
 
-Money *
-money_create (int amount, char *currency)
+Money *money_create(int amount, char *currency)
 {
-  Money *m = malloc (sizeof (Money));
-  if (m == NULL)
+    Money *m = malloc(sizeof(Money));
+
+    if (m == NULL)
     {
-      return NULL;
+        return NULL;
     }
 
-  m->amount = amount;
-  m->currency = currency;
-  return m;
+    m->amount = amount;
+    m->currency = currency;
+    return m;
 }
 
-int
-money_amount (Money * m)
+int money_amount(Money * m)
 {
-  return m->amount;
+    return m->amount;
 }
 
-char *
-money_currency (Money * m)
+char *money_currency(Money * m)
 {
-  return m->currency;
+    return m->currency;
 }
 
-void
-money_free (Money * m)
+void money_free(Money * m)
 {
-  free (m);
-  return;
+    free(m);
+    return;
 }
index 47f09bb..706c38a 100644 (file)
@@ -1,46 +1,65 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include "money.h"
 
 struct Money
 {
-  int amount;
-  char *currency;
+    int amount;
+    char *currency;
 };
 
-Money *
-money_create (int amount, char *currency)
+Money *money_create(int amount, char *currency)
 {
-  if (amount < 0)
+    Money *m;
+
+    if (amount < 0)
     {
-      return NULL;
+        return NULL;
     }
 
-  Money *m = malloc (sizeof (Money));
-  if (m == NULL)
+    m = malloc(sizeof(Money));
+
+    if (m == NULL)
     {
-      return NULL;
+        return NULL;
     }
 
-  m->amount = amount;
-  m->currency = currency;
-  return m;
+    m->amount = amount;
+    m->currency = currency;
+    return m;
 }
 
-int
-money_amount (Money * m)
+int money_amount(Money * m)
 {
-  return m->amount;
+    return m->amount;
 }
 
-char *
-money_currency (Money * m)
+char *money_currency(Money * m)
 {
-  return m->currency;
+    return m->currency;
 }
 
-void
-money_free (Money * m)
+void money_free(Money * m)
 {
-  free (m);
-  return;
+    free(m);
+    return;
 }
index 47f09bb..706c38a 100644 (file)
@@ -1,46 +1,65 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include "money.h"
 
 struct Money
 {
-  int amount;
-  char *currency;
+    int amount;
+    char *currency;
 };
 
-Money *
-money_create (int amount, char *currency)
+Money *money_create(int amount, char *currency)
 {
-  if (amount < 0)
+    Money *m;
+
+    if (amount < 0)
     {
-      return NULL;
+        return NULL;
     }
 
-  Money *m = malloc (sizeof (Money));
-  if (m == NULL)
+    m = malloc(sizeof(Money));
+
+    if (m == NULL)
     {
-      return NULL;
+        return NULL;
     }
 
-  m->amount = amount;
-  m->currency = currency;
-  return m;
+    m->amount = amount;
+    m->currency = currency;
+    return m;
 }
 
-int
-money_amount (Money * m)
+int money_amount(Money * m)
 {
-  return m->amount;
+    return m->amount;
 }
 
-char *
-money_currency (Money * m)
+char *money_currency(Money * m)
 {
-  return m->currency;
+    return m->currency;
 }
 
-void
-money_free (Money * m)
+void money_free(Money * m)
 {
-  free (m);
-  return;
+    free(m);
+    return;
 }
index 1897415..5550c23 100644 (file)
@@ -1,11 +1,31 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #ifndef MONEY_H
 #define MONEY_H
 
 typedef struct Money Money;
 
-Money *money_create (int amount, char *currency);
-int money_amount (Money * m);
-char *money_currency (Money * m);
-void money_free (Money * m);
+Money *money_create(int amount, char *currency);
+int money_amount(Money * m);
+char *money_currency(Money * m);
+void money_free(Money * m);
 
 #endif /* MONEY_H */
diff --git a/doc/example/tests/CMakeLists.txt b/doc/example/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1d46e9e
--- /dev/null
@@ -0,0 +1,18 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
+
+# If pkg-config is not installed on the system, then the
+# CHECK_INSTALL_DIR variable must be set to the install
+# location of Check. For example, on Windows, this may
+# be: C:/Program Files/check
+# set(CHECK_INSTALL_DIR "C:/Program Files/check")
+
+find_package(Check REQUIRED)
+include_directories(${CHECK_INCLUDE_DIRS})
+link_directories(${CHECK_LIBRARY_DIRS})
+
+set(TEST_SOURCES
+  check_money.c
+)
+
+add_executable(check_money ${TEST_SOURCES})
+target_link_libraries(check_money money ${CHECK_LIBRARIES})
index 398ec67..abfacf1 100644 (file)
@@ -1,5 +1,24 @@
-int
-main (void)
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+int main(void)
 {
-  return 0;
+    return 0;
 }
index 7c7c9d4..148f10f 100644 (file)
@@ -1,20 +1,38 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <check.h>
 #include "../src/money.h"
 
-START_TEST (test_money_create)
+START_TEST(test_money_create)
 {
-  Money *m;
-  m = money_create (5, "USD");
-  fail_unless (money_amount (m) == 5, 
-              "Amount not set correctly on creation");
-  fail_unless (strcmp (money_currency (m), "USD") == 0,
-              "Currency not set correctly on creation");
-  money_free (m);
+    Money *m;
+
+    m = money_create(5, "USD");
+    ck_assert_int_eq(money_amount(m), 5);
+    ck_assert_str_eq(money_currency(m), "USD");
+    money_free(m);
 }
 END_TEST
 
-int
-main (void)
+int main(void)
 {
-  return 0;
+    return 0;
 }
index a19cf8b..733a0da 100644 (file)
@@ -1,40 +1,65 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include <check.h>
 #include "../src/money.h"
 
-START_TEST (test_money_create)
+START_TEST(test_money_create)
 {
-  Money *m;
-  m = money_create (5, "USD");
-  fail_unless (money_amount (m) == 5, 
-              "Amount not set correctly on creation");
-  fail_unless (strcmp (money_currency (m), "USD") == 0,
-              "Currency not set correctly on creation");
-  money_free (m);
+    Money *m;
+
+    m = money_create(5, "USD");
+    ck_assert_int_eq(money_amount(m), 5);
+    ck_assert_str_eq(money_currency(m), "USD");
+    money_free(m);
 }
 END_TEST
 
-Suite *
-money_suite (void)
+Suite * money_suite(void)
 {
-  Suite *s = suite_create ("Money");
+    Suite *s;
+    TCase *tc_core;
+
+    s = suite_create("Money");
 
-  /* Core test case */
-  TCase *tc_core = tcase_create ("Core");
-  tcase_add_test (tc_core, test_money_create);
-  suite_add_tcase (s, tc_core);
+    /* Core test case */
+    tc_core = tcase_create("Core");
 
-  return s;
+    tcase_add_test(tc_core, test_money_create);
+    suite_add_tcase(s, tc_core);
+
+    return s;
 }
 
-int
-main (void)
+int main(void)
 {
-  int number_failed;
-  Suite *s = money_suite ();
-  SRunner *sr = srunner_create (s);
-  srunner_run_all (sr, CK_NORMAL);
-  number_failed = srunner_ntests_failed (sr);
-  srunner_free (sr);
-  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    int number_failed;
+    Suite *s;
+    SRunner *sr;
+
+    s = money_suite();
+    sr = srunner_create(s);
+
+    srunner_run_all(sr, CK_NORMAL);
+    number_failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
index f47fc77..e1120c6 100644 (file)
@@ -1,63 +1,94 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include <check.h>
 #include "../src/money.h"
 
-START_TEST (test_money_create)
+START_TEST(test_money_create)
 {
-  Money *m;
-  m = money_create (5, "USD");
-  fail_unless (money_amount (m) == 5, 
-              "Amount not set correctly on creation");
-  fail_unless (strcmp (money_currency (m), "USD") == 0,
-              "Currency not set correctly on creation");
-  money_free (m);
+    Money *m;
+
+    m = money_create(5, "USD");
+    ck_assert_int_eq(money_amount(m), 5);
+    ck_assert_str_eq(money_currency(m), "USD");
+    money_free(m);
 }
 END_TEST
 
-START_TEST (test_money_create_neg)
+START_TEST(test_money_create_neg)
 {
-  Money *m = money_create (-1, "USD");
-  fail_unless (m == NULL,
-              "NULL should be returned on attempt to create with "
-              "a negative amount");
+    Money *m = money_create(-1, "USD");
+
+    ck_assert_msg(m == NULL,
+                  "NULL should be returned on attempt to create with "
+                  "a negative amount");
 }
 END_TEST
 
-START_TEST (test_money_create_zero)
+START_TEST(test_money_create_zero)
 {
-  Money *m = money_create (0, "USD");
-  fail_unless (money_amount (m) == 0, 
-              "Zero is a valid amount of money");
+    Money *m = money_create(0, "USD");
+
+    if (money_amount(m) != 0)
+    {
+        ck_abort_msg("Zero is a valid amount of money");
+    }
 }
 END_TEST
 
-Suite *
-money_suite (void)
+Suite * money_suite(void)
 {
-  Suite *s = suite_create ("Money");
+    Suite *s;
+    TCase *tc_core;
+    TCase *tc_limits;
+
+    s = suite_create("Money");
 
-  /* Core test case */
-  TCase *tc_core = tcase_create ("Core");
-  tcase_add_test (tc_core, test_money_create);
-  suite_add_tcase (s, tc_core);
+    /* Core test case */
+    tc_core = tcase_create("Core");
 
-  /* Limits test case */
-  TCase *tc_limits = tcase_create ("Limits");
-  tcase_add_test (tc_limits, test_money_create_neg);
-  tcase_add_test (tc_limits, test_money_create_zero);
-  suite_add_tcase (s, tc_limits);
+    tcase_add_test(tc_core, test_money_create);
+    suite_add_tcase(s, tc_core);
 
-  return s;
+    /* Limits test case */
+    tc_limits = tcase_create("Limits");
+
+    tcase_add_test(tc_limits, test_money_create_neg);
+    tcase_add_test(tc_limits, test_money_create_zero);
+    suite_add_tcase(s, tc_limits);
+
+    return s;
 }
 
-int
-main (void)
+int main(void)
 {
-  int number_failed;
-  Suite *s = money_suite ();
-  SRunner *sr = srunner_create (s);
-  srunner_run_all (sr, CK_NORMAL);
-  number_failed = srunner_ntests_failed (sr);
-  srunner_free (sr);
-  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    int number_failed;
+    Suite *s;
+    SRunner *sr;
+
+    s = money_suite();
+    sr = srunner_create(s);
+
+    srunner_run_all(sr, CK_NORMAL);
+    number_failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
index b935998..e82a0eb 100644 (file)
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include <check.h>
 #include "../src/money.h"
 
 Money *five_dollars;
 
-void
-setup (void)
+void setup(void)
 {
-  five_dollars = money_create (5, "USD");
+    five_dollars = money_create(5, "USD");
 }
 
-void
-teardown (void)
+void teardown(void)
 {
-  money_free (five_dollars);
+    money_free(five_dollars);
 }
 
-START_TEST (test_money_create)
+START_TEST(test_money_create)
 {
-  fail_unless (money_amount (five_dollars) == 5,
-              "Amount not set correctly on creation");
-  fail_unless (strcmp (money_currency (five_dollars), "USD") == 0,
-              "Currency not set correctly on creation");
+    ck_assert_int_eq(money_amount(five_dollars), 5);
+    ck_assert_str_eq(money_currency(five_dollars), "USD");
 }
 END_TEST
 
-START_TEST (test_money_create_neg)
+START_TEST(test_money_create_neg)
 {
-  Money *m = money_create (-1, "USD");
-  fail_unless (m == NULL,
-              "NULL should be returned on attempt to create with "
-              "a negative amount");
+    Money *m = money_create(-1, "USD");
+
+    ck_assert_msg(m == NULL,
+                  "NULL should be returned on attempt to create with "
+                  "a negative amount");
 }
 END_TEST
 
-START_TEST (test_money_create_zero)
+START_TEST(test_money_create_zero)
 {
-  Money *m = money_create (0, "USD");
-  fail_unless (money_amount (m) == 0, 
-              "Zero is a valid amount of money");
+    Money *m = money_create(0, "USD");
+
+    if (money_amount(m) != 0)
+    {
+        ck_abort_msg("Zero is a valid amount of money");
+    }
 }
 END_TEST
 
-Suite *
-money_suite (void)
+Suite * money_suite(void)
 {
-  Suite *s = suite_create ("Money");
+    Suite *s;
+    TCase *tc_core;
+    TCase *tc_limits;
+
+    s = suite_create("Money");
 
-  /* Core test case */
-  TCase *tc_core = tcase_create ("Core");
-  tcase_add_checked_fixture (tc_core, setup, teardown);
-  tcase_add_test (tc_core, test_money_create);
-  suite_add_tcase (s, tc_core);
+    /* Core test case */
+    tc_core = tcase_create("Core");
 
-  /* Limits test case */
-  TCase *tc_limits = tcase_create ("Limits");
-  tcase_add_test (tc_limits, test_money_create_neg);
-  tcase_add_test (tc_limits, test_money_create_zero);
-  suite_add_tcase (s, tc_limits);
+    tcase_add_checked_fixture(tc_core, setup, teardown);
+    tcase_add_test(tc_core, test_money_create);
+    suite_add_tcase(s, tc_core);
 
-  return s;
+    /* Limits test case */
+    tc_limits = tcase_create("Limits");
+
+    tcase_add_test(tc_limits, test_money_create_neg);
+    tcase_add_test(tc_limits, test_money_create_zero);
+    suite_add_tcase(s, tc_limits);
+
+    return s;
 }
 
-int
-main (void)
+int main(void)
 {
-  int number_failed;
-  Suite *s = money_suite ();
-  SRunner *sr = srunner_create (s);
-  srunner_run_all (sr, CK_NORMAL);
-  number_failed = srunner_ntests_failed (sr);
-  srunner_free (sr);
-  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    int number_failed;
+    Suite *s;
+    SRunner *sr;
+
+    s = money_suite();
+    sr = srunner_create(s);
+
+    srunner_run_all(sr, CK_NORMAL);
+    number_failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
index b935998..b5a3004 100644 (file)
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <config.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <check.h>
 #include "../src/money.h"
 
 Money *five_dollars;
 
-void
-setup (void)
+void setup(void)
 {
-  five_dollars = money_create (5, "USD");
+    five_dollars = money_create(5, "USD");
 }
 
-void
-teardown (void)
+void teardown(void)
 {
-  money_free (five_dollars);
+    money_free(five_dollars);
 }
 
-START_TEST (test_money_create)
+START_TEST(test_money_create)
 {
-  fail_unless (money_amount (five_dollars) == 5,
-              "Amount not set correctly on creation");
-  fail_unless (strcmp (money_currency (five_dollars), "USD") == 0,
-              "Currency not set correctly on creation");
+    ck_assert_int_eq(money_amount(five_dollars), 5);
+    ck_assert_str_eq(money_currency(five_dollars), "USD");
 }
 END_TEST
 
-START_TEST (test_money_create_neg)
+START_TEST(test_money_create_neg)
 {
-  Money *m = money_create (-1, "USD");
-  fail_unless (m == NULL,
-              "NULL should be returned on attempt to create with "
-              "a negative amount");
+    Money *m = money_create(-1, "USD");
+
+    ck_assert_msg(m == NULL,
+                  "NULL should be returned on attempt to create with "
+                  "a negative amount");
 }
 END_TEST
 
-START_TEST (test_money_create_zero)
+START_TEST(test_money_create_zero)
 {
-  Money *m = money_create (0, "USD");
-  fail_unless (money_amount (m) == 0, 
-              "Zero is a valid amount of money");
+    Money *m = money_create(0, "USD");
+
+    if (money_amount(m) != 0)
+    {
+        ck_abort_msg("Zero is a valid amount of money");
+    }
 }
 END_TEST
 
-Suite *
-money_suite (void)
+Suite * money_suite(void)
 {
-  Suite *s = suite_create ("Money");
+    Suite *s;
+    TCase *tc_core;
+    TCase *tc_limits;
+
+    s = suite_create("Money");
 
-  /* Core test case */
-  TCase *tc_core = tcase_create ("Core");
-  tcase_add_checked_fixture (tc_core, setup, teardown);
-  tcase_add_test (tc_core, test_money_create);
-  suite_add_tcase (s, tc_core);
+    /* Core test case */
+    tc_core = tcase_create("Core");
 
-  /* Limits test case */
-  TCase *tc_limits = tcase_create ("Limits");
-  tcase_add_test (tc_limits, test_money_create_neg);
-  tcase_add_test (tc_limits, test_money_create_zero);
-  suite_add_tcase (s, tc_limits);
+    tcase_add_checked_fixture(tc_core, setup, teardown);
+    tcase_add_test(tc_core, test_money_create);
+    suite_add_tcase(s, tc_core);
 
-  return s;
+    /* Limits test case */
+    tc_limits = tcase_create("Limits");
+
+    tcase_add_test(tc_limits, test_money_create_neg);
+    tcase_add_test(tc_limits, test_money_create_zero);
+    suite_add_tcase(s, tc_limits);
+
+    return s;
 }
 
-int
-main (void)
+int main(void)
 {
-  int number_failed;
-  Suite *s = money_suite ();
-  SRunner *sr = srunner_create (s);
-  srunner_run_all (sr, CK_NORMAL);
-  number_failed = srunner_ntests_failed (sr);
-  srunner_free (sr);
-  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    int number_failed;
+    Suite *s;
+    SRunner *sr;
+
+    s = money_suite();
+    sr = srunner_create(s);
+
+    srunner_run_all(sr, CK_NORMAL);
+    number_failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+    return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
similarity index 82%
rename from build-aux/mdate-sh
rename to doc/mdate-sh
index 83d2700..9e2c0c9 100755 (executable)
@@ -1,10 +1,9 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2007-03-30.02
+scriptversion=2015-04-09.19; # UTC
 
-# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 1995-2014 Free Software Foundation, Inc.
 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
 #
 # This program is free software; you can redistribute it and/or modify
@@ -18,8 +17,7 @@ scriptversion=2007-03-30.02
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -30,16 +28,26 @@ scriptversion=2007-03-30.02
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+fi
+
 case $1 in
   '')
-     echo "$0: No file.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No file.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
     cat <<\EOF
 Usage: mdate-sh [--help] [--version] FILE
 
-Pretty-print the modification time of FILE.
+Pretty-print the modification day of FILE, in the format:
+1 January 1970
 
 Report bugs to <bug-automake@gnu.org>.
 EOF
@@ -51,6 +59,13 @@ EOF
     ;;
 esac
 
+error ()
+{
+  echo "$0: $1" >&2
+  exit 1
+}
+
+
 # Prevent date giving response in another language.
 LANG=C
 export LANG
@@ -59,8 +74,12 @@ export LC_ALL
 LC_TIME=C
 export LC_TIME
 
+# Use UTC to get reproducible result
+TZ=UTC
+export TZ
+
 # GNU ls changes its time format in response to the TIME_STYLE
-# variable.  Since we cannot assume `unset' works, revert this
+# variable.  Since we cannot assume 'unset' works, revert this
 # variable to its documented default.
 if test "${TIME_STYLE+set}" = set; then
   TIME_STYLE=posix-long-iso
@@ -80,14 +99,14 @@ if ls -n /dev/null 1>/dev/null 2>&1; then
   ls_command="$ls_command -n"
 fi
 
-# A `ls -l' line looks as follows on OS/2.
+# A 'ls -l' line looks as follows on OS/2.
 #  drwxrwx---        0 Aug 11  2001 foo
 # This differs from Unix, which adds ownership information.
 #  drwxrwx---   2 root  root      4096 Aug 11  2001 foo
 #
 # To find the date, we split the line on spaces and iterate on words
 # until we find a month.  This cannot work with files whose owner is a
-# user named `Jan', or `Feb', etc.  However, it's unlikely that `/'
+# user named "Jan", or "Feb", etc.  However, it's unlikely that '/'
 # will be owned by a user whose name is a month.  So we first look at
 # the extended ls output of the root directory to decide how many
 # words should be skipped to get the date.
@@ -100,6 +119,7 @@ month=
 command=
 until test $month
 do
+  test $# -gt 0 || error "failed parsing '$ls_command /' output"
   shift
   # Add another shift to the command.
   command="$command shift;"
@@ -119,8 +139,10 @@ do
   esac
 done
 
+test -n "$month" || error "failed parsing '$ls_command /' output"
+
 # Get the extended ls output of the file or directory.
-set dummy x`eval "$ls_command \"\$save_arg1\""`
+set dummy x`eval "$ls_command \"\\\$save_arg1\""`
 
 # Remove all preceding arguments
 eval $command
@@ -201,5 +223,6 @@ echo $day $month $year
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 303f134..99b5f8f 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 23 September 2009
-@set UPDATED-MONTH September 2009
-@set EDITION 0.9.8
-@set VERSION 0.9.8
+@set UPDATED 20 October 2017
+@set UPDATED-MONTH October 2017
+@set EDITION 0.12.0
+@set VERSION 0.12.0
similarity index 82%
rename from build-aux/texinfo.tex
rename to doc/texinfo.tex
index 3569bd5..85f184c 100644 (file)
@@ -1,13 +1,13 @@
 % texinfo.tex -- TeX macros to handle Texinfo files.
-%
+% 
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2008-11-17.21}
+\def\texinfoversion{2013-02-01.11}
 %
-% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
 %
 % As a special exception, when this file is read by TeX when processing
 % a Texinfo source document, you may use the result without
-% restriction.  (This has been our intent since Texinfo was invented.)
+% restriction. This Exception is an additional permission under section 7
+% of the GNU General Public License, version 3 ("GPLv3").
 %
 % Please try the latest version of texinfo.tex before submitting bug
 % reports; you can get the latest version from:
-%   http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-%   ftp://tug.org/tex/texinfo.tex
-%     (and all CTAN mirrors, see http://www.ctan.org).
+%   http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+%   http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+%   http://www.gnu.org/software/texinfo/ (the Texinfo home page)
 % The texinfo.tex in any given distribution could well be out
 % of date, so if that's what you're using, please check.
 %
@@ -65,7 +66,6 @@
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
-
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
 \let\ptexnewwrite\newwrite
 \let\ptexnoindent=\noindent
 \let\ptexplus=+
+\let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
 \let\ptexstar=\*
 \let\ptext=\t
 \let\ptextop=\top
-{\catcode`\'=\active
-\global\let\ptexquoteright'}% Math-mode def from plain.tex.
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
 
 % If this character appears in an error message or help string, it
 % starts a new line in the output.
 % Set up fixed words for English if not already set.
 \ifx\putwordAppendix\undefined  \gdef\putwordAppendix{Appendix}\fi
 \ifx\putwordChapter\undefined   \gdef\putwordChapter{Chapter}\fi
+\ifx\putworderror\undefined     \gdef\putworderror{error}\fi
 \ifx\putwordfile\undefined      \gdef\putwordfile{file}\fi
 \ifx\putwordin\undefined        \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined     \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordIndexIsEmpty\undefined       \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined   \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
 \ifx\putwordInfo\undefined      \gdef\putwordInfo{Info}\fi
 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
 \ifx\putwordMethodon\undefined  \gdef\putwordMethodon{Method on}\fi
 \def\spaceisspace{\catcode`\ =\spacecat}
 
 % sometimes characters are active, so we need control sequences.
+\chardef\ampChar   = `\&
 \chardef\colonChar = `\:
 \chardef\commaChar = `\,
 \chardef\dashChar  = `\-
 \chardef\dotChar   = `\.
 \chardef\exclamChar= `\!
+\chardef\hashChar  = `\#
 \chardef\lquoteChar= `\`
 \chardef\questChar = `\?
 \chardef\rquoteChar= `\'
 \chardef\semiChar  = `\;
+\chardef\slashChar = `\/
 \chardef\underChar = `\_
 
 % Ignore a token.
 % that mark overfull boxes (in case you have decided
 % that the text looks ok even though it passes the margin).
 %
-\def\finalout{\overfullrule=0pt}
-
-% @| inserts a changebar to the left of the current line.  It should
-% surround any changed text.  This approach does *not* work if the
-% change spans more than two lines of output.  To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
-  % \vadjust can only be used in horizontal mode.
-  \leavevmode
-  %
-  % Append this vertical mode material after the current line in the output.
-  \vadjust{%
-    % We want to insert a rule with the height and depth of the current
-    % leading; that is exactly what \strutbox is supposed to record.
-    \vskip-\baselineskip
-    %
-    % \vadjust-items are inserted at the left edge of the type.  So
-    % the \llap here moves out into the left-hand margin.
-    \llap{%
-      %
-      % For a thicker or thinner bar, change the `1pt'.
-      \vrule height\baselineskip width1pt
-      %
-      % This is the space between the bar and the text.
-      \hskip 12pt
-    }%
-  }%
-}
+\def\finalout{\overfullrule=0pt }
 
 % Sometimes it is convenient to have everything in the transcript file
 % and nothing on the terminal.  We don't just call \tracingall here,
   \tracingmacros2
   \tracingrestores1
   \showboxbreadth\maxdimen \showboxdepth\maxdimen
-  \ifx\eTeXversion\undefined\else % etex gives us more logging
+  \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
     \tracingscantokens1
     \tracingifs1
     \tracinggroups1
   \errorcontextlines16
 }%
 
+% @errormsg{MSG}.  Do the index-like expansions on MSG, but if things
+% aren't perfect, it's not the end of the world, being an error message,
+% after all.
+% 
+\def\errormsg{\begingroup \indexnofonts \doerrormsg}
+\def\doerrormsg#1{\errmessage{#1}}
+
 % add check for \lastpenalty to plain's definitions.  If the last thing
 % we did was a \nobreak, we don't want to insert more space.
 %
 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
   \removelastskip\penalty-200\bigskip\fi\fi}
 
-% For @cropmarks command.
 % Do @cropmarks to get crop marks.
 %
 \newif\ifcropmarks
                % We don't want .vr (or whatever) entries like this:
                % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
                % "\acronym" won't work when it's read back in;
-               % it needs to be 
+               % it needs to be
                % {\code {{\tt \backslashcurfont }acronym}
     \shipout\vbox{%
       % Do this early so pdf references go to the beginning of the page.
 }
 \def\inenvironment#1{%
   \ifx#1\empty
-    out of any environment%
+    outside of any environment%
   \else
     in environment \expandafter\string#1%
   \fi
 \parseargdef\end{%
   \if 1\csname iscond.#1\endcsname
   \else
-    % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+    % The general wording of \badenverr may not be ideal.
     \expandafter\checkenv\csname#1\endcsname
     \csname E#1\endcsname
     \endgroup
 \newhelp\EMsimple{Press RETURN to continue.}
 
 
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
-  % Definitions to produce \{ and \} commands for indices,
-  % and @{ and @} for the aux/toc files.
-  \catcode`\{ = \other \catcode`\} = \other
-  \catcode`\[ = 1 \catcode`\] = 2
-  \catcode`\! = 0 \catcode`\\ = \other
-  !gdef!lbracecmd[\{]%
-  !gdef!rbracecmd[\}]%
-  !gdef!lbraceatcmd[@{]%
-  !gdef!rbraceatcmd[@}]%
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
-  \def\temp{#1}%
-  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
-  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
-  \else \errmessage{@dotless can be used only with i or j}%
-  \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence.  (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo.  Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
-  L\kern-.36em
-  {\setbox0=\hbox{T}%
-   \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
-  \kern-.15em
-  \TeX
-}
-
 % Be sure we're in horizontal mode when doing a tie, since we make space
 % equivalent to this in @example-like environments. Otherwise, a space
 % at the beginning of a line will start with \penalty -- and
 \def\:{\spacefactor=1000 }
 
 % @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
 
 % @/ allows a line break.
 \let\/=\allowbreak
 \def\?{?\spacefactor=\endofsentencespacefactor\space}
 
 % @frenchspacing on|off  says whether to put extra space after punctuation.
-% 
+%
 \def\onword{on}
 \def\offword{off}
 %
   \else\ifx\temp\offword \plainnonfrenchspacing
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+    \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
   \fi\fi
 }
 
@@ -800,15 +702,6 @@ where each line of input produces a line of output.}
 
 \newdimen\mil  \mil=0.001in
 
-% Old definition--didn't work.
-%\parseargdef\need{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
 \parseargdef\need{%
   % Ensure vertical mode, so we don't make a big box in the middle of a
   % paragraph.
@@ -872,7 +765,7 @@ where each line of input produces a line of output.}
 
 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
 % paragraph.  For more general purposes, use the \margin insertion
-% class.  WHICH is `l' or `r'.
+% class.  WHICH is `l' or `r'.  Not documented, written for gawk manual.
 %
 \newskip\inmarginspacing \inmarginspacing=1cm
 \def\strutdepth{\dp\strutbox}
@@ -919,6 +812,36 @@ where each line of input produces a line of output.}
   \temp
 }
 
+% @| inserts a changebar to the left of the current line.  It should
+% surround any changed text.  This approach does *not* work if the
+% change spans more than two lines of output.  To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).  This command
+% is not documented, not supported, and doesn't work.
+%
+\def\|{%
+  % \vadjust can only be used in horizontal mode.
+  \leavevmode
+  %
+  % Append this vertical mode material after the current line in the output.
+  \vadjust{%
+    % We want to insert a rule with the height and depth of the current
+    % leading; that is exactly what \strutbox is supposed to record.
+    \vskip-\baselineskip
+    %
+    % \vadjust-items are inserted at the left edge of the type.  So
+    % the \llap here moves out into the left-hand margin.
+    \llap{%
+      %
+      % For a thicker or thinner bar, change the `1pt'.
+      \vrule height\baselineskip width1pt
+      %
+      % This is the space between the bar and the text.
+      \hskip 12pt
+    }%
+  }%
+}
+
 % @include FILE -- \input text of FILE.
 %
 \def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -929,6 +852,7 @@ where each line of input produces a line of output.}
     \makevalueexpandable  % we want to expand any @value in FILE.
     \turnoffactive        % and allow special characters in the expansion
     \indexnofonts         % Allow `@@' and other weird things in file names.
+    \wlog{texinfo.tex: doing @include of #1^^J}%
     \edef\temp{\noexpand\input #1 }%
     %
     % This trickery is to read FILE outside of a group, in case it makes
@@ -964,7 +888,7 @@ where each line of input produces a line of output.}
 \def\popthisfilestack{\errthisfilestackempty}
 \def\errthisfilestackempty{\errmessage{Internal error:
   the stack of filenames is empty.}}
-
+%
 \def\thisfile{}
 
 % @center line
@@ -972,36 +896,46 @@ where each line of input produces a line of output.}
 %
 \parseargdef\center{%
   \ifhmode
-    \let\next\centerH
+    \let\centersub\centerH
   \else
-    \let\next\centerV
+    \let\centersub\centerV
   \fi
-  \next{\hfil \ignorespaces#1\unskip \hfil}%
+  \centersub{\hfil \ignorespaces#1\unskip \hfil}%
+  \let\centersub\relax % don't let the definition persist, just in case
 }
-\def\centerH#1{%
-  {%
-    \hfil\break
-    \advance\hsize by -\leftskip
-    \advance\hsize by -\rightskip
-    \line{#1}%
-    \break
-  }%
+\def\centerH#1{{%
+  \hfil\break
+  \advance\hsize by -\leftskip
+  \advance\hsize by -\rightskip
+  \line{#1}%
+  \break
+}}
+%
+\newcount\centerpenalty
+\def\centerV#1{%
+  % The idea here is the same as in \startdefun, \cartouche, etc.: if
+  % @center is the first thing after a section heading, we need to wipe
+  % out the negative parskip inserted by \sectionheading, but still
+  % prevent a page break here.
+  \centerpenalty = \lastpenalty
+  \ifnum\centerpenalty>10000 \vskip\parskip \fi
+  \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
+  \line{\kern\leftskip #1\kern\rightskip}%
 }
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
 
 % @sp n   outputs n lines of vertical space
-
+%
 \parseargdef\sp{\vskip #1\baselineskip}
 
 % @comment ...line which is ignored...
 % @c is the same as @comment
 % @ignore ... @end ignore  is another way to write a comment
-
+%
 \def\comment{\begingroup \catcode`\^^M=\other%
 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
 \commentxxx}
 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
+%
 \let\c=\comment
 
 % @paragraphindent NCHARS
@@ -1094,109 +1028,6 @@ where each line of input produces a line of output.}
 }
 
 
-% @asis just yields its argument.  Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
-  \catcode`\_ = \active
-  \gdef\mathunderscore{%
-    \catcode`\_=\active
-    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
-  }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care.  Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
-  \tex
-  \mathunderscore
-  \let\\ = \mathbackslash
-  \mathactive
-  % make the texinfo accent commands work in math mode
-  \let\"=\ddot
-  \let\'=\acute
-  \let\==\bar
-  \let\^=\hat
-  \let\`=\grave
-  \let\u=\breve
-  \let\v=\check
-  \let\~=\tilde
-  \let\dotaccent=\dot
-  $\finishmath
-}
-\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
-  \catcode`^ = \active
-  \catcode`< = \active
-  \catcode`> = \active
-  \catcode`+ = \active
-  \catcode`' = \active
-  \gdef\mathactive{%
-    \let^ = \ptexhat
-    \let< = \ptexless
-    \let> = \ptexgtr
-    \let+ = \ptexplus
-    \let' = \ptexquoteright
-  }
-}
-
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
-
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em.  So do
-% whichever is larger.
-%
-\def\dots{%
-  \leavevmode
-  \setbox0=\hbox{...}% get width of three periods
-  \ifdim\wd0 > 1.5em
-    \dimen0 = \wd0
-  \else
-    \dimen0 = 1.5em
-  \fi
-  \hbox to \dimen0{%
-    \hskip 0pt plus.25fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus.5fil
-  }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
-  \dots
-  \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
 % @refill is a no-op.
 \let\refill=\relax
 
@@ -1261,9 +1092,8 @@ where each line of input produces a line of output.}
 \newif\ifpdfmakepagedest
 
 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set).  So we test for \relax and 0 as well as \undefined,
-% borrowed from ifpdf.sty.
-\ifx\pdfoutput\undefined
+% can be set).  So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
 \else
   \ifx\pdfoutput\relax
   \else
@@ -1278,50 +1108,24 @@ where each line of input produces a line of output.}
 % for display in the outlines, and in other places.  Thus, we have to
 % double any backslashes.  Otherwise, a name like "\node" will be
 % interpreted as a newline (\n), followed by o, d, e.  Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
-% (and related messages, the final outcome is that it is up to the TeX
-% user to double the backslashes and otherwise make the string valid, so
-% that's what we do).
-
-% double active backslashes.
-% 
-{\catcode`\@=0 \catcode`\\=\active
- @gdef@activebackslashdouble{%
-   @catcode`@\=@active
-   @let\=@doublebackslash}
-}
-
-% To handle parens, we must adopt a different approach, since parens are
-% not active characters.  hyperref.dtx (which has the same problem as
-% us) handles it with this amazing macro to replace tokens, with minor
-% changes for Texinfo.  It is included here under the GPL by permission
-% from the author, Heiko Oberdiek.
-% 
-% #1 is the tokens to replace.
-% #2 is the replacement.
-% #3 is the control sequence with the string.
 % 
-\def\HyPsdSubst#1#2#3{%
-  \def\HyPsdReplace##1#1##2\END{%
-    ##1%
-    \ifx\\##2\\%
-    \else
-      #2%
-      \HyReturnAfterFi{%
-        \HyPsdReplace##2\END
-      }%
-    \fi
-  }%
-  \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
-}
-\long\def\HyReturnAfterFi#1\fi{\fi#1}
-
-% #1 is a control sequence in which to do the replacements.
-\def\backslashparens#1{%
-  \xdef#1{#1}% redefine it as its expansion; the definition is simply
-             % \lastnode when called from \setref -> \pdfmkdest.
-  \HyPsdSubst{(}{\realbackslash(}{#1}%
-  \HyPsdSubst{)}{\realbackslash)}{#1}%
+% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
+% related messages.  The final outcome is that it is up to the TeX user
+% to double the backslashes and otherwise make the string valid, so
+% that's what we do.  pdftex 1.30.0 (ca.2005) introduced a primitive to
+% do this reliably, so we use it.
+
+% #1 is a control sequence in which to do the replacements,
+% which we \xdef.
+\def\txiescapepdf#1{%
+  \ifx\pdfescapestring\thisisundefined
+    % No primitive available; should we give a warning or log?
+    % Many times it won't matter.
+  \else
+    % The expandable \pdfescapestring primitive escapes parentheses,
+    % backslashes, and other special chars.
+    \xdef#1{\pdfescapestring{#1}}%
+  \fi
 }
 
 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
@@ -1331,11 +1135,17 @@ output) for that.)}
 
 \ifpdf
   %
-  % Color manipulation macros based on pdfcolor.tex.
-  \def\cmykDarkRed{0.28 1 1 0.35}
-  \def\cmykBlack{0 0 0 1}
+  % Color manipulation macros based on pdfcolor.tex,
+  % except using rgb instead of cmyk; the latter is said to render as a
+  % very dark gray on-screen and a very dark halftone in print, instead
+  % of actual black.
+  \def\rgbDarkRed{0.50 0.09 0.12}
+  \def\rgbBlack{0 0 0}
+  %
+  % k sets the color for filling (usual text, etc.);
+  % K sets the color for stroking (thin rules, e.g., normal _'s).
+  \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
   %
-  \def\pdfsetcolor#1{\pdfliteral{#1 k}}
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
   \def\setcolor#1{%
@@ -1344,7 +1154,7 @@ output) for that.)}
     \pdfsetcolor{#1}%
   }
   %
-  \def\maincolor{\cmykBlack}
+  \def\maincolor{\rgbBlack}
   \pdfsetcolor{\maincolor}
   \edef\thiscolor{\maincolor}
   \def\lastcolordefs{}
@@ -1374,32 +1184,34 @@ output) for that.)}
   %
   % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
   \def\dopdfimage#1#2#3{%
-    \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
-    \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+    \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+    \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
     %
-    % pdftex (and the PDF format) support .png, .jpg, .pdf (among
-    % others).  Let's try in that order.
+    % pdftex (and the PDF format) support .pdf, .png, .jpg (among
+    % others).  Let's try in that order, PDF first since if
+    % someone has a scalable image, presumably better to use that than a
+    % bitmap.
     \let\pdfimgext=\empty
     \begingroup
-      \openin 1 #1.png \ifeof 1
-        \openin 1 #1.jpg \ifeof 1
-          \openin 1 #1.jpeg \ifeof 1
-            \openin 1 #1.JPG \ifeof 1
-              \openin 1 #1.pdf \ifeof 1
-                \openin 1 #1.PDF \ifeof 1
+      \openin 1 #1.pdf \ifeof 1
+        \openin 1 #1.PDF \ifeof 1
+          \openin 1 #1.png \ifeof 1
+            \openin 1 #1.jpg \ifeof 1
+              \openin 1 #1.jpeg \ifeof 1
+                \openin 1 #1.JPG \ifeof 1
                   \errhelp = \nopdfimagehelp
                   \errmessage{Could not find image file #1 for pdf}%
-                \else \gdef\pdfimgext{PDF}%
+                \else \gdef\pdfimgext{JPG}%
                 \fi
-              \else \gdef\pdfimgext{pdf}%
+              \else \gdef\pdfimgext{jpeg}%
               \fi
-            \else \gdef\pdfimgext{JPG}%
+            \else \gdef\pdfimgext{jpg}%
             \fi
-          \else \gdef\pdfimgext{jpeg}%
+          \else \gdef\pdfimgext{png}%
           \fi
-        \else \gdef\pdfimgext{jpg}%
+        \else \gdef\pdfimgext{PDF}%
         \fi
-      \else \gdef\pdfimgext{png}%
+      \else \gdef\pdfimgext{pdf}%
       \fi
       \closein 1
     \endgroup
@@ -1411,8 +1223,8 @@ output) for that.)}
     \else
       \immediate\pdfximage
     \fi
-      \ifdim \wd0 >0pt width \imagewidth \fi
-      \ifdim \wd2 >0pt height \imageheight \fi
+      \ifdim \wd0 >0pt width \pdfimagewidth \fi
+      \ifdim \wd2 >0pt height \pdfimageheight \fi
       \ifnum\pdftexversion<13
          #1.\pdfimgext
        \else
@@ -1427,10 +1239,9 @@ output) for that.)}
     % such as \, aren't expanded when present in a section title.
     \indexnofonts
     \turnoffactive
-    \activebackslashdouble
     \makevalueexpandable
     \def\pdfdestname{#1}%
-    \backslashparens\pdfdestname
+    \txiescapepdf\pdfdestname
     \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
   }}
   %
@@ -1439,8 +1250,8 @@ output) for that.)}
   %
   % by default, use a color that is dark enough to print on paper as
   % nearly black, but still distinguishable for online viewing.
-  \def\urlcolor{\cmykDarkRed}
-  \def\linkcolor{\cmykDarkRed}
+  \def\urlcolor{\rgbDarkRed}
+  \def\linkcolor{\rgbDarkRed}
   \def\endlink{\setcolor{\maincolor}\pdfendlink}
   %
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -1462,29 +1273,24 @@ output) for that.)}
     % page number.  We could generate a destination for the section
     % text in the case where a section has no node, but it doesn't
     % seem worth the trouble, since most documents are normally structured.
-    \def\pdfoutlinedest{#3}%
+    \edef\pdfoutlinedest{#3}%
     \ifx\pdfoutlinedest\empty
       \def\pdfoutlinedest{#4}%
     \else
-      % Doubled backslashes in the name.
-      {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
-       \backslashparens\pdfoutlinedest}%
+      \txiescapepdf\pdfoutlinedest
     \fi
     %
-    % Also double the backslashes in the display string.
-    {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
-     \backslashparens\pdfoutlinetext}%
+    % Also escape PDF chars in the display string.
+    \edef\pdfoutlinetext{#1}%
+    \txiescapepdf\pdfoutlinetext
     %
     \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
   }
   %
   \def\pdfmakeoutlines{%
     \begingroup
-      % Thanh's hack / proper braces in bookmarks
-      \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
-      \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
-      %
       % Read toc silently, to get counts of subentries for \pdfoutline.
+      \def\partentry##1##2##3##4{}% ignore parts in the outlines
       \def\numchapentry##1##2##3##4{%
        \def\thischapnum{##2}%
        \def\thissecnum{0}%
@@ -1538,25 +1344,41 @@ output) for that.)}
       % Latin 2 (0xea) gets translated to a | character.  Info from
       % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
       %
-      % xx to do this right, we have to translate 8-bit characters to
-      % their "best" equivalent, based on the @documentencoding.  Right
-      % now, I guess we'll just let the pdf reader have its way.
+      % TODO this right, we have to translate 8-bit characters to
+      % their "best" equivalent, based on the @documentencoding.  Too
+      % much work for too little return.  Just use the ASCII equivalents
+      % we use for the index sort strings.
+      % 
       \indexnofonts
       \setupdatafile
+      % We can have normal brace characters in the PDF outlines, unlike
+      % Texinfo index files.  So set that up.
+      \def\{{\lbracecharliteral}%
+      \def\}{\rbracecharliteral}%
       \catcode`\\=\active \otherbackslash
       \input \tocreadfilename
     \endgroup
   }
+  {\catcode`[=1 \catcode`]=2
+   \catcode`{=\other \catcode`}=\other
+   \gdef\lbracecharliteral[{]%
+   \gdef\rbracecharliteral[}]%
+  ]
   %
   \def\skipspaces#1{\def\PP{#1}\def\D{|}%
     \ifx\PP\D\let\nextsp\relax
     \else\let\nextsp\skipspaces
-      \ifx\p\space\else\addtokens{\filename}{\PP}%
-        \advance\filenamelength by 1
-      \fi
+      \addtokens{\filename}{\PP}%
+      \advance\filenamelength by 1
     \fi
     \nextsp}
-  \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+  \def\getfilename#1{%
+    \filenamelength=0
+    % If we don't expand the argument now, \skipspaces will get
+    % snagged on things like "@value{foo}".
+    \edef\temp{#1}%
+    \expandafter\skipspaces\temp|\relax
+  }
   \ifnum\pdftexversion < 14
     \let \startlink \pdfannotlink
   \else
@@ -1569,11 +1391,15 @@ output) for that.)}
       % tried to figure out what each command should do in the context
       % of @url.  for now, just make @/ a no-op, that's the only one
       % people have actually reported a problem with.
-      % 
+      %
       \normalturnoffactive
       \def\@{@}%
       \let\/=\empty
       \makevalueexpandable
+      % do we want to go so far as to use \indexnofonts instead of just
+      % special-casing \var here?
+      \def\var##1{##1}%
+      %
       \leavevmode\setcolor{\urlcolor}%
       \startlink attr{/Border [0 0 0]}%
         user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
@@ -1604,6 +1430,7 @@ output) for that.)}
     \setcolor{\linkcolor}#1\endlink}
   \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 \else
+  % non-pdf mode
   \let\pdfmkdest = \gobble
   \let\pdfurl = \gobble
   \let\endlink = \relax
@@ -1648,9 +1475,6 @@ output) for that.)}
 \def\ttsl{\setfontstyle{ttsl}}
 
 
-% Default leading.
-\newdimen\textleading  \textleading = 13.2pt
-
 % Set the baselineskip to #1, and the lineskip and strut size
 % correspondingly.  There is no deep meaning behind these magic numbers
 % used as factors; they just match (closely enough) what Knuth defined.
@@ -1662,6 +1486,7 @@ output) for that.)}
 % can get a sort of poor man's double spacing by redefining this.
 \def\baselinefactor{1}
 %
+\newdimen\textleading
 \def\setleading#1{%
   \dimen0 = #1\relax
   \normalbaselineskip = \baselinefactor\dimen0
@@ -1683,7 +1508,7 @@ output) for that.)}
 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
 % (\pdffontattr was introduced many years ago, but people still run
 % older pdftex's; it's easy to conditionalize, so we do.)
-\ifpdf \ifx\pdffontattr\undefined \else
+\ifpdf \ifx\pdffontattr\thisisundefined \else
   \begingroup
     \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
     \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
@@ -1934,28 +1759,34 @@ end
 \fi\fi
 
 
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
+% Set the font macro #1 to the font named \fontprefix#2.
 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
+% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
+% Example:
+% #1 = \textrm
+% #2 = \rmshape
+% #3 = 10
+% #4 = \mainmagstep
+% #5 = OT1
+%
 \def\setfont#1#2#3#4#5{%
   \font#1=\fontprefix#2#3 scaled #4
   \csname cmap#5\endcsname#1%
 }
 % This is what gets called when #5 of \setfont is empty.
 \let\cmap\gobble
-% emacs-page end of cmaps
+%
+% (end of cmaps)
 
 % Use cm as the default font prefix.
 % To specify the font prefix, you must define \fontprefix
 % before you read in texinfo.tex.
-\ifx\fontprefix\undefined
+\ifx\fontprefix\thisisundefined
 \def\fontprefix{cm}
 \fi
 % Support font families that don't use the same naming scheme as CM.
 \def\rmshape{r}
-\def\rmbshape{bx}               %where the normal face is bold
+\def\rmbshape{bx}               % where the normal face is bold
 \def\bfshape{b}
 \def\bxshape{bx}
 \def\ttshape{tt}
@@ -1970,9 +1801,8 @@ end
 \def\scshape{csc}
 \def\scbshape{csc}
 
-% Definitions for a main text size of 11pt.  This is the default in
-% Texinfo.
-% 
+% Definitions for a main text size of 11pt.  (The default in Texinfo.)
+%
 \def\definetextfontsizexi{%
 % Text fonts (11.2pt, magstep1).
 \def\textnominalsize{11pt}
@@ -2093,17 +1923,17 @@ end
 \font\reducedsy=cmsy10
 \def\reducedecsize{1000}
 
-% reset the current fonts
-\textfonts
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts            % reset the current fonts
 \rm
-} % end of 11pt text font size definitions
+} % end of 11pt text font size definitions, \definetextfontsizexi
 
 
 % Definitions to make the main text be 10pt Computer Modern, with
 % section, chapter, etc., sizes following suit.  This is for the GNU
 % Press printing of the Emacs 22 manual.  Maybe other manuals in the
 % future.  Used with @smallbook, which sets the leading to 12pt.
-% 
+%
 \def\definetextfontsizex{%
 % Text fonts (10pt).
 \def\textnominalsize{10pt}
@@ -2192,7 +2022,7 @@ end
 \setfont\secsf\sfbshape{12}{1000}{OT1}
 \let\secbf\secrm
 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
-\font\seci=cmmi12 
+\font\seci=cmmi12
 \font\secsy=cmsy10 scaled \magstep1
 \def\sececsize{1200}
 
@@ -2224,29 +2054,28 @@ end
 \font\reducedsy=cmsy9
 \def\reducedecsize{0900}
 
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
+\divide\parskip by 2  % reduce space between paragraphs
+\textleading = 12pt   % line spacing for 10pt CM
+\textfonts            % reset the current fonts
 \rm
-} % end of 10pt text font size definitions
+} % end of 10pt text font size definitions, \definetextfontsizex
 
 
 % We provide the user-level command
 %   @fonttextsize 10
 % (or 11) to redefine the text font size.  pt is assumed.
-% 
-\def\xword{10}
+%
 \def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
 %
 \parseargdef\fonttextsize{%
   \def\textsizearg{#1}%
-  \wlog{doing @fonttextsize \textsizearg}%
+  %\wlog{doing @fonttextsize \textsizearg}%
   %
   % Set \globaldefs so that documents can use this inside @tex, since
   % makeinfo 4.8 does not support it, but we need it nonetheless.
-  % 
+  %
  \begingroup \globaldefs=1
   \ifx\textsizearg\xword \definetextfontsizex
   \else \ifx\textsizearg\xiword \definetextfontsizexi
@@ -2296,7 +2125,7 @@ end
   \let\tenttsl=\titlettsl
   \def\curfontsize{title}%
   \def\lsize{chap}\def\lllsize{subsec}%
-  \resetmathfonts \setleading{25pt}}
+  \resetmathfonts \setleading{27pt}}
 \def\titlefont#1{{\titlefonts\rmisbold #1}}
 \def\chapfonts{%
   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
@@ -2348,6 +2177,16 @@ end
   \def\lsize{smaller}\def\lllsize{smaller}%
   \resetmathfonts \setleading{9.5pt}}
 
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
 % Set the fonts to use with the @small... environments.
 \let\smallexamplefonts = \smallfonts
 
@@ -2361,53 +2200,213 @@ end
 %
 % By the way, for comparison, here's what fits with @example (10pt):
 %   8.5x11=71  smallbook=60  a4=75  a5=58
-%
-% I wish the USA used A4 paper.
 % --karl, 24jan03.
 
-
 % Set up the default fonts, so we can use them for creating boxes.
 %
 \definetextfontsizexi
 
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font.  Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+  \csname markup#1true\endcsname
+  \def\currentmarkupstyle{#1}%
+  \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+  \expandafter\def\expandafter\markupstylesetup
+    \expandafter{\markupstylesetup #1}%
+  \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+  \expandafter\let\expandafter \temp
+    \csname markupsetuplq\currentmarkupstyle\endcsname
+  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+  \expandafter\let\expandafter \temp
+    \csname markupsetuprq\currentmarkupstyle\endcsname
+  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+%
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqkbd     \markupsetcodequoteleft
+\let\markupsetuprqkbd     \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \markupsetcodequoteright
+%
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+%
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+% Allow an option to not use regular directed right quote/apostrophe
+% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
+% The undirected quote is ugly, so don't make it the default, but it
+% works for pasting with more pdf viewers (at least evince), the
+% lilypond developers report.  xpdf does work with the regular 0x27.
+%
+\def\codequoteright{%
+  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+      '%
+    \else \char'15 \fi
+  \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+      % [Knuth] pp. 380,381,391
+      % \relax disables Spanish ligatures ?` and !` of \tt font.
+      \relax`%
+    \else \char'22 \fi
+  \else \char'22 \fi
+}
+
+% Commands to set the quote options.
+% 
+\parseargdef\codequoteundirected{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxicodequoteundirected\endcsname
+      = t%
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxicodequoteundirected\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
+  \fi\fi
+}
+%
+\parseargdef\codequotebacktick{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxicodequotebacktick\endcsname
+      = t%
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxicodequotebacktick\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
+  \fi\fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
 
 % Count depth in font-changes, for error checks
 \newcount\fontdepth \fontdepth=0
 
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+% Font commands.
 
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+  \ifusingtt 
+    {{\ttsl #2}\let\next=\relax}%
+    {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+  \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
 
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
-                    \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+  \ifx\next,%
+  \else\ifx\next-%
+  \else\ifx\next.%
+  \else\ptexslash
+  \fi\fi\fi
+  \aftersmartic
+}
 
-% like \smartslanted except unconditionally uses \ttsl.
-% @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+% Unconditional use \ttsl, and no ic.  @var is set to this for defuns.
+\def\ttslanted#1{{\ttsl #1}}
 
-% like \smartslanted except unconditionally use \sl.  We never want
+% @cite is like \smartslanted except unconditionally use \sl.  We never want
 % ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+
+\def\aftersmartic{}
+\def\var#1{%
+  \let\saveaftersmartic = \aftersmartic
+  \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+  \smartslanted{#1}%
+}
 
 \let\i=\smartitalic
 \let\slanted=\smartslanted
-\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
-% @b, explicit bold.
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}}              % roman font
+\def\sc#1{{\smallcaps#1}}       % smallcaps font
+\def\ii#1{{\it #1}}             % italic font
+
+% @b, explicit bold.  Also @strong.
 \def\b#1{{\bf #1}}
 \let\strong=\b
 
@@ -2439,30 +2438,21 @@ end
 \catcode`@=\other
 \def\endofsentencespacefactor{3000}% default
 
+% @t, explicit typewriter.
 \def\t#1{%
   {\tt \rawbackslash \plainfrenchspacing #1}%
   \null
 }
+
+% @samp.
 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
-\setfont\keyrm\rmshape{8}{1000}{OT1}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-    \vbox{\hrule\kern-0.4pt
-     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-    \kern-0.4pt\hrule}%
-  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-\def\key #1{{\setupmarkupstyle{key}\nohyphenation \uppercase{#1}}\null}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
 
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
 
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
 \def\tclose#1{%
   {%
     % Change normal interword space to be same as for the current font.
@@ -2481,13 +2471,13 @@ end
     \plainfrenchspacing
     #1%
   }%
-  \null
+  \null % reset spacefactor to 1000
 }
 
 % We *must* turn on hyphenation at `-' and `_' in @code.
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
-
+%
 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
 % both hyphenation at - and hyphenation within words.
 % We must therefore turn them both off (\tclose does that)
@@ -2506,14 +2496,16 @@ end
      \let-\codedash
      \let_\codeunder
     \else
-     \let-\realdash
+     \let-\normaldash
      \let_\realunder
     \fi
     \codex
   }
 }
 
-\def\realdash{-}
+\def\codex #1{\tclose{#1}\endgroup}
+
+\def\normaldash{-}
 \def\codedash{-\discretionary{}{}{}}
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
@@ -2526,13 +2518,12 @@ end
              \discretionary{}{}{}}%
             {\_}%
 }
-\def\codex #1{\tclose{#1}\endgroup}
 
 % An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__.  This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general.  @allowcodebreaks provides a way to control this.
-% 
+% each of the four underscores in __typeof__.  This is bad.
+% @allowcodebreaks provides a document-level way to turn breaking at -
+% and _ on and off.
+%
 \newif\ifallowcodebreaks  \allowcodebreakstrue
 
 \def\keywordtrue{true}
@@ -2546,62 +2537,25 @@ end
     \allowcodebreaksfalse
   \else
     \errhelp = \EMsimple
-    \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+    \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
   \fi\fi
 }
 
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-
-% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
-%   `example' (@kbd uses ttsl only inside of @example and friends),
-%   or `code' (@kbd uses normal tty font always).
-\parseargdef\kbdinputstyle{%
-  \def\txiarg{#1}%
-  \ifx\txiarg\worddistinct
-    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
-  \else\ifx\txiarg\wordexample
-    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
-  \else\ifx\txiarg\wordcode
-    \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
-  \else
-    \errhelp = \EMsimple
-    \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
-  \fi\fi\fi
-}
-\def\worddistinct{distinct}
-\def\wordexample{example}
-\def\wordcode{code}
-
-% Default is `distinct.'
-\kbdinputstyle distinct
-
-\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
-
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
 \let\command=\code
-
-% @clicksequence{File @click{} Open ...}
-\def\clicksequence#1{\begingroup #1\endgroup}
-
-% @clickstyle @arrow   (by default)
-\parseargdef\clickstyle{\def\click{#1}}
-\def\click{\arrow}
+\let\env=\code
+\let\file=\code
+\let\option=\code
 
 % @uref (abbreviation for `urlref') takes an optional (comma-separated)
 % second argument specifying the text to display and an optional third
 % arg as text to display instead of (rather than in addition to) the url
-% itself.  First (mandatory) arg is the url.  Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
+% itself.  First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
   \unsepspaces
   \pdfurl{#1}%
   \setbox0 = \hbox{\ignorespaces #3}%
@@ -2622,6 +2576,103 @@ end
   \endlink
 \endgroup}
 
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
+  \unsepspaces
+  \pdfurl{#1}%
+  \setbox0 = \hbox{\ignorespaces #3}%
+  \ifdim\wd0 > 0pt
+    \unhbox0 % third arg given, show only that
+  \else
+    \setbox0 = \hbox{\ignorespaces #2}%
+    \ifdim\wd0 > 0pt
+      \ifpdf
+        \unhbox0             % PDF: 2nd arg given, show only it
+      \else
+        \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+      \fi
+    \else
+      \urefcode{#1}% only url given, so show it
+    \fi
+  \fi
+  \endlink
+\endgroup}
+
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+  \catcode\ampChar=\active   \catcode\dotChar=\active
+  \catcode\hashChar=\active  \catcode\questChar=\active
+  \catcode\slashChar=\active
+}
+{
+  \urefcatcodes
+  %
+  \global\def\urefcode{\begingroup
+    \setupmarkupstyle{code}%
+    \urefcatcodes
+    \let&\urefcodeamp
+    \let.\urefcodedot
+    \let#\urefcodehash
+    \let?\urefcodequest
+    \let/\urefcodeslash
+    \codex
+  }
+  %
+  % By default, they are just regular characters.
+  \global\def&{\normalamp}
+  \global\def.{\normaldot}
+  \global\def#{\normalhash}
+  \global\def?{\normalquest}
+  \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's.  The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+  \catcode`\/=\active
+  \global\def\urefcodeslashfinish{%
+    \urefprestretch \slashChar
+    % Allow line break only after the final / in a sequence of
+    % slashes, to avoid line break between the slashes in http://.
+    \ifx\next/\else \urefpoststretch \fi
+  }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that.  Also allow no breaking at all, for manual control.
+% 
+\parseargdef\urefbreakstyle{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\wordnone
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+  \else\ifx\txiarg\wordbefore
+    \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+  \else\ifx\txiarg\wordafter
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+  \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
 % @url synonym for @uref, since that's how everyone uses it.
 %
 \let\url=\uref
@@ -2643,34 +2694,81 @@ end
   \let\email=\uref
 \fi
 
-% Check if we are currently using a typewriter font.  Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+%   `example' (@kbd uses ttsl only inside of @example and friends),
+%   or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+  \def\txiarg{#1}%
+  \ifx\txiarg\worddistinct
+    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+  \else\ifx\txiarg\wordexample
+    \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+  \else\ifx\txiarg\wordcode
+    \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
+  \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct'.
+\kbdinputstyle distinct
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
+\def\xkey{\key}
+\def\kbdsub#1#2#3\par{%
+  \def\one{#1}\def\three{#3}\def\threex{??}%
+  \ifx\one\xkey\ifx\threex\three \key{#2}%
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
+
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
+
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow   (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
 
 % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
 %
 \def\dmn#1{\thinspace #1}
 
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
 % @l was never documented to mean ``switch to the Lisp font'',
 % and it is not used as such in any manual I can find.  We need it for
 % Polish suppressed-l.  --karl, 22sep96.
 %\def\l#1{{\li #1}\null}
 
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}}              % roman font
-\def\sc#1{{\smallcaps#1}}       % smallcaps font
-\def\ii#1{{\it #1}}             % italic font
-
 % @acronym for "FBI", "NATO", and the like.
 % We print this one point size smaller, since it's intended for
 % all-uppercase.
-% 
+%
 \def\acronym#1{\doacronym #1,,\finish}
 \def\doacronym#1,#2,#3\finish{%
   {\selectfonts\lsize #1}%
@@ -2678,11 +2776,12 @@ end
   \ifx\temp\empty \else
     \space ({\unsepspaces \ignorespaces \temp \unskip})%
   \fi
+  \null % reset \spacefactor=1000
 }
 
 % @abbr for "Comput. J." and the like.
 % No font change, but don't do end-of-sentence spacing.
-% 
+%
 \def\abbr#1{\doabbr #1,,\finish}
 \def\doabbr#1,#2,#3\finish{%
   {\plainfrenchspacing #1}%
@@ -2690,8 +2789,258 @@ end
   \ifx\temp\empty \else
     \space ({\unsepspaces \ignorespaces \temp \unskip})%
   \fi
+  \null % reset \spacefactor=1000
+}
+
+% @asis just yields its argument.  Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+  \catcode`\_ = \active
+  \gdef\mathunderscore{%
+    \catcode`\_=\active
+    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+  }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+  \tex
+  \mathunderscore
+  \let\\ = \mathbackslash
+  \mathactive
+  % make the texinfo accent commands work in math mode
+  \let\"=\ddot
+  \let\'=\acute
+  \let\==\bar
+  \let\^=\hat
+  \let\`=\grave
+  \let\u=\breve
+  \let\v=\check
+  \let\~=\tilde
+  \let\dotaccent=\dot
+  $\finishmath
+}
+\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+  \catcode`^ = \active
+  \catcode`< = \active
+  \catcode`> = \active
+  \catcode`+ = \active
+  \catcode`' = \active
+  \gdef\mathactive{%
+    \let^ = \ptexhat
+    \let< = \ptexless
+    \let> = \ptexgtr
+    \let+ = \ptexplus
+    \let' = \ptexquoteright
+  }
+}
+
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+% 
+\def\outfmtnametex{tex}
+%
+\long\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\long\def\doinlinefmt#1,#2,\finish{%
+  \def\inlinefmtname{#1}%
+  \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely.  Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored.  But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too.  We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+% 
+\long\def\inlineraw{\tex \doinlineraw}
+\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+  \def\inlinerawname{#1}%
+  \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+  \endgroup % close group opened by \tex.
+}
+
+
+\message{glyphs,}
+% and logos.
+
+% @@ prints an @, as does @atchar{}.
+\def\@{\char64 }
+\let\atchar=\@
+
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
+\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
+\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
+\begingroup
+  % Definitions to produce \{ and \} commands for indices,
+  % and @{ and @} for the aux/toc files.
+  \catcode`\{ = \other \catcode`\} = \other
+  \catcode`\[ = 1 \catcode`\] = 2
+  \catcode`\! = 0 \catcode`\\ = \other
+  !gdef!lbracecmd[\{]%
+  !gdef!rbracecmd[\}]%
+  !gdef!lbraceatcmd[@{]%
+  !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+  \def\temp{#1}%
+  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+  \else \errmessage{@dotless can be used only with i or j}%
+  \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence.  (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo.  Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+  L\kern-.36em
+  {\setbox0=\hbox{T}%
+   \vbox to \ht0{\hbox{%
+     \ifx\textnominalsize\xwordpt
+       % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+       % Revert to plain's \scriptsize, which is 7pt.
+       \count255=\the\fam $\fam\count255 \scriptstyle A$%
+     \else
+       % For 11pt, we can use our lllsize.
+       \selectfonts\lllsize A%
+     \fi
+     }%
+     \vss
+  }}%
+  \kern-.15em
+  \TeX
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em.  So do
+% whichever is larger.
+%
+\def\dots{%
+  \leavevmode
+  \setbox0=\hbox{...}% get width of three periods
+  \ifdim\wd0 > 1.5em
+    \dimen0 = \wd0
+  \else
+    \dimen0 = 1.5em
+  \fi
+  \hbox to \dimen0{%
+    \hskip 0pt plus.25fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus.5fil
+  }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+  \dots
+  \spacefactor=\endofsentencespacefactor
 }
 
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+   \advance\hsize by -2\dimen2 % Rules.
+   \vbox{%
+      \hrule height\dimen2
+      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
+         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+         \kern3pt\vrule width\dimen2}% Space to right.
+      \hrule height\dimen2}
+    \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
 \def\pounds{{\it\$}}
@@ -2701,52 +3050,59 @@ end
 % Theiling, which support regular, slanted, bold and bold slanted (and
 % "outlined" (blackboard board, sort of) versions, which we don't need).
 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
-% 
+%
 % Although only regular is the truly official Euro symbol, we ignore
 % that.  The Euro is designed to be slightly taller than the regular
 % font height.
-% 
+%
 % feymr - regular
 % feymo - slanted
 % feybr - bold
 % feybo - bold slanted
-% 
+%
 % There is no good (free) typewriter version, to my knowledge.
 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
 % Hmm.
-% 
+%
 % Also doesn't work in math.  Do we need to do math with euro symbols?
 % Hope not.
-% 
-% 
+%
+%
 \def\euro{{\eurofont e}}
 \def\eurofont{%
   % We set the font at each command, rather than predefining it in
   % \textfonts and the other font-switching commands, so that
   % installations which never need the symbol don't have to have the
   % font installed.
-  % 
+  %
   % There is only one designed size (nominal 10pt), so we always scale
   % that to the current nominal size.
-  % 
+  %
   % By the way, simply using "at 1em" works for cmr10 and the like, but
   % does not work for cmbx10 and other extended/shrunken fonts.
-  % 
+  %
   \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
   %
-  \ifx\curfontstyle\bfstylename 
+  \ifx\curfontstyle\bfstylename
     % bold:
     \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
-  \else 
+  \else
     % regular:
     \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
   \fi
   \thiseurofont
 }
 
-% Hacks for glyphs from the EC fonts similar to \euro.  We don't
-% use \let for the aliases, because sometimes we redefine the original
-% macro, and the alias should reflect the redefinition.
+% Glyphs from the EC fonts.  We don't use \let for the aliases, because
+% sometimes we redefine the original macro, and the alias should reflect
+% the redefinition.
+%
+% Use LaTeX names for the Icelandic letters.
+\def\DH{{\ecfont \char"D0}} % Eth
+\def\dh{{\ecfont \char"F0}} % eth
+\def\TH{{\ecfont \char"DE}} % Thorn
+\def\th{{\ecfont \char"FE}} % thorn
+%
 \def\guillemetleft{{\ecfont \char"13}}
 \def\guillemotleft{\guillemetleft}
 \def\guillemetright{{\ecfont \char"14}}
@@ -2760,7 +3116,7 @@ end
 % we have the precomposed glyphs for the most common cases.  We put the
 % tests to use those glyphs in the single \ogonek macro so we have fewer
 % dummy definitions to worry about for index entries, etc.
-% 
+%
 % ogonek is also used with other letters in Lithuanian (IOU), but using
 % the precomposed glyphs for those is not so easy since they aren't in
 % the same EC font.
@@ -2783,6 +3139,7 @@ end
 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
 %
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
 \def\ecfont{%
   % We can't distinguish serif/sans and italic/slanted, but this
   % is used for crude hacks anyway (like adding French and German
@@ -2790,12 +3147,17 @@ end
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifx\curfontstyle\bfstylename
-    % bold:
-    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+  \ifmonospace
+    % typewriter:
+    \font\thisecfont = ectt\ecsize \space at \nominalsize
   \else
-    % regular:
-    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \ifx\curfontstyle\bfstylename
+      % bold:
+      \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+    \else
+      % regular:
+      \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \fi
   \fi
   \thisecfont
 }
@@ -2817,8 +3179,8 @@ end
 % Laurent Siebenmann reports \Orb undefined with:
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
 % so we'll define it if necessary.
-% 
-\ifx\Orb\undefined
+%
+\ifx\Orb\thisisundefined
 \def\Orb{\mathhexbox20D}
 \fi
 
@@ -2846,8 +3208,9 @@ end
 \newif\ifsetshortcontentsaftertitlepage
  \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
 
-\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
-        \endgroup\page\hbox{}\page}
+\parseargdef\shorttitlepage{%
+  \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+  \endgroup\page\hbox{}\page}
 
 \envdef\titlepage{%
   % Open one extra group, as we want to close it in the middle of \Etitlepage.
@@ -2907,14 +3270,28 @@ end
   \finishedtitlepagetrue
 }
 
-%%% Macros to be used within @titlepage:
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right.  This should be used
+% inside a \vbox, and fonts need to be set appropriately first.  Because
+% it is always used for titles, nothing else, we call \rmisbold.  \par
+% should be specified before the end of the \vbox, since a vbox is a group.
+% 
+\def\raggedtitlesettings{%
+  \rmisbold
+  \hyphenpenalty=10000
+  \parindent=0pt
+  \tolerance=5000
+  \ptexraggedright
+}
+
+% Macros to be used within @titlepage:
 
 \let\subtitlerm=\tenrm
 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
 
 \parseargdef\title{%
   \checkenv\titlepage
-  \leftline{\titlefonts\rmisbold #1}
+  \vbox{\titlefonts \raggedtitlesettings #1\par}%
   % print a rule at the page bottom also.
   \finishedtitlepagefalse
   \vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -2940,7 +3317,7 @@ end
 }
 
 
-%%% Set up page headings and footings.
+% Set up page headings and footings.
 
 \let\thispage=\folio
 
@@ -3034,10 +3411,14 @@ end
 
 \def\headings #1 {\csname HEADINGS#1\endcsname}
 
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
+\def\headingsoff{% non-global headings elimination
+  \evenheadline={\hfil}\evenfootline={\hfil}%
+   \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff  % it's the default
+
 % When we turn headings on, set the page number to 1.
 % For double-sided printing, put current file name in lower left corner,
 % chapter name on inside top of right hand pages, document
@@ -3088,7 +3469,7 @@ end
 % This produces Day Month Year style of output.
 % Only define if not already defined, in case a txi-??.tex file has set
 % up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
+\ifx\today\thisisundefined
 \def\today{%
   \number\day\space
   \ifcase\month
@@ -3149,7 +3530,7 @@ end
     \begingroup
       \advance\leftskip by-\tableindent
       \advance\hsize by\tableindent
-      \advance\rightskip by0pt plus1fil
+      \advance\rightskip by0pt plus1fil\relax
       \leavevmode\unhbox0\par
     \endgroup
     %
@@ -3163,7 +3544,7 @@ end
     % cause the example and the item to crash together.  So we use this
     % bizarre value of 10001 as a signal to \aboveenvbreak to insert
     % \parskip glue after all.  Section titles are handled this way also.
-    % 
+    %
     \penalty 10001
     \endgroup
     \itemxneedsnegativevskipfalse
@@ -3257,9 +3638,18 @@ end
   \parindent=0pt
   \parskip=\smallskipamount
   \ifdim\parskip=0pt \parskip=2pt \fi
+  %
+  % Try typesetting the item mark that if the document erroneously says
+  % something like @itemize @samp (intending @table), there's an error
+  % right away at the @itemize.  It's not the best error message in the
+  % world, but it's better than leaving it to the @item.  This means if
+  % the user wants an empty mark, they have to say @w{} not just @w.
   \def\itemcontents{#1}%
+  \setbox0 = \hbox{\itemcontents}%
+  %
   % @itemize with no arg is equivalent to @itemize @bullet.
   \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+  %
   \let\item=\itemizeitem
 }
 
@@ -3280,6 +3670,7 @@ end
    \ifnum\lastpenalty<10000 \parskip=0in \fi
    \noindent
    \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+   %
    \vadjust{\penalty 1200}}% not good to break after first line of item.
   \flushcr
 }
@@ -3501,12 +3892,19 @@ end
 %
 % @headitem starts a heading row, which we typeset in bold.
 % Assignments have to be global since we are inside the implicit group
-% of an alignment entry.  Note that \everycr resets \everytab.
-\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+% of an alignment entry.  \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+  \checkenv\multitable
+  \crcr
+  \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+  \the\everytab % for the first item
+}%
 %
 % A \tab used to include \hskip1sp.  But then the space in a template
 % line is not enough.  That is bad.  So let's go back to just `&' until
-% we encounter the problem it was intended to solve again.
+% we again encounter the problem the 1sp was intended to solve.
 %                                      --karl, nathan@acm.org, 20apr99.
 \def\tab{\checkenv\multitable &\the\everytab}%
 
@@ -3618,18 +4016,18 @@ end
 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
 \global\advance\multitablelinespace by-\ht0
 \fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%%        If so, set to same dimension as multitablelinespace.
+% Test to see if parskip is larger than space between lines of
+% table. If not, do nothing.
+%        If so, set to same dimension as multitablelinespace.
 \ifdim\multitableparskip>\multitablelinespace
 \global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
-                                      %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+                                      % than skip between lines in the table.
 \fi%
 \ifdim\multitableparskip=0pt
 \global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
-                                      %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+                                      % than skip between lines in the table.
 \fi}
 
 
@@ -3790,7 +4188,7 @@ end
     % ..., but we might end up with active ones in the argument if
     % we're called from @code, as @code{@value{foo-bar_}}, though.
     % So \let them to their normal equivalents.
-    \let-\realdash \let_\normalunderscore
+    \let-\normaldash \let_\normalunderscore
   }
 }
 
@@ -3830,7 +4228,7 @@ end
 }
 \def\ifsetfail{\doignore{ifset}}
 
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
 % defined with @set, or has been undefined with @clear.
 %
 % The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -3841,6 +4239,35 @@ end
 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
 \def\ifclearfail{\doignore{ifclear}}
 
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined.  We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+% 
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+    \makevalueexpandable
+    \let\next=\empty
+    \expandafter\ifx\csname #2\endcsname\relax
+      #1% If not defined, \let\next as above.
+    \fi
+    \expandafter
+  }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+  \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
+
 % @dircategory CATEGORY  -- specify a category of the dir file
 % which this file should belong to.  Ignore this in TeX.
 \let\dircategory=\comment
@@ -3944,11 +4371,14 @@ end
   \def\@{@}% change to @@ when we switch to @ as escape char in index files.
   \def\ {\realbackslash\space }%
   %
-  % Need these in case \tex is in effect and \{ is a \delimiter again.
-  % But can't use \lbracecmd and \rbracecmd because texindex assumes
-  % braces and backslashes are used only as delimiters.
-  \let\{ = \mylbrace
-  \let\} = \myrbrace
+  % Need these unexpandable (because we define \tt as a dummy)
+  % definitions when @{ or @} appear in index entry text.  Also, more
+  % complicated, when \tex is in effect and \{ is a \delimiter again.
+  % We can't use \lbracecmd and \rbracecmd because texindex assumes
+  % braces and backslashes are used only as delimiters.  Perhaps we
+  % should define @lbrace and @rbrace commands a la @comma.
+  \def\{{{\tt\char123}}%
+  \def\}{{\tt\char125}}%
   %
   % I don't entirely understand this, but when an index entry is
   % generated from a macro call, the \endinput which \scanmacro inserts
@@ -3959,7 +4389,7 @@ end
   % processing continues to some further point.  On the other hand, it
   % seems \endinput does not hurt in the printed index arg, since that
   % is still getting written without apparent harm.
-  % 
+  %
   % Sample source (mac-idx3.tex, reported by Graham Percival to
   % help-texinfo, 22may06):
   % @macro funindex {WORD}
@@ -3967,12 +4397,12 @@ end
   % @end macro
   % ...
   % @funindex commtest
-  % 
+  %
   % The above is not enough to reproduce the bug, but it gives the flavor.
-  % 
+  %
   % Sample whatsit resulting:
   % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
-  % 
+  %
   % So:
   \let\endinput = \empty
   %
@@ -4001,7 +4431,7 @@ end
 \def\commondummies{%
   %
   % \definedummyword defines \#1 as \string\#1\space, thus effectively
-  % preventing its expansion.  This is used only for control% words,
+  % preventing its expansion.  This is used only for control words,
   % not control letters, because the \space would be incorrect for
   % control characters, but is needed to separate the control word
   % from whatever follows.
@@ -4020,23 +4450,28 @@ end
   \commondummiesnofonts
   %
   \definedummyletter\_%
+  \definedummyletter\-%
   %
   % Non-English letters.
   \definedummyword\AA
   \definedummyword\AE
+  \definedummyword\DH
   \definedummyword\L
-  \definedummyword\OE
   \definedummyword\O
+  \definedummyword\OE
+  \definedummyword\TH
   \definedummyword\aa
   \definedummyword\ae
+  \definedummyword\dh
+  \definedummyword\exclamdown
   \definedummyword\l
-  \definedummyword\oe
   \definedummyword\o
-  \definedummyword\ss
-  \definedummyword\exclamdown
-  \definedummyword\questiondown
+  \definedummyword\oe
   \definedummyword\ordf
   \definedummyword\ordm
+  \definedummyword\questiondown
+  \definedummyword\ss
+  \definedummyword\th
   %
   % Although these internal commands shouldn't show up, sometimes they do.
   \definedummyword\bf
@@ -4052,20 +4487,25 @@ end
   \definedummyword\TeX
   %
   % Assorted special characters.
+  \definedummyword\arrow
   \definedummyword\bullet
   \definedummyword\comma
   \definedummyword\copyright
   \definedummyword\registeredsymbol
   \definedummyword\dots
   \definedummyword\enddots
+  \definedummyword\entrybreak
   \definedummyword\equiv
   \definedummyword\error
   \definedummyword\euro
+  \definedummyword\expansion
+  \definedummyword\geq
   \definedummyword\guillemetleft
   \definedummyword\guillemetright
   \definedummyword\guilsinglleft
   \definedummyword\guilsinglright
-  \definedummyword\expansion
+  \definedummyword\lbracechar
+  \definedummyword\leq
   \definedummyword\minus
   \definedummyword\ogonek
   \definedummyword\pounds
@@ -4077,6 +4517,7 @@ end
   \definedummyword\quoteleft
   \definedummyword\quoteright
   \definedummyword\quotesinglbase
+  \definedummyword\rbracechar
   \definedummyword\result
   \definedummyword\textdegree
   %
@@ -4122,18 +4563,27 @@ end
   \definedummyword\b
   \definedummyword\i
   \definedummyword\r
+  \definedummyword\sansserif
   \definedummyword\sc
+  \definedummyword\slanted
   \definedummyword\t
   %
   % Commands that take arguments.
+  \definedummyword\abbr
   \definedummyword\acronym
+  \definedummyword\anchor
   \definedummyword\cite
   \definedummyword\code
   \definedummyword\command
   \definedummyword\dfn
+  \definedummyword\dmn
+  \definedummyword\email
   \definedummyword\emph
   \definedummyword\env
   \definedummyword\file
+  \definedummyword\image
+  \definedummyword\indicateurl
+  \definedummyword\inforef
   \definedummyword\kbd
   \definedummyword\key
   \definedummyword\math
@@ -4161,7 +4611,7 @@ end
   \def\definedummyaccent##1{\let##1\asis}%
   % We can just ignore other control letters.
   \def\definedummyletter##1{\let##1\empty}%
-  % Hopefully, all control words can become @asis.
+  % All control words become @asis by default; overrides below.
   \let\definedummyword\definedummyaccent
   %
   \commondummiesnofonts
@@ -4173,48 +4623,63 @@ end
   %
   \def\ { }%
   \def\@{@}%
-  % how to handle braces?
   \def\_{\normalunderscore}%
+  \def\-{}% @- shouldn't affect sorting
+  %
+  % Unfortunately, texindex is not prepared to handle braces in the
+  % content at all.  So for index sorting, we map @{ and @} to strings
+  % starting with |, since that ASCII character is between ASCII { and }.
+  \def\{{|a}%
+  \def\lbracechar{|a}%
+  %
+  \def\}{|b}%
+  \def\rbracechar{|b}%
   %
   % Non-English letters.
   \def\AA{AA}%
   \def\AE{AE}%
+  \def\DH{DZZ}%
   \def\L{L}%
   \def\OE{OE}%
   \def\O{O}%
+  \def\TH{ZZZ}%
   \def\aa{aa}%
   \def\ae{ae}%
+  \def\dh{dzz}%
+  \def\exclamdown{!}%
   \def\l{l}%
   \def\oe{oe}%
-  \def\o{o}%
-  \def\ss{ss}%
-  \def\exclamdown{!}%
-  \def\questiondown{?}%
   \def\ordf{a}%
   \def\ordm{o}%
+  \def\o{o}%
+  \def\questiondown{?}%
+  \def\ss{ss}%
+  \def\th{zzz}%
   %
   \def\LaTeX{LaTeX}%
   \def\TeX{TeX}%
   %
   % Assorted special characters.
   % (The following {} will end up in the sort string, but that's ok.)
+  \def\arrow{->}%
   \def\bullet{bullet}%
   \def\comma{,}%
   \def\copyright{copyright}%
-  \def\registeredsymbol{R}%
   \def\dots{...}%
   \def\enddots{...}%
   \def\equiv{==}%
   \def\error{error}%
   \def\euro{euro}%
+  \def\expansion{==>}%
+  \def\geq{>=}%
   \def\guillemetleft{<<}%
   \def\guillemetright{>>}%
   \def\guilsinglleft{<}%
   \def\guilsinglright{>}%
-  \def\expansion{==>}%
+  \def\leq{<=}%
   \def\minus{-}%
-  \def\pounds{pounds}%
   \def\point{.}%
+  \def\pounds{pounds}%
   \def\print{-|}%
   \def\quotedblbase{"}%
   \def\quotedblleft{"}%
@@ -4222,22 +4687,31 @@ end
   \def\quoteleft{`}%
   \def\quoteright{'}%
   \def\quotesinglbase{,}%
+  \def\registeredsymbol{R}%
   \def\result{=>}%
-  \def\textdegree{degrees}%
+  \def\textdegree{o}%
+  %
+  \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+  \else \indexlquoteignore \fi
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
   % makeinfo does not expand macros in the argument to @deffn, which ends up
   % writing an index entry, and texindex isn't prepared for an index sort entry
   % that starts with \.
-  % 
+  %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
   % goes to end-of-line is not handled.
-  % 
+  %
   \macrolist
 }
 
+% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
+% ignore left quotes in the sort term.
+{\catcode`\`=\active
+ \gdef\indexlquoteignore{\let`=\empty}}
+
 \let\indexbackslash=0  %overridden during \printindex.
 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
 
@@ -4335,10 +4809,9 @@ end
 %
 % ..., ready, GO:
 %
-\def\safewhatsit#1{%
-\ifhmode
+\def\safewhatsit#1{\ifhmode
   #1%
-\else
+ \else
   % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
   \whatsitskip = \lastskip
   \edef\lastskipmacro{\the\lastskip}%
@@ -4362,7 +4835,6 @@ end
     % to re-insert the same penalty (values >10000 are used for various
     % signals); since we just inserted a non-discardable item, any
     % following glue (such as a \parskip) would be a breakpoint.  For example:
-    % 
     %   @deffn deffn-whatever
     %   @vindex index-whatever
     %   Description.
@@ -4375,8 +4847,7 @@ end
     % (the whatsit from the \write), so we must insert a \nobreak.
     \nobreak\vskip\whatsitskip
   \fi
-\fi
-}
+\fi}
 
 % The index entry written in the file actually looks like
 %  \entry {sortstring}{page}{topic}
@@ -4495,7 +4966,6 @@ end
 % But this freezes the catcodes in the argument, and can cause problems to
 % @code, which sets - active.  This problem was fixed by a kludge---
 % ``-'' was active throughout whole index, but this isn't really right.
-%
 % The right solution is to prevent \entry from swallowing the whole text.
 %                                 --kasal, 21nov03
 \def\entry{%
@@ -4532,10 +5002,17 @@ end
     % columns.
     \vskip 0pt plus1pt
     %
+    % When reading the text of entry, convert explicit line breaks
+    % from @* into spaces.  The user might give these in long section
+    % titles, for instance.
+    \def\*{\unskip\space\ignorespaces}%
+    \def\entrybreak{\hfil\break}%
+    %
     % Swallow the left brace of the text (first parameter):
     \afterassignment\doentry
     \let\temp =
 }
+\def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
     \bgroup % Instead of the swallowed brace.
       \noindent
@@ -4768,7 +5245,22 @@ end
 \message{sectioning,}
 % Chapters, sections, etc.
 
-% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+  \chapoddpage
+  \null
+  \vskip.3\vsize  % move it down on the page a bit
+  \begingroup
+    \noindent \titlefonts\rmisbold #1\par % the text
+    \let\lastnode=\empty      % no node to associate with
+    \writetocentry{part}{#1}{}% but put it in the toc
+    \headingsoff              % no headline or footline on the part page
+    \chapoddpage
+  \endgroup
+}
+
+% \unnumberedno is an oxymoron.  But we count the unnumbered
 % sections so that we can refer to them unambiguously in the pdf
 % outlines by their "section number".  We avoid collisions with chapter
 % numbers by starting them at 10000.  (If a document ever has 10000
@@ -4847,8 +5339,8 @@ end
 \chardef\maxseclevel = 3
 %
 % A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
 %
 % Trace whether the current chapter is an appendix or not:
 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
@@ -4873,8 +5365,8 @@ end
   % The heading type:
   \def\headtype{#1}%
   \if \headtype U%
-    \ifnum \absseclevel < \unmlevel
-      \chardef\unmlevel = \absseclevel
+    \ifnum \absseclevel < \unnlevel
+      \chardef\unnlevel = \absseclevel
     \fi
   \else
     % Check for appendix sections:
@@ -4886,10 +5378,10 @@ end
       \fi\fi
     \fi
     % Check for numbered within unnumbered:
-    \ifnum \absseclevel > \unmlevel
+    \ifnum \absseclevel > \unnlevel
       \def\headtype{U}%
     \else
-      \chardef\unmlevel = 3
+      \chardef\unnlevel = 3
     \fi
   \fi
   % Now print the heading:
@@ -4943,7 +5435,9 @@ end
   \gdef\chaplevelprefix{\the\chapno.}%
   \resetallfloatnos
   %
-  \message{\putwordChapter\space \the\chapno}%
+  % \putwordChapter can contain complex things in translations.
+  \toks0=\expandafter{\putwordChapter}%
+  \message{\the\toks0 \space \the\chapno}%
   %
   % Write the actual heading.
   \chapmacro{#1}{Ynumbered}{\the\chapno}%
@@ -4954,15 +5448,17 @@ end
   \global\let\subsubsection = \numberedsubsubsec
 }
 
-\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
+%
 \def\appendixzzz#1{%
   \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
     \global\advance\appendixno by 1
   \gdef\chaplevelprefix{\appendixletter.}%
   \resetallfloatnos
   %
-  \def\appendixnum{\putwordAppendix\space \appendixletter}%
-  \message{\appendixnum}%
+  % \putwordAppendix can contain complex things in translations.
+  \toks0=\expandafter{\putwordAppendix}%
+  \message{\the\toks0 \space \appendixletter}%
   %
   \chapmacro{#1}{Yappendix}{\appendixletter}%
   %
@@ -4971,7 +5467,8 @@ end
   \global\let\subsubsection = \appendixsubsubsec
 }
 
-\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+% normally unnmhead0 calls unnumberedzzz:
+\outer\parseargdef\unnumbered{\unnmhead0{#1}}
 \def\unnumberedzzz#1{%
   \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
     \global\advance\unnumberedno by 1
@@ -5015,40 +5512,47 @@ end
 \let\top\unnumbered
 
 % Sections.
+% 
 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
 \def\seczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
 }
 
-\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+% normally calls appendixsectionzzz:
+\outer\parseargdef\appendixsection{\apphead1{#1}}
 \def\appendixsectionzzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
 }
 \let\appendixsec\appendixsection
 
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+% normally calls unnumberedseczzz:
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
 \def\unnumberedseczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
   \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
 }
 
 % Subsections.
-\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+% 
+% normally calls numberedsubseczzz:
+\outer\parseargdef\numberedsubsec{\numhead2{#1}}
 \def\numberedsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
 }
 
-\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+% normally calls appendixsubseczzz:
+\outer\parseargdef\appendixsubsec{\apphead2{#1}}
 \def\appendixsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Yappendix}%
                  {\appendixletter.\the\secno.\the\subsecno}%
 }
 
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+% normally calls unnumberedsubseczzz:
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
 \def\unnumberedsubseczzz#1{%
   \global\subsubsecno=0  \global\advance\subsecno by 1
   \sectionheading{#1}{subsec}{Ynothing}%
@@ -5056,21 +5560,25 @@ end
 }
 
 % Subsubsections.
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+% 
+% normally numberedsubsubseczzz:
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
 \def\numberedsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Ynumbered}%
                  {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
 }
 
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+% normally appendixsubsubseczzz:
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
 \def\appendixsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Yappendix}%
                  {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
 }
 
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+% normally unnumberedsubsubseczzz:
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
 \def\unnumberedsubsubseczzz#1{%
   \global\advance\subsubsecno by 1
   \sectionheading{#1}{subsubsec}{Ynothing}%
@@ -5086,14 +5594,6 @@ end
 
 % Define @majorheading, @heading and @subheading
 
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-%       1) We use \vbox rather than the earlier \line to permit
-%          overlong headings to fold.
-%       2) \hyphenpenalty is set to 10000 because hyphenation in a
-%          heading is obnoxious; this forbids it.
-%       3) Likewise, headings look best if no \parindent is used, and
-%          if justification is not attempted.  Hence \raggedright.
-
 \def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
   \parsearg\chapheadingzzz
@@ -5101,10 +5601,8 @@ end
 
 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
 \def\chapheadingzzz#1{%
-  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\raggedright
-                    \rmisbold #1\hfill}}%
-  \bigskip \par\penalty 200\relax
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip \nobreak
   \suppressfirstparagraphindent
 }
 
@@ -5120,14 +5618,13 @@ end
 % (including whitespace, linebreaking, etc. around it),
 % given all the information in convenient, parsed form.
 
-%%% Args are the skip and penalty (usually negative)
+% Args are the skip and penalty (usually negative)
 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
 
-%%% Define plain chapter starts, and page on/off switching for it
 % Parameter controlling skip before chapter headings (if needed)
-
 \newskip\chapheadingskip
 
+% Define plain chapter starts, and page on/off switching for it.
 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
 \def\chappager{\par\vfill\supereject}
 % Because \domark is called before \chapoddpage, the filler page will
@@ -5137,9 +5634,8 @@ end
   \chappager
   \ifodd\pageno \else
     \begingroup
-      \evenheadline={\hfil}\evenfootline={\hfil}%
-      \oddheadline={\hfil}\oddfootline={\hfil}%
-      \hbox to 0pt{}%
+      \headingsoff
+      \null
       \chappager
     \endgroup
   \fi
@@ -5195,7 +5691,10 @@ end
     \xdef\lastchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\appendixletter}%
-      \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+      % \noexpand\putwordAppendix avoids expanding indigestible
+      % commands in some of the translations.
+      \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
+                                 \noexpand\thischapternum:
                                  \noexpand\thischaptername}%
     }%
   \else
@@ -5203,7 +5702,10 @@ end
     \xdef\lastchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\the\chapno}%
-      \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+      % \noexpand\putwordChapter avoids expanding indigestible
+      % commands in some of the translations.
+      \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+                                 \noexpand\thischapternum:
                                  \noexpand\thischaptername}%
     }%
   \fi\fi\fi
@@ -5259,8 +5761,7 @@ end
     %
     % Typeset the actual heading.
     \nobreak % Avoid page breaks at the interline glue.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
-          \hangindent=\wd0 \centerparametersmaybe
+    \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
           \unhbox0 #1\par}%
   }%
   \nobreak\bigskip % no page break after a chapter title
@@ -5282,18 +5783,18 @@ end
 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
 %
 \def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt\raggedright
-                       \rmisbold #1\hfill}}\bigskip \par\nobreak
+  \chapoddpage
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip\nobreak
 }
 \def\chfopen #1#2{\chapoddpage {\chapfonts
 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
 \par\penalty 5000 %
 }
 \def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt
-                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+  \chapoddpage
+  \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
+  \nobreak\bigskip \nobreak
 }
 \def\CHAPFopen{%
   \global\let\chapmacro=\chfopen
@@ -5325,6 +5826,8 @@ end
 %
 \def\sectionheading#1#2#3#4{%
   {%
+    \checkenv{}% should not be in an environment.
+    %
     % Switch to the right set of fonts.
     \csname #2fonts\endcsname \rmisbold
     %
@@ -5346,7 +5849,10 @@ end
         \xdef\lastsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
-          \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+          % \noexpand\putwordSection avoids expanding indigestible
+          % commands in some of the translations.
+          \gdef\noexpand\thissection{\noexpand\putwordSection{}
+                                     \noexpand\thissectionnum:
                                      \noexpand\thissectionname}%
         }%
       \fi
@@ -5356,12 +5862,20 @@ end
         \xdef\lastsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
-          \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+          % \noexpand\putwordSection avoids expanding indigestible
+          % commands in some of the translations.
+          \gdef\noexpand\thissection{\noexpand\putwordSection{}
+                                     \noexpand\thissectionnum:
                                      \noexpand\thissectionname}%
         }%
       \fi
     \fi\fi\fi
     %
+    % Go into vertical mode.  Usually we'll already be there, but we
+    % don't want the following whatsit to end up in a preceding paragraph
+    % if the document didn't happen to have a blank line.
+    \par
+    %
     % Output the mark.  Pass it through \safewhatsit, to take care of
     % the preceding space.
     \safewhatsit\domark
@@ -5411,7 +5925,7 @@ end
     \nobreak
     %
     % Output the actual section heading.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
           \hangindent=\wd0  % zero if no section number
           \unhbox0 #1}%
   }%
@@ -5425,15 +5939,15 @@ end
   %
   % We'll almost certainly start a paragraph next, so don't let that
   % glue accumulate.  (Not a breakpoint because it's preceded by a
-  % discardable item.)
+  % discardable item.)  However, when a paragraph is not started next
+  % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
+  % or the negative glue will cause weirdly wrong output, typically
+  % obscuring the section heading with something else.
   \vskip-\parskip
-  % 
-  % This is purely so the last item on the list is a known \penalty >
-  % 10000.  This is so \startdefun can avoid allowing breakpoints after
-  % section headings.  Otherwise, it would insert a valid breakpoint between:
-  % 
-  %   @section sec-whatever
-  %   @deffn def-whatever
+  %
+  % This is so the last item on the main vertical list is a known
+  % \penalty > 10000, so \startdefun, etc., can recognize the situation
+  % and do the needful.
   \penalty 10001
 }
 
@@ -5489,7 +6003,7 @@ end
 % These characters do not print properly in the Computer Modern roman
 % fonts, so we must take special care.  This is more or less redundant
 % with the Texinfo input format setup at the end of this file.
-% 
+%
 \def\activecatcodes{%
   \catcode`\"=\active
   \catcode`\$=\active
@@ -5539,7 +6053,7 @@ end
 
 % redefined for the two-volume lispref.  We always output on
 % \jobname.toc even if this is redefined.
-% 
+%
 \def\tocreadfilename{\jobname.toc}
 
 % Normal (long) toc.
@@ -5565,6 +6079,7 @@ end
 \def\summarycontents{%
   \startcontents{\putwordShortTOC}%
     %
+    \let\partentry = \shortpartentry
     \let\numchapentry = \shortchapentry
     \let\appentry = \shortchapentry
     \let\unnchapentry = \shortunnchapentry
@@ -5620,6 +6135,19 @@ end
 % The last argument is the page number.
 % The arguments in between are the chapter number, section number, ...
 
+% Parts, in the main contents.  Replace the part number, which doesn't
+% exist, with an empty box.  Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+  \penalty-300
+  \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+  \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
 % Chapters, in the main contents.
 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
 %
@@ -5692,164 +6220,26 @@ end
 \endgroup}
 
 % We use the same \entry macro as for the index entries.
-\let\tocentry = \entry
-
-% Space between chapter (or whatever) number and the title.
-\def\labelspace{\hskip1em \relax}
-
-\def\dopageno#1{{\rm #1}}
-\def\doshortpageno#1{{\rm #1}}
-
-\def\chapentryfonts{\secfonts \rm}
-\def\secentryfonts{\textfonts}
-\def\subsecentryfonts{\textfonts}
-\def\subsubsecentryfonts{\textfonts}
-
-
-\message{environments,}
-% @foo ... @end foo.
-
-% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
-% define and register \INITMACRO to be called on markup style changes.
-% \INITMACRO can check \currentmarkupstyle for the innermost
-% style and the set of \ifmarkupSTYLE switches for all styles
-% currently in effect.
-\newif\ifmarkupvar
-\newif\ifmarkupsamp
-\newif\ifmarkupkey
-%\newif\ifmarkupfile % @file == @samp.
-%\newif\ifmarkupoption % @option == @samp.
-\newif\ifmarkupcode
-\newif\ifmarkupkbd
-%\newif\ifmarkupenv % @env == @code.
-%\newif\ifmarkupcommand % @command == @code.
-\newif\ifmarkuptex % @tex (and part of @math, for now).
-\newif\ifmarkupexample
-\newif\ifmarkupverb
-\newif\ifmarkupverbatim
-
-\let\currentmarkupstyle\empty
-
-\def\setupmarkupstyle#1{%
-  \csname markup#1true\endcsname
-  \def\currentmarkupstyle{#1}%
-  \markupstylesetup
-}
-
-\let\markupstylesetup\empty
-
-\def\defmarkupstylesetup#1{%
-  \expandafter\def\expandafter\markupstylesetup
-    \expandafter{\markupstylesetup #1}%
-  \def#1%
-}
-
-% Markup style setup for left and right quotes.
-\defmarkupstylesetup\markupsetuplq{%
-  \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
-  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
-}
-
-\defmarkupstylesetup\markupsetuprq{%
-  \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
-  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
-}
-
-{
-\catcode`\'=\active
-\catcode`\`=\active
-
-\gdef\markupsetuplqdefault{\let`\lq}
-\gdef\markupsetuprqdefault{\let'\rq}
-
-\gdef\markupsetcodequoteleft{\let`\codequoteleft}
-\gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
-}
-
-\let\markupsetuplqcode \markupsetcodequoteleft
-\let\markupsetuprqcode \markupsetcodequoteright
-\let\markupsetuplqexample \markupsetcodequoteleft
-\let\markupsetuprqexample \markupsetcodequoteright
-\let\markupsetuplqverb \markupsetcodequoteleft
-\let\markupsetuprqverb \markupsetcodequoteright
-\let\markupsetuplqverbatim \markupsetcodequoteleft
-\let\markupsetuprqverbatim \markupsetcodequoteright
-
-\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report.  xpdf does work with the
-% regular 0x27.  
-% 
-\def\codequoteright{%
-  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
-    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
-      '%
-    \else \char'15 \fi
-  \else \char'15 \fi
-}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
-% 
-\def\codequoteleft{%
-  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
-    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
-      % [Knuth] pp. 380,381,391
-      % \relax disables Spanish ligatures ?` and !` of \tt font.
-      \relax`%
-    \else \char'22 \fi
-  \else \char'22 \fi
-}
-
-% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
-\def\noligaturesquoteleft{\relax\lq}
-
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, they should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
-\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
-   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
-   \advance\hsize by -2\dimen2 % Rules.
-   \vbox{%
-      \hrule height\dimen2
-      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
-         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
-         \kern3pt\vrule width\dimen2}% Space to right.
-      \hrule height\dimen2}
-    \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
+\let\tocentry = \entry
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\def\subsecentryfonts{\textfonts}
+\def\subsubsecentryfonts{\textfonts}
+
+
+\message{environments,}
+% @foo ... @end foo.
 
-% @tex ... @end tex    escapes into raw Tex temporarily.
+% @tex ... @end tex    escapes into raw TeX temporarily.
 % One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
+% But \@ or @@ will get a plain @ character.
 
 \envdef\tex{%
   \setupmarkupstyle{tex}%
@@ -5866,6 +6256,10 @@ end
   \catcode`\'=\other
   \escapechar=`\\
   %
+  % ' is active in math mode (mathcode"8000).  So reset it, and all our
+  % other math active characters (just in case), to plain's definitions.
+  \mathactive
+  %
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -5969,6 +6363,12 @@ end
   \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
   % Flag to tell @lisp, etc., not to narrow margin.
   \let\nonarrowing = t%
+  %
+  % If this cartouche directly follows a sectioning command, we need the
+  % \parskip glue (backspaced over by default) or the cartouche can
+  % collide with the section heading.
+  \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
+  %
   \vbox\bgroup
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
       \carttop
@@ -5982,7 +6382,7 @@ end
              \lineskip=\normlskip
              \parskip=\normpskip
              \vskip -\parskip
-             \comment % For explanation, see the end of \def\group.
+             \comment % For explanation, see the end of def\group.
 }
 \def\Ecartouche{%
               \ifhmode\par\fi
@@ -5999,6 +6399,7 @@ end
 
 % This macro is called at the beginning of all the @example variants,
 % inside a group.
+\newdimen\nonfillparindent
 \def\nonfillstart{%
   \aboveenvbreak
   \hfuzz = 12pt % Don't be fussy
@@ -6006,7 +6407,12 @@ end
   \let\par = \lisppar % don't ignore blank lines
   \obeylines % each line of input is a line of output
   \parskip = 0pt
+  % Turn off paragraph indentation but redefine \indent to emulate
+  % the normal \indent.
+  \nonfillparindent=\parindent
   \parindent = 0pt
+  \let\indent\nonfillindent
+  %
   \emergencystretch = 0pt % don't try to avoid overfull boxes
   \ifx\nonarrowing\relax
     \advance \leftskip by \lispnarrowing
@@ -6017,6 +6423,24 @@ end
   \let\exdent=\nofillexdent
 }
 
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
 % If you want all examples etc. small: @set dispenvsize small.
 % If you want even small examples the full size: @set dispenvsize nosmall.
 % This affects the following displayed environments:
@@ -6044,41 +6468,42 @@ end
 }
 
 % We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
-  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
-  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+% Let's do it in one command.  #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
   \expandafter\let\csname E#1\endcsname \afterenvbreak
   \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
 }
 
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
-  \makedispenv{#1}{#3}
-  \makedispenv{#2}{#3}
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+  \makedispenvdef{#1}{#3}%
+  \makedispenvdef{#2}{#3}%
 }
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
 %
 % @smallexample and @smalllisp: use smaller fonts.
 % Originally contributed by Pavel@xerox.
 %
-\maketwodispenv{lisp}{example}{%
+\maketwodispenvdef{lisp}{example}{%
   \nonfillstart
   \tt\setupmarkupstyle{example}%
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
-  \gobble       % eat return
+  \gobble % eat return
 }
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
-\makedispenv {display}{%
+\makedispenvdef{display}{%
   \nonfillstart
   \gobble
 }
 
 % @format/@smallformat: same as @display except don't narrow margins.
 %
-\makedispenv{format}{%
+\makedispenvdef{format}{%
   \let\nonarrowing = t%
   \nonfillstart
   \gobble
@@ -6097,54 +6522,63 @@ end
 \envdef\flushright{%
   \let\nonarrowing = t%
   \nonfillstart
-  \advance\leftskip by 0pt plus 1fill
+  \advance\leftskip by 0pt plus 1fill\relax
   \gobble
 }
 \let\Eflushright = \afterenvbreak
 
 
+% @raggedright does more-or-less normal line breaking but no right
+% justification.  From plain.tex.
+\envdef\raggedright{%
+  \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+  \parindent=0pt \leftskip0pt plus2em
+  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+  \hbadness=10000 % Last line will usually be underfull, so turn off
+                  % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+  \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+  \hbadness=10000 % Last line will usually be underfull, so turn off
+                  % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
 % and narrows the margins.  We keep \parskip nonzero in general, since
 % we're doing normal filling.  So, when using \aboveenvbreak and
 % \afterenvbreak, temporarily make \parskip 0.
 %
+\makedispenvdef{quotation}{\quotationstart}
+%
 \def\quotationstart{%
-  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
-  \parindent=0pt
-  %
-  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \indentedblockstart % same as \indentedblock, but increase right margin too.
   \ifx\nonarrowing\relax
-    \advance\leftskip by \lispnarrowing
     \advance\rightskip by \lispnarrowing
-    \exdentamount = \lispnarrowing
-  \else
-    \let\nonarrowing = \relax
   \fi
   \parsearg\quotationlabel
 }
 
-\envdef\quotation{%
-  \setnormaldispenv
-  \quotationstart
-}
-
-\envdef\smallquotation{%
-  \setsmalldispenv
-  \quotationstart
-}
-\let\Esmallquotation = \Equotation
-
 % We have retained a nonzero parskip for the environment, since we're
 % doing normal filling.
 %
 \def\Equotation{%
   \par
-  \ifx\quotationauthor\undefined\else
+  \ifx\quotationauthor\thisisundefined\else
     % indent a bit.
     \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
   \fi
   {\parskip=0pt \afterenvbreak}%
 }
+\def\Esmallquotation{\Equotation}
 
 % If we're given an argument, typeset it in bold with a colon after.
 \def\quotationlabel#1{%
@@ -6154,6 +6588,32 @@ end
   \fi
 }
 
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+% 
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+  \parindent=0pt
+  %
+  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \ifx\nonarrowing\relax
+    \advance\leftskip by \lispnarrowing
+    \exdentamount = \lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+  \par
+  {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
+
 
 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
 % If we want to allow any <char> as delimiter,
@@ -6201,21 +6661,28 @@ end
 
 % Setup for the @verbatim environment
 %
-% Real tab expansion
+% Real tab expansion.
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
-\def\starttabbox{\setbox0=\hbox\bgroup}
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs.  The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group.  Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset.  Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
 %
 \begingroup
   \catcode`\^^I=\active
   \gdef\tabexpand{%
     \catcode`\^^I=\active
     \def^^I{\leavevmode\egroup
-      \dimen0=\wd0 % the width so far, or since the previous tab
-      \divide\dimen0 by\tabw
-      \multiply\dimen0 by\tabw % compute previous multiple of \tabw
-      \advance\dimen0 by\tabw  % advance to next multiple of \tabw
-      \wd0=\dimen0 \box0 \starttabbox
+      \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+      \divide\dimen\verbbox by\tabw
+      \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+      \advance\dimen\verbbox by\tabw  % advance to next multiple of \tabw
+      \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
     }%
   }
 \endgroup
@@ -6224,15 +6691,16 @@ end
 \def\setupverbatim{%
   \let\nonarrowing = t%
   \nonfillstart
-  % Easiest (and conventionally used) font for verbatim
-  \tt
-  \def\par{\leavevmode\egroup\box0\endgraf}%
+  \tt % easiest (and conventionally used) font for verbatim
+  % The \leavevmode here is for blank lines.  Otherwise, we would
+  % never \starttabox and the \egroup would end verbatim mode.
+  \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
   \tabexpand
   \setupmarkupstyle{verbatim}%
   % Respect line breaks,
   % print special symbols as themselves, and
-  % make each space count
-  % must do in this order:
+  % make each space count.
+  % Must do in this order:
   \obeylines \uncatcodespecials \sepspaces
   \everypar{\starttabbox}%
 }
@@ -6289,6 +6757,7 @@ end
     \makevalueexpandable
     \setupverbatim
     \indexnofonts       % Allow `@@' and other weird things in file names.
+    \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
     \input #1
     \afterenvbreak
   }%
@@ -6338,7 +6807,7 @@ end
     % commands also insert a nobreak penalty, and we don't want to allow
     % a break between a section heading and a defun.
     %
-    % As a minor refinement, we avoid "club" headers by signalling
+    % As a further refinement, we avoid "club" headers by signalling
     % with penalty of 10003 after the very first @deffn in the
     % sequence (see above), and penalty of 10002 after any following
     % @def command.
@@ -6375,7 +6844,7 @@ end
     #1#2 \endheader
     % common ending:
     \interlinepenalty = 10000
-    \advance\rightskip by 0pt plus 1fil
+    \advance\rightskip by 0pt plus 1fil\relax
     \endgraf
     \nobreak\vskip -\parskip
     \penalty\defunpenalty  % signal to \startdefun and \dodefunx
@@ -6405,13 +6874,36 @@ end
 \def\domakedefun#1#2#3{%
   \envdef#1{%
     \startdefun
+    \doingtypefnfalse    % distinguish typed functions from all else
     \parseargusing\activeparens{\printdefunline#3}%
   }%
   \def#2{\dodefunx#1}%
   \def#3%
 }
 
-%%% Untyped functions:
+\newif\ifdoingtypefn       % doing typed function?
+\newif\ifrettypeownline    % typeset return type on its own line?
+
+% @deftypefnnewline on|off says whether the return type of typed functions
+% are printed on their own line.  This affects @deftypefn, @deftypefun,
+% @deftypeop, and @deftypemethod.
+% 
+\parseargdef\deftypefnnewline{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETtxideftypefnnl\endcsname
+      = \empty
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETtxideftypefnnl\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @txideftypefnnl value `\temp',
+                must be on|off}%
+  \fi\fi
+}
+
+% Untyped functions:
 
 % @deffn category name args
 \makedefun{deffn}{\deffngeneral{}}
@@ -6430,7 +6922,7 @@ end
   \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
 
-%%% Typed functions:
+% Typed functions:
 
 % @deftypefn category type name args
 \makedefun{deftypefn}{\deftypefngeneral{}}
@@ -6445,10 +6937,11 @@ end
 %
 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
   \dosubind{fn}{\code{#4}}{#1}%
+  \doingtypefntrue
   \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
 }
 
-%%% Typed variables:
+% Typed variables:
 
 % @deftypevr category type var args
 \makedefun{deftypevr}{\deftypecvgeneral{}}
@@ -6466,7 +6959,7 @@ end
   \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
 }
 
-%%% Untyped variables:
+% Untyped variables:
 
 % @defvr category var args
 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
@@ -6477,7 +6970,8 @@ end
 % \defcvof {category of}class var args
 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
 
-%%% Type:
+% Types:
+
 % @deftp category name args
 \makedefun{deftp}#1 #2 #3\endheader{%
   \doind{tp}{\code{#2}}%
@@ -6505,25 +6999,49 @@ end
 % We are followed by (but not passed) the arguments, if any.
 %
 \def\defname#1#2#3{%
+  \par
   % Get the values of \leftskip and \rightskip as they were outside the @def...
   \advance\leftskip by -\defbodyindent
   %
-  % How we'll format the type name.  Putting it in brackets helps
+  % Determine if we are typesetting the return type of a typed function
+  % on a line by itself.
+  \rettypeownlinefalse
+  \ifdoingtypefn  % doing a typed function specifically?
+    % then check user option for putting return type on its own line:
+    \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
+      \rettypeownlinetrue
+    \fi
+  \fi
+  %
+  % How we'll format the category name.  Putting it in brackets helps
   % distinguish it from the body text that may end up on the next line
   % just below it.
   \def\temp{#1}%
   \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
   %
-  % Figure out line sizes for the paragraph shape.
+  % Figure out line sizes for the paragraph shape.  We'll always have at
+  % least two.
+  \tempnum = 2
+  %
   % The first line needs space for \box0; but if \rightskip is nonzero,
   % we need only space for the part of \box0 which exceeds it:
   \dimen0=\hsize  \advance\dimen0 by -\wd0  \advance\dimen0 by \rightskip
+  %
+  % If doing a return type on its own line, we'll have another line.
+  \ifrettypeownline
+    \advance\tempnum by 1
+    \def\maybeshapeline{0in \hsize}%
+  \else
+    \def\maybeshapeline{}%
+  \fi
+  %
   % The continuations:
   \dimen2=\hsize  \advance\dimen2 by -\defargsindent
-  % (plain.tex says that \dimen1 should be used only as global.)
-  \parshape 2 0in \dimen0 \defargsindent \dimen2
   %
-  % Put the type name to the right margin.
+  % The final paragraph shape:
+  \parshape \tempnum  0in \dimen0  \maybeshapeline  \defargsindent \dimen2
+  %
+  % Put the category name at the right margin.
   \noindent
   \hbox to 0pt{%
     \hfil\box0 \kern-\hsize
@@ -6545,8 +7063,16 @@ end
     % . this still does not fix the ?` and !` ligatures, but so far no
     %   one has made identifiers using them :).
     \df \tt
-    \def\temp{#2}% return value type
-    \ifx\temp\empty\else \tclose{\temp} \fi
+    \def\temp{#2}% text of the return type
+    \ifx\temp\empty\else
+      \tclose{\temp}% typeset the return type
+      \ifrettypeownline
+        % put return type on its own line; prohibit line break following:
+        \hfil\vadjust{\nobreak}\break  
+      \else
+        \space  % type on same line, so just followed by a space
+      \fi
+    \fi           % no return type
     #3% output function name
   }%
   {\rm\enskip}% hskip 0.5 em of \tenrm
@@ -6566,7 +7092,10 @@ end
   \df \sl \hyphenchar\font=0
   %
   % On the other hand, if an argument has two dashes (for instance), we
-  % want a way to get ttsl.  Let's try @var for that.
+  % want a way to get ttsl.  We used to recommend @var for that, so
+  % leave the code in, but it's strange for @var to lead to typewriter.
+  % Nowadays we recommend @code, since the difference between a ttsl hyphen
+  % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
   \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
@@ -6664,7 +7193,7 @@ end
 
 % To do this right we need a feature of e-TeX, \scantokens,
 % which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\undefined
+\ifx\eTeXversion\thisisundefined
   \newwrite\macscribble
   \def\scantokens#1{%
     \toks0={#1}%
@@ -6675,25 +7204,30 @@ end
   }
 \fi
 
-\def\scanmacro#1{%
-  \begingroup
-    \newlinechar`\^^M
-    \let\xeatspaces\eatspaces
-    % Undo catcode changes of \startcontents and \doprintindex
-    % When called from @insertcopying or (short)caption, we need active
-    % backslash to get it printed correctly.  Previously, we had
-    % \catcode`\\=\other instead.  We'll see whether a problem appears
-    % with macro expansion.                            --kasal, 19aug04
-    \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
-    % ... and \example
-    \spaceisspace
-    %
-    % Append \endinput to make sure that TeX does not see the ending newline.
-    % I've verified that it is necessary both for e-TeX and for ordinary TeX
-    %                                                  --kasal, 29nov03
-    \scantokens{#1\endinput}%
-  \endgroup
-}
+\def\scanmacro#1{\begingroup
+  \newlinechar`\^^M
+  \let\xeatspaces\eatspaces
+  %
+  % Undo catcode changes of \startcontents and \doprintindex
+  % When called from @insertcopying or (short)caption, we need active
+  % backslash to get it printed correctly.  Previously, we had
+  % \catcode`\\=\other instead.  We'll see whether a problem appears
+  % with macro expansion.                              --kasal, 19aug04
+  \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+  %
+  % ... and for \example:
+  \spaceisspace
+  %
+  % The \empty here causes a following catcode 5 newline to be eaten as
+  % part of reading whitespace after a control sequence.  It does not
+  % eat a catcode 13 newline.  There's no good way to handle the two
+  % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+  % would then have different behavior).  See the Macro Details node in
+  % the manual for the workaround we recommend for macros and
+  % line-oriented commands.
+  % 
+  \scantokens{#1\empty}%
+\endgroup}
 
 \def\scanexp#1{%
   \edef\temp{\noexpand\scanmacro{#1}}%
@@ -6721,7 +7255,7 @@ end
 % This does \let #1 = #2, with \csnames; that is,
 %   \let \csname#1\endcsname = \csname#2\endcsname
 % (except of course we have to play expansion games).
-% 
+%
 \def\cslet#1#2{%
   \expandafter\let
   \csname#1\expandafter\endcsname
@@ -6747,17 +7281,18 @@ end
 
 % Macro bodies are absorbed as an argument in a context where
 % all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
 % Non-ASCII encodings make 8-bit characters active, so un-activate
 % them to avoid their expansion.  Must do this non-globally, to
 % confine the change to the current group.
-
+%
 % It's necessary to have hard CRs when the macro is executed. This is
-% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
 % body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
+%
+\def\scanctxt{% used as subroutine
   \catcode`\"=\other
   \catcode`\+=\other
   \catcode`\<=\other
@@ -6770,13 +7305,13 @@ end
   \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
 }
 
-\def\scanargctxt{%
+\def\scanargctxt{% used for copying and captions, not macros.
   \scanctxt
   \catcode`\\=\other
   \catcode`\^^M=\other
 }
 
-\def\macrobodyctxt{%
+\def\macrobodyctxt{% used for @macro definitions
   \scanctxt
   \catcode`\{=\other
   \catcode`\}=\other
@@ -6784,32 +7319,56 @@ end
   \usembodybackslash
 }
 
-\def\macroargctxt{%
+\def\macroargctxt{% used when scanning invocations
   \scanctxt
-  \catcode`\\=\other
+  \catcode`\\=0
 }
+% why catcode 0 for \ in the above?  To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }.  Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+% 
+% We already have @{ and @}.  For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+% 
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent.  Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
+
 
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
 % where N is the macro parameter number.
 % We define \csname macarg.\endcsname to be \realbackslash, so
 % \\ in macro replacement text gets you a backslash.
-
+%
 {\catcode`@=0 @catcode`@\=@active
  @gdef@usembodybackslash{@let\=@mbodybackslash}
  @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
 }
 \expandafter\def\csname macarg.\endcsname{\realbackslash}
 
+\def\margbackslash#1{\char`\#1 }
+
 \def\macro{\recursivefalse\parsearg\macroxxx}
 \def\rmacro{\recursivetrue\parsearg\macroxxx}
 
 \def\macroxxx#1{%
-  \getargs{#1}%           now \macname is the macname and \argl the arglist
+  \getargs{#1}% now \macname is the macname and \argl the arglist
   \ifx\argl\empty       % no arguments
-     \paramno=0%
+     \paramno=0\relax
   \else
      \expandafter\parsemargdef \argl;%
+     \if\paramno>256\relax
+       \ifx\eTeXversion\thisisundefined
+         \errhelp = \EMsimple
+         \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
+       \fi
+     \fi
   \fi
   \if1\csname ismacro.\the\macname\endcsname
      \message{Warning: redefining \the\macname}%
@@ -6856,46 +7415,269 @@ end
 % an opening brace, and that opening brace is not consumed.
 \def\getargs#1{\getargsxxx#1{}}
 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacname#1 #2\relax{\macname={#1}}
 \def\getmacargs#1{\def\argl{#1}}
 
+% For macro processing make @ a letter so that we can make Texinfo private macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
 % Parse the optional {params} list.  Set up \paramno and \paramlist
-% so \defmacro knows what to do.  Define \macarg.blah for each blah
-% in the params list, to be ##N where N is the position in that list.
+% so \defmacro knows what to do.  Define \macarg.BLAH for each BLAH
+% in the params list to some hook where the argument si to be expanded.  If
+% there are less than 10 arguments that hook is to be replaced by ##N where N
+% is the position in that list, that is to say the macro arguments are to be
+% defined `a la TeX in the macro body.  
+%
 % That gets used by \mbodybackslash (above).
-
+%
 % We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX:  let \hash be something
+% The technique used is stolen from LaTeX: let \hash be something
 % unexpandable, insert that wherever you need a #, and then redefine
 % it to # just before using the token list produced.
 %
 % The same technique is used to protect \eatspaces till just before
 % the macro is used.
-
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
-        \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+%
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef  the body (nothing else will expand because of
+% the catcode regime underwhich the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, you need that no macro has more than 256 arguments, otherwise an
+% error is produced.
+\def\parsemargdef#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \let\xeatspaces\relax
+  \parsemargdefxxx#1,;,%
+  % In case that there are 10 or more arguments we parse again the arguments
+  % list to set new definitions for the \macarg.BLAH macros corresponding to
+  % each BLAH argument. It was anyhow needed to parse already once this list
+  % in order to count the arguments, and as macros with at most 9 arguments
+  % are by far more frequent than macro with 10 or more arguments, defining
+  % twice the \macarg.BLAH macros does not cost too much processing power.
+  \ifnum\paramno<10\relax\else
+    \paramno0\relax
+    \parsemmanyargdef@@#1,;,% 10 or more arguments
+  \fi
+}
 \def\parsemargdefxxx#1,{%
   \if#1;\let\next=\relax
   \else \let\next=\parsemargdefxxx
-    \advance\paramno by 1%
+    \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
         {\xeatspaces{\hash\the\paramno}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
   \fi\next}
 
+\def\parsemmanyargdef@@#1,{%
+  \if#1;\let\next=\relax
+  \else 
+    \let\next=\parsemmanyargdef@@
+    \edef\tempb{\eatspaces{#1}}%
+    \expandafter\def\expandafter\tempa
+       \expandafter{\csname macarg.\tempb\endcsname}%
+    % Note that we need some extra \noexpand\noexpand, this is because we
+    % don't want \the  to be expanded in the \parsermacbody  as it uses an
+    % \xdef .
+    \expandafter\edef\tempa
+      {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
+    \advance\paramno by 1\relax
+  \fi\next}
+
 % These two commands read recursive and nonrecursive macro bodies.
 % (They're different since rec and nonrec macros end differently.)
+%
 
+\catcode `\@\texiatcatcode
 \long\def\parsemacbody#1@end macro%
 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
 \long\def\parsermacbody#1@end rmacro%
 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\catcode `\@=11\relax
+
+\let\endargs@\relax
+\let\nil@\relax
+\def\nilm@{\nil@}%
+\long\def\nillm@{\nil@}%
+
+% This macro is expanded during the Texinfo macro expansion, not during its
+% definition.  It gets all the arguments values and assigns them to macros
+% macarg.ARGNAME
+%
+% #1 is the macro name
+% #2 is the list of argument names
+% #3 is the list of argument values
+\def\getargvals@#1#2#3{%
+  \def\macargdeflist@{}%
+  \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
+  \def\paramlist{#2,\nil@}%
+  \def\macroname{#1}%
+  \begingroup
+  \macroargctxt
+  \def\argvaluelist{#3,\nil@}%
+  \def\@tempa{#3}%
+  \ifx\@tempa\empty
+    \setemptyargvalues@
+  \else
+    \getargvals@@
+  \fi
+}
+
+% 
+\def\getargvals@@{%
+  \ifx\paramlist\nilm@
+      % Some sanity check needed here that \argvaluelist is also empty.
+      \ifx\argvaluelist\nillm@
+      \else
+        \errhelp = \EMsimple
+        \errmessage{Too many arguments in macro `\macroname'!}%
+      \fi
+      \let\next\macargexpandinbody@
+  \else
+    \ifx\argvaluelist\nillm@
+       % No more arguments values passed to macro.  Set remaining named-arg
+       % macros to empty.
+       \let\next\setemptyargvalues@
+    \else
+      % pop current arg name into \@tempb
+      \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
+      \expandafter\@tempa\expandafter{\paramlist}%
+       % pop current argument value into \@tempc
+      \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
+      \expandafter\@tempa\expandafter{\argvaluelist}%
+       % Here \@tempb is the current arg name and \@tempc is the current arg value.
+       % First place the new argument macro definition into \@tempd
+       \expandafter\macname\expandafter{\@tempc}%
+       \expandafter\let\csname macarg.\@tempb\endcsname\relax
+       \expandafter\def\expandafter\@tempe\expandafter{%
+         \csname macarg.\@tempb\endcsname}%
+       \edef\@tempd{\long\def\@tempe{\the\macname}}%
+       \push@\@tempd\macargdeflist@
+       \let\next\getargvals@@
+    \fi
+  \fi
+  \next
+}
+
+\def\push@#1#2{%
+  \expandafter\expandafter\expandafter\def
+  \expandafter\expandafter\expandafter#2%
+  \expandafter\expandafter\expandafter{%
+  \expandafter#1#2}%
+}
+
+% Replace arguments by their values in the macro body, and place the result
+% in macro \@tempa
+\def\macvalstoargs@{%
+  %  To do this we use the property that token registers that are \the'ed
+  % within an \edef  expand only once. So we are going to place all argument
+  % values into respective token registers.
+  %
+  % First we save the token context, and initialize argument numbering.
+  \begingroup
+    \paramno0\relax
+    % Then, for each argument number #N, we place the corresponding argument
+    % value into a new token list register \toks#N
+    \expandafter\putargsintokens@\saveparamlist@,;,%
+    % Then, we expand the body so that argument are replaced by their
+    % values. The trick for values not to be expanded themselves is that they
+    % are within tokens and that tokens expand only once in an \edef .
+    \edef\@tempc{\csname mac.\macroname .body\endcsname}%
+    % Now we restore the token stack pointer to free the token list registers
+    % which we have used, but we make sure that expanded body is saved after
+    % group.
+    \expandafter
+  \endgroup
+  \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
+  }
+
+\def\macargexpandinbody@{% 
+  %% Define the named-macro outside of this group and then close this group. 
+  \expandafter
+  \endgroup
+  \macargdeflist@
+  % First the replace in body the macro arguments by their values, the result
+  % is in \@tempa .
+  \macvalstoargs@
+  % Then we point at the \norecurse or \gobble (for recursive) macro value
+  % with \@tempb .
+  \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
+  % Depending on whether it is recursive or not, we need some tailing
+  % \egroup .
+  \ifx\@tempb\gobble
+     \let\@tempc\relax
+  \else
+     \let\@tempc\egroup
+  \fi
+  % And now we do the real job:
+  \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
+  \@tempd
+}
+
+\def\putargsintokens@#1,{%
+  \if#1;\let\next\relax
+  \else
+    \let\next\putargsintokens@
+    % First we allocate the new token list register, and give it a temporary
+    % alias \@tempb .
+    \toksdef\@tempb\the\paramno
+    % Then we place the argument value into that token list register.
+    \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
+    \expandafter\@tempb\expandafter{\@tempa}%
+    \advance\paramno by 1\relax
+  \fi
+  \next
+}
+
+% Save the token stack pointer into macro #1
+\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
+% Restore the token stack pointer from number in macro #1
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
+% newtoks that can be used non \outer .
+\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
+
+% Tailing missing arguments are set to empty
+\def\setemptyargvalues@{%
+  \ifx\paramlist\nilm@
+    \let\next\macargexpandinbody@
+  \else
+    \expandafter\setemptyargvaluesparser@\paramlist\endargs@
+    \let\next\setemptyargvalues@
+  \fi
+  \next
+}
+
+\def\setemptyargvaluesparser@#1,#2\endargs@{%
+  \expandafter\def\expandafter\@tempa\expandafter{%
+    \expandafter\def\csname macarg.#1\endcsname{}}%
+  \push@\@tempa\macargdeflist@
+  \def\paramlist{#2}%
+}
+
+% #1 is the element target macro
+% #2 is the list macro
+% #3,#4\endargs@ is the list value
+\def\pop@#1#2#3,#4\endargs@{%
+   \def#1{#3}%
+   \def#2{#4}%
+}
+\long\def\longpop@#1#2#3,#4\endargs@{%
+   \long\def#1{#3}%
+   \long\def#2{#4}%
+}
 
-% This defines the macro itself. There are six cases: recursive and
-% nonrecursive macros of zero, one, and many arguments.
+% This defines a Texinfo @macro. There are eight cases: recursive and
+% nonrecursive macros of zero, one, up to nine, and many arguments.
 % Much magic with \expandafter here.
 % \xdef is used so that macro definitions will survive the file
 % they're defined in; @include reads the file inside a group.
+%
 \def\defmacro{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifrecursive
@@ -6910,17 +7692,25 @@ end
          \expandafter\noexpand\csname\the\macname xxx\endcsname}%
       \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
          \egroup\noexpand\scanmacro{\temp}}%
-    \else % many
-      \expandafter\xdef\csname\the\macname\endcsname{%
-         \bgroup\noexpand\macroargctxt
-         \noexpand\csname\the\macname xx\endcsname}%
-      \expandafter\xdef\csname\the\macname xx\endcsname##1{%
-          \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
-      \expandafter\expandafter
-      \expandafter\xdef
-      \expandafter\expandafter
-        \csname\the\macname xxx\endcsname
-          \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+    \else
+      \ifnum\paramno<10\relax % at most 9
+        \expandafter\xdef\csname\the\macname\endcsname{%
+           \bgroup\noexpand\macroargctxt
+           \noexpand\csname\the\macname xx\endcsname}%
+        \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+            \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+        \expandafter\expandafter
+        \expandafter\xdef
+        \expandafter\expandafter
+          \csname\the\macname xxx\endcsname
+            \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+      \else % 10 or more
+        \expandafter\xdef\csname\the\macname\endcsname{%
+          \noexpand\getargvals@{\the\macname}{\argl}%
+        }%    
+        \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+        \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
+      \fi
     \fi
   \else
     \ifcase\paramno
@@ -6937,29 +7727,40 @@ end
         \egroup
         \noexpand\norecurse{\the\macname}%
         \noexpand\scanmacro{\temp}\egroup}%
-    \else % many
-      \expandafter\xdef\csname\the\macname\endcsname{%
-         \bgroup\noexpand\macroargctxt
-         \expandafter\noexpand\csname\the\macname xx\endcsname}%
-      \expandafter\xdef\csname\the\macname xx\endcsname##1{%
-          \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
-      \expandafter\expandafter
-      \expandafter\xdef
-      \expandafter\expandafter
-      \csname\the\macname xxx\endcsname
-      \paramlist{%
-          \egroup
-          \noexpand\norecurse{\the\macname}%
-          \noexpand\scanmacro{\temp}\egroup}%
+    \else % at most 9
+      \ifnum\paramno<10\relax
+        \expandafter\xdef\csname\the\macname\endcsname{%
+           \bgroup\noexpand\macroargctxt
+           \expandafter\noexpand\csname\the\macname xx\endcsname}%
+        \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+            \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+        \expandafter\expandafter
+        \expandafter\xdef
+        \expandafter\expandafter
+        \csname\the\macname xxx\endcsname
+        \paramlist{%
+            \egroup
+            \noexpand\norecurse{\the\macname}%
+            \noexpand\scanmacro{\temp}\egroup}%
+      \else % 10 or more:
+        \expandafter\xdef\csname\the\macname\endcsname{%
+          \noexpand\getargvals@{\the\macname}{\argl}%
+        }%
+        \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+        \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
+      \fi
     \fi
   \fi}
 
+\catcode `\@\texiatcatcode\relax
+
 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
 
 % \braceorline decides whether the next nonwhitespace character is a
 % {.  If so it reads up to the closing }, if not, it reads the whole
 % line.  Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg)
+% as an argument (by \parsebrace or \parsearg).
+% 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup\else
@@ -6969,7 +7770,8 @@ end
 
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
-% sign.  Just make them active and then expand them all to nothing.
+% sign.  Make them active and then expand them all to nothing.
+%
 \def\alias{\parseargusing\obeyspaces\aliasxxx}
 \def\aliasxxx #1{\aliasyyy#1\relax}
 \def\aliasyyy #1=#2\relax{%
@@ -6990,7 +7792,8 @@ end
 
 % @inforef is relatively simple.
 \def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+\def\inforefzzz #1,#2,#3,#4**{%
+  \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
   node \samp{\ignorespaces#1{}}}
 
 % @node's only job in TeX is to define \lastnode, which is used in
@@ -7051,11 +7854,32 @@ end
       \toks0 = \expandafter{\lastsection}%
       \immediate \writexrdef{title}{\the\toks0 }%
       \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
-      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
+      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
     }%
   \fi
 }
 
+% @xrefautosectiontitle on|off says whether @section(ing) names are used
+% automatically in xrefs, if the third arg is not explicitly specified.
+% This was provided as a "secret" @set xref-automatic-section-title
+% variable, now it's official.
+% 
+\parseargdef\xrefautomaticsectiontitle{%
+  \def\temp{#1}%
+  \ifx\temp\onword
+    \expandafter\let\csname SETxref-automatic-section-title\endcsname
+      = \empty
+  \else\ifx\temp\offword
+    \expandafter\let\csname SETxref-automatic-section-title\endcsname
+      = \relax
+  \else
+    \errhelp = \EMsimple
+    \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
+                must be on|off}%
+  \fi\fi
+}
+
+% \f
 % @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
 % the node name, #2 the name of the Info cross-reference, #3 the printed
 % node name, #4 the name of the Info file, #5 the name of the printed
@@ -7064,26 +7888,41 @@ end
 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
 \def\ref#1{\xrefX[#1,,,,,,,]}
+%
+\newbox\toprefbox
+\newbox\printedrefnamebox
+\newbox\infofilenamebox
+\newbox\printedmanualbox
+%
 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
   \unsepspaces
-  \def\printedmanual{\ignorespaces #5}%
+  %
+  % Get args without leading/trailing spaces.
   \def\printedrefname{\ignorespaces #3}%
-  \setbox1=\hbox{\printedmanual\unskip}%
-  \setbox0=\hbox{\printedrefname\unskip}%
-  \ifdim \wd0 = 0pt
+  \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+  %
+  \def\infofilename{\ignorespaces #4}%
+  \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
+  %
+  \def\printedmanual{\ignorespaces #5}%
+  \setbox\printedmanualbox  = \hbox{\printedmanual\unskip}%
+  %
+  % If the printed reference name (arg #3) was not explicitly given in
+  % the @xref, figure out what we want to use.
+  \ifdim \wd\printedrefnamebox = 0pt
     % No printed node name was explicitly given.
-    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
-      % Use the node name inside the square brackets.
+    \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
+      % Not auto section-title: use node name inside the square brackets.
       \def\printedrefname{\ignorespaces #1}%
     \else
-      % Use the actual chapter/section title appear inside
-      % the square brackets.  Use the real section title if we have it.
-      \ifdim \wd1 > 0pt
-        % It is in another manual, so we don't have it.
+      % Auto section-title: use chapter/section title inside
+      % the square brackets if we have it.
+      \ifdim \wd\printedmanualbox > 0pt
+        % It is in another manual, so we don't have it; use node name.
         \def\printedrefname{\ignorespaces #1}%
       \else
         \ifhavexrefs
-          % We know the real title if we have the xref values.
+          % We (should) know the real title if we have the xref values.
           \def\printedrefname{\refx{#1-title}{}}%
         \else
           % Otherwise just copy the Info node name.
@@ -7097,13 +7936,20 @@ end
   \ifpdf
     {\indexnofonts
      \turnoffactive
+     \makevalueexpandable
      % This expands tokens, so do it after making catcode changes, so _
-     % etc. don't get their TeX definitions.
+     % etc. don't get their TeX definitions.  This ignores all spaces in
+     % #4, including (wrongly) those in the middle of the filename.
      \getfilename{#4}%
      %
-     % See comments at \activebackslashdouble.
-     {\activebackslashdouble \xdef\pdfxrefdest{#1}%
-      \backslashparens\pdfxrefdest}%
+     % This (wrongly) does not take account of leading or trailing
+     % spaces in #1, which should be ignored.
+     \edef\pdfxrefdest{#1}%
+     \ifx\pdfxrefdest\empty
+       \def\pdfxrefdest{Top}% no empty targets
+     \else
+       \txiescapepdf\pdfxrefdest  % escape PDF special chars
+     \fi
      %
      \leavevmode
      \startlink attr{/Border [0 0 0]}%
@@ -7130,29 +7976,42 @@ end
   \iffloat\Xthisreftitle
     % If the user specified the print name (third arg) to the ref,
     % print it instead of our usual "Figure 1.2".
-    \ifdim\wd0 = 0pt
+    \ifdim\wd\printedrefnamebox = 0pt
       \refx{#1-snt}{}%
     \else
       \printedrefname
     \fi
     %
-    % if the user also gave the printed manual name (fifth arg), append
+    % If the user also gave the printed manual name (fifth arg), append
     % "in MANUALNAME".
-    \ifdim \wd1 > 0pt
+    \ifdim \wd\printedmanualbox > 0pt
       \space \putwordin{} \cite{\printedmanual}%
     \fi
   \else
     % node/anchor (non-float) references.
+    % 
+    % If we use \unhbox to print the node names, TeX does not insert
+    % empty discretionaries after hyphens, which means that it will not
+    % find a line break at a hyphen in a node names.  Since some manuals
+    % are best written with fairly long node names, containing hyphens,
+    % this is a loss.  Therefore, we give the text of the node name
+    % again, so it is as if TeX is seeing it for the first time.
+    % 
+    \ifdim \wd\printedmanualbox > 0pt
+      % Cross-manual reference with a printed manual name.
+      % 
+      \crossmanualxref{\cite{\printedmanual\unskip}}%
+    %
+    \else\ifdim \wd\infofilenamebox > 0pt
+      % Cross-manual reference with only an info filename (arg 4), no
+      % printed manual name (arg 5).  This is essentially the same as
+      % the case above; we output the filename, since we have nothing else.
+      % 
+      \crossmanualxref{\code{\infofilename\unskip}}%
     %
-    % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
-    % insert empty discretionaries after hyphens, which means that it will
-    % not find a line break at a hyphen in a node names.  Since some manuals
-    % are best written with fairly long node names, containing hyphens, this
-    % is a loss.  Therefore, we give the text of the node name again, so it
-    % is as if TeX is seeing it for the first time.
-    \ifdim \wd1 > 0pt
-      \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
     \else
+      % Reference within this manual.
+      %
       % _ (for example) has to be the character _ for the purposes of the
       % control sequence corresponding to the node, but it has to expand
       % into the usual \leavevmode...\vrule stuff for purposes of
@@ -7164,7 +8023,7 @@ end
        \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
        \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
       }%
-      % output the `[mynode]' via a macro so it can be overridden.
+      % output the `[mynode]' via the macro below so it can be overridden.
       \xrefprintnodename\printedrefname
       %
       % But we always want a comma and a space:
@@ -7172,11 +8031,37 @@ end
       %
       % output the `page 3'.
       \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
-    \fi
+    \fi\fi
   \fi
   \endlink
 \endgroup}
 
+% Output a cross-manual xref to #1.  Used just above (twice).
+% 
+% Only include the text "Section ``foo'' in" if the foo is neither
+% missing or Top.  Thus, @xref{,,,foo,The Foo Manual} outputs simply
+% "see The Foo Manual", the idea being to refer to the whole manual.
+% 
+% But, this being TeX, we can't easily compare our node name against the
+% string "Top" while ignoring the possible spaces before and after in
+% the input.  By adding the arbitrary 7sp below, we make it much less
+% likely that a real node name would have the same width as "Top" (e.g.,
+% in a monospaced font).  Hopefully it will never happen in practice.
+% 
+% For the same basic reason, we retypeset the "Top" at every
+% reference, since the current font is indeterminate.
+% 
+\def\crossmanualxref#1{%
+  \setbox\toprefbox = \hbox{Top\kern7sp}%
+  \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+  \ifdim \wd2 > 7sp  % nonempty?
+    \ifdim \wd2 = \wd\toprefbox \else  % same as Top?
+      \putwordSection{} ``\printedrefname'' \putwordin{}\space
+    \fi
+  \fi
+  #1%
+}
+
 % This macro is called from \xrefX for the `[nodename]' part of xref
 % output.  It's a separate macro only so it can be changed more easily,
 % since square brackets don't work well in some documents.  Particularly
@@ -7227,7 +8112,8 @@ end
     \angleleft un\-de\-fined\angleright
     \iflinks
       \ifhavexrefs
-        \message{\linenumber Undefined cross reference `#1'.}%
+        {\toks0 = {#1}% avoid expansion of possibly-complex value
+         \message{\linenumber Undefined cross reference `\the\toks0'.}}%
       \else
         \ifwarnedxrefs\else
           \global\warnedxrefstrue
@@ -7391,7 +8277,7 @@ end
 % space to prevent strange expansion errors.)
 \def\supereject{\par\penalty -20000\footnoteno =0 }
 
-% @footnotestyle is meaningful for info output only.
+% @footnotestyle is meaningful for Info output only.
 \let\footnotestyle=\comment
 
 {\catcode `\@=11
@@ -7454,6 +8340,8 @@ end
   % expands into a box, it must come within the paragraph, lest it
   % provide a place where TeX can split the footnote.
   \footstrut
+  %
+  % Invoke rest of plain TeX footnote routine.
   \futurelet\next\fo@t
 }
 }%end \catcode `\@=11
@@ -7541,7 +8429,7 @@ end
   it from ftp://tug.org/tex/epsf.tex.}
 %
 \def\image#1{%
-  \ifx\epsfbox\undefined
+  \ifx\epsfbox\thisisundefined
     \ifwarnednoepsf \else
       \errhelp = \noepsfhelp
       \errmessage{epsf.tex not found, images will be ignored}%
@@ -7557,7 +8445,7 @@ end
 % #2 is (optional) width, #3 is (optional) height.
 % #4 is (ignored optional) html alt text.
 % #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
+% #6 is just the usual extra ignored arg for parsing stuff.
 \newif\ifimagevmode
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
@@ -7565,6 +8453,13 @@ end
   % If the image is by itself, center it.
   \ifvmode
     \imagevmodetrue
+  \else \ifx\centersub\centerV
+    % for @center @image, we need a vbox so we can have our vertical space
+    \imagevmodetrue
+    \vbox\bgroup % vbox has better behavior than vtop herev
+  \fi\fi
+  %
+  \ifimagevmode
     \nobreak\medskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
@@ -7574,9 +8469,13 @@ end
   \fi
   %
   % Leave vertical mode so that indentation from an enclosing
-  % environment such as @quotation is respected.  On the other hand, if
-  % it's at the top level, we don't want the normal paragraph indentation.
-  \noindent
+  %  environment such as @quotation is respected.
+  % However, if we're at the top level, we don't want the
+  %  normal paragraph indentation.
+  % On the other hand, if we are in the case of @center @image, we don't
+  %  want to start a paragraph, which will create a hsize-width box and
+  %  eradicate the centering.
+  \ifx\centersub\centerV\else \noindent \fi
   %
   % Output the image.
   \ifpdf
@@ -7588,7 +8487,10 @@ end
     \epsfbox{#1.eps}%
   \fi
   %
-  \ifimagevmode \medskip \fi  % space after the standalone image
+  \ifimagevmode
+    \medskip  % space after a standalone image
+  \fi  
+  \ifx\centersub\centerV \egroup \fi
 \endgroup}
 
 
@@ -7881,21 +8783,22 @@ end
     \closein 1
   \endgroup % end raw TeX
 \endgroup}
-}
 %
 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
 % try txi-de.tex.
-% 
-\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+%
+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
   \openin 1 txi-#1.tex
   \ifeof 1
     \errhelp = \nolanghelp
     \errmessage{Cannot read language file txi-#1.tex}%
   \else
+    \globaldefs = 1  % everything in the txi-LL files needs to persist
     \input txi-#1.tex
   \fi
   \closein 1
 }
+}% end of special _ catcode
 %
 \newhelp\nolanghelp{The given language definition file cannot be found or
 is empty.  Maybe you need to install it?  Putting it in the current
@@ -7904,16 +8807,16 @@ directory should work if nowhere else does.}
 % This macro is called from txi-??.tex files; the first argument is the
 % \language name to set (without the "\lang@" prefix), the second and
 % third args are \{left,right}hyphenmin.
-% 
+%
 % The language names to pass are determined when the format is built.
 % See the etex.log file created at that time, e.g.,
 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
-% 
+%
 % With TeX Live 2008, etex now includes hyphenation patterns for all
 % available languages.  This means we can support hyphenation in
 % Texinfo, at least to some extent.  (This still doesn't solve the
 % accented characters problem.)
-% 
+%
 \catcode`@=11
 \def\txisetlanguage#1#2#3{%
   % do not set the language if the name is undefined in the current TeX.
@@ -7968,7 +8871,7 @@ directory should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \lattwochardefs
   %
-  \else \ifx \declaredencoding \latone 
+  \else \ifx \declaredencoding \latone
      \setnonasciicharscatcode\active
      \latonechardefs
   %
@@ -7980,7 +8883,7 @@ directory should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \utfeightchardefs
   %
-  \else 
+  \else
     \message{Unknown document encoding #1, ignoring.}%
   %
   \fi % utfeight
@@ -7992,7 +8895,7 @@ directory should work if nowhere else does.}
 
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
-% 
+%
 \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
 
 % Take account of \c (plain) vs. \, (Texinfo) difference.
@@ -8005,21 +8908,21 @@ directory should work if nowhere else does.}
 %
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-  \gdef^^a0{~} 
+  \gdef^^a0{\tie}
   \gdef^^a1{\exclamdown}
-  \gdef^^a2{\missingcharmsg{CENT SIGN}} 
+  \gdef^^a2{\missingcharmsg{CENT SIGN}}
   \gdef^^a3{{\pounds}}
   \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
   \gdef^^a5{\missingcharmsg{YEN SIGN}}
-  \gdef^^a6{\missingcharmsg{BROKEN BAR}} 
+  \gdef^^a6{\missingcharmsg{BROKEN BAR}}
   \gdef^^a7{\S}
-  \gdef^^a8{\"{}} 
-  \gdef^^a9{\copyright} 
+  \gdef^^a8{\"{}}
+  \gdef^^a9{\copyright}
   \gdef^^aa{\ordf}
   \gdef^^ab{\guillemetleft}
   \gdef^^ac{$\lnot$}
-  \gdef^^ad{\-} 
-  \gdef^^ae{\registeredsymbol} 
+  \gdef^^ad{\-}
+  \gdef^^ae{\registeredsymbol}
   \gdef^^af{\={}}
   %
   \gdef^^b0{\textdegree}
@@ -8035,7 +8938,7 @@ directory should work if nowhere else does.}
   \gdef^^b9{$^1$}
   \gdef^^ba{\ordm}
   %
-  \gdef^^bb{\guilletright}
+  \gdef^^bb{\guillemetright}
   \gdef^^bc{$1\over4$}
   \gdef^^bd{$1\over2$}
   \gdef^^be{$3\over4$}
@@ -8046,7 +8949,7 @@ directory should work if nowhere else does.}
   \gdef^^c2{\^A}
   \gdef^^c3{\~A}
   \gdef^^c4{\"A}
-  \gdef^^c5{\ringaccent A} 
+  \gdef^^c5{\ringaccent A}
   \gdef^^c6{\AE}
   \gdef^^c7{\cedilla C}
   \gdef^^c8{\`E}
@@ -8058,7 +8961,7 @@ directory should work if nowhere else does.}
   \gdef^^ce{\^I}
   \gdef^^cf{\"I}
   %
-  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+  \gdef^^d0{\DH}
   \gdef^^d1{\~N}
   \gdef^^d2{\`O}
   \gdef^^d3{\'O}
@@ -8072,7 +8975,7 @@ directory should work if nowhere else does.}
   \gdef^^db{\^U}
   \gdef^^dc{\"U}
   \gdef^^dd{\'Y}
-  \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+  \gdef^^de{\TH}
   \gdef^^df{\ss}
   %
   \gdef^^e0{\`a}
@@ -8092,7 +8995,7 @@ directory should work if nowhere else does.}
   \gdef^^ee{\^{\dotless i}}
   \gdef^^ef{\"{\dotless i}}
   %
-  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+  \gdef^^f0{\dh}
   \gdef^^f1{\~n}
   \gdef^^f2{\`o}
   \gdef^^f3{\'o}
@@ -8106,7 +9009,7 @@ directory should work if nowhere else does.}
   \gdef^^fb{\^u}
   \gdef^^fc{\"u}
   \gdef^^fd{\'y}
-  \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+  \gdef^^fe{\th}
   \gdef^^ff{\"y}
 }
 
@@ -8127,7 +9030,7 @@ directory should work if nowhere else does.}
 
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
-  \gdef^^a0{~}
+  \gdef^^a0{\tie}
   \gdef^^a1{\ogonek{A}}
   \gdef^^a2{\u{}}
   \gdef^^a3{\L}
@@ -8178,7 +9081,7 @@ directory should work if nowhere else does.}
   \gdef^^ce{\^I}
   \gdef^^cf{\v D}
   %
-  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+  \gdef^^d0{\DH}
   \gdef^^d1{\'N}
   \gdef^^d2{\v N}
   \gdef^^d3{\'O}
@@ -8187,7 +9090,7 @@ directory should work if nowhere else does.}
   \gdef^^d6{\"O}
   \gdef^^d7{$\times$}
   \gdef^^d8{\v R}
-  \gdef^^d9{\ringaccent U} 
+  \gdef^^d9{\ringaccent U}
   \gdef^^da{\'U}
   \gdef^^db{\H U}
   \gdef^^dc{\"U}
@@ -8208,11 +9111,11 @@ directory should work if nowhere else does.}
   \gdef^^ea{\ogonek{e}}
   \gdef^^eb{\"e}
   \gdef^^ec{\v e}
-  \gdef^^ed{\'\i}
-  \gdef^^ee{\^\i}
+  \gdef^^ed{\'{\dotless{i}}}
+  \gdef^^ee{\^{\dotless{i}}}
   \gdef^^ef{\v d}
   %
-  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+  \gdef^^f0{\dh}
   \gdef^^f1{\'n}
   \gdef^^f2{\v n}
   \gdef^^f3{\'o}
@@ -8231,11 +9134,11 @@ directory should work if nowhere else does.}
 }
 
 % UTF-8 character definitions.
-% 
+%
 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
 % changes for Texinfo conventions.  It is included here under the GPL by
 % permission from Frank Mittelbach and the LaTeX team.
-% 
+%
 \newcount\countUTFx
 \newcount\countUTFy
 \newcount\countUTFz
@@ -8300,7 +9203,7 @@ directory should work if nowhere else does.}
 
   \gdef\DeclareUnicodeCharacter#1#2{%
     \countUTFz = "#1\relax
-    \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+    %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
     \begingroup
       \parseXMLCharref
       \def\UTFviiiTwoOctets##1##2{%
@@ -8385,6 +9288,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00CE}{\^I}
   \DeclareUnicodeCharacter{00CF}{\"I}
 
+  \DeclareUnicodeCharacter{00D0}{\DH}
   \DeclareUnicodeCharacter{00D1}{\~N}
   \DeclareUnicodeCharacter{00D2}{\`O}
   \DeclareUnicodeCharacter{00D3}{\'O}
@@ -8397,6 +9301,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00DB}{\^U}
   \DeclareUnicodeCharacter{00DC}{\"U}
   \DeclareUnicodeCharacter{00DD}{\'Y}
+  \DeclareUnicodeCharacter{00DE}{\TH}
   \DeclareUnicodeCharacter{00DF}{\ss}
 
   \DeclareUnicodeCharacter{00E0}{\`a}
@@ -8416,6 +9321,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
   \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
 
+  \DeclareUnicodeCharacter{00F0}{\dh}
   \DeclareUnicodeCharacter{00F1}{\~n}
   \DeclareUnicodeCharacter{00F2}{\`o}
   \DeclareUnicodeCharacter{00F3}{\'o}
@@ -8428,6 +9334,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00FB}{\^u}
   \DeclareUnicodeCharacter{00FC}{\"u}
   \DeclareUnicodeCharacter{00FD}{\'y}
+  \DeclareUnicodeCharacter{00FE}{\th}
   \DeclareUnicodeCharacter{00FF}{\"y}
 
   \DeclareUnicodeCharacter{0100}{\=A}
@@ -8764,8 +9671,8 @@ directory should work if nowhere else does.}
 % Prevent underfull vbox error messages.
 \vbadness = 10000
 
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
 
 % Following George Bush, get rid of widows and orphans.
 \widowpenalty=10000
@@ -8972,25 +9879,21 @@ directory should work if nowhere else does.}
 
 \message{and turning on texinfo input format.}
 
+\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
 % Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
 
 % This macro is used to make a character print one way in \tt
 % (where it can probably be output as-is), and another way in other fonts,
@@ -9068,34 +9971,48 @@ directory should work if nowhere else does.}
 
 % In texinfo, backslash is an active character; it prints the backslash
 % in fixed width font.
-\catcode`\\=\active
-@def@normalbackslash{{@tt@backslashcurfont}}
+\catcode`\\=\active  % @ for escape char from now on.
+
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E).  It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
+% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
+% ignored family value; char position "5C).  We can't use " for the
+% usual hex value because it has already been made active.
+@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
+
 % On startup, @fixbackslash assigns:
 %  @let \ = @normalbackslash
-
 % \rawbackslash defines an active \ to do \backslashcurfont.
 % \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
+% catcode other.  We switch back and forth between these.
 @gdef@rawbackslash{@let\=@backslashcurfont}
 @gdef@otherbackslash{@let\=@realbackslash}
 
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-% 
-@def@normalturnoffactive{%
-  @let\=@normalbackslash
-  @let"=@normaldoublequote
-  @let~=@normaltilde
-  @let^=@normalcaret
-  @let_=@normalunderscore
-  @let|=@normalverticalbar
-  @let<=@normalless
-  @let>=@normalgreater
-  @let+=@normalplus
-  @let$=@normaldollar %$ font-lock fix
-  @markupsetuplqdefault
-  @markupsetuprqdefault
-  @unsepspaces
+% the literal character `\'.  Also revert - to its normal character, in
+% case the active - from code has slipped in.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+   @let-=@normaldash
+   @let"=@normaldoublequote
+   @let$=@normaldollar %$ font-lock fix
+   @let+=@normalplus
+   @let<=@normalless
+   @let>=@normalgreater
+   @let\=@normalbackslash
+   @let^=@normalcaret
+   @let_=@normalunderscore
+   @let|=@normalverticalbar
+   @let~=@normaltilde
+   @markupsetuplqdefault
+   @markupsetuprqdefault
+   @unsepspaces
+ }
 }
 
 % Make _ and + \other characters, temporarily.
@@ -9124,10 +10041,19 @@ directory should work if nowhere else does.}
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
+@def@normaldot{.}
+@def@normalquest{?}
+@def@normalslash{/}
+
 % These look ok in all fonts, so just make them not special.
-@catcode`@& = @other
-@catcode`@# = @other
-@catcode`@% = @other
+% @hashchar{} gets its own user-level command, because of #line.
+@catcode`@& = @other @def@normalamp{&}
+@catcode`@# = @other @def@normalhash{#}
+@catcode`@% = @other @def@normalpercent{%}
+
+@let @hashchar = @normalhash
 
 @c Finally, make ` and ' active, so that txicodequoteundirected and
 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}.  If we
@@ -9137,7 +10063,7 @@ directory should work if nowhere else does.}
 @catcode`@`=@active
 @markupsetuplqdefault
 @markupsetuprqdefault
+
 @c Local variables:
 @c eval: (add-hook 'write-file-hooks 'time-stamp)
 @c page-delimiter: "^\\\\message"
index 303f134..99b5f8f 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 23 September 2009
-@set UPDATED-MONTH September 2009
-@set EDITION 0.9.8
-@set VERSION 0.9.8
+@set UPDATED 20 October 2017
+@set UPDATED-MONTH October 2017
+@set EDITION 0.12.0
+@set VERSION 0.12.0
similarity index 54%
rename from build-aux/install-sh
rename to install-sh
index a5897de..59990a1 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-12-25.00
+scriptversion=2014-09-12.12; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,25 +35,21 @@ scriptversion=2006-12-25.00
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='  '
 nl='
 '
-IFS=" ""       $nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,42 +122,57 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-       shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-       case $mode in
-         *' '* | *'    '* | *'
-'*       | *'*'* | *'?'* | *'['*)
-           echo "$0: invalid mode: $mode" >&2
-           exit 1;;
-       esac
-       shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-       shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-       shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)        shift
-       break;;
+    --) shift
+        break;;
 
-    -*)        echo "$0: invalid option: $1" >&2
-       exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -186,6 +186,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -194,13 +198,26 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
 
   # Set umask so as not to create temps with too-generous modes.
   # However, 'strip' requires both read and write access to temps.
@@ -211,16 +228,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -228,9 +245,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -252,51 +269,20 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dst_arg: Is a directory" >&2
-       exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-       (dirname "$dst") 2>/dev/null ||
-       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-            X"$dst" : 'X\(//\)[^/]' \| \
-            X"$dst" : 'X\(//\)$' \| \
-            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-       echo X"$dst" |
-           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)[^/].*/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\).*/{
-                  s//\1/
-                  q
-                }
-                s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -307,74 +293,81 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-       # Create intermediate dirs using mode 755 as modified by the umask.
-       # This is like FreeBSD 'install' as of 1997-10-28.
-       umask=`umask`
-       case $stripcmd.$umask in
-         # Optimize common cases.
-         *[2367][2367]) mkdir_umask=$umask;;
-         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-         *[0-7])
-           mkdir_umask=`expr $umask + 22 \
-             - $umask % 100 % 40 + $umask % 20 \
-             - $umask % 10 % 4 + $umask % 2
-           `;;
-         *) mkdir_umask=$umask,go-w;;
-       esac
-
-       # With -d, create the new directory with the user-specified mode.
-       # Otherwise, rely on $mkdir_umask.
-       if test -n "$dir_arg"; then
-         mkdir_mode=-m$mode
-       else
-         mkdir_mode=
-       fi
-
-       posix_mkdir=false
-       case $umask in
-         *[123567][0-7][0-7])
-           # POSIX mkdir -p sets u+wx bits regardless of umask, which
-           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-           ;;
-         *)
-           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-           if (umask $mkdir_umask &&
-               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-           then
-             if test -z "$dir_arg" || {
-                  # Check for POSIX incompatibilities with -m.
-                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                  # other-writeable bit of parent directory when it shouldn't.
-                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
-                  case $ls_ld_tmpdir in
-                    d????-?r-*) different_mode=700;;
-                    d????-?--*) different_mode=755;;
-                    *) false;;
-                  esac &&
-                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                  }
-                }
-             then posix_mkdir=:
-             fi
-             rmdir "$tmpdir/d" "$tmpdir"
-           else
-             # Remove any dirs left behind by ancient mkdir implementations.
-             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-           fi
-           trap '' 0;;
-       esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            # $RANDOM is not portable (e.g. dash);  use it when possible to
+            # lower collision chance
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
+            # create the $tmpdir first (and fail if unsuccessful) to make sure
+            # that nobody tries to guess the $tmpdir name.
+            if (umask $mkdir_umask &&
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-       umask $mkdir_umask &&
-       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -384,53 +377,51 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix='/';;
-       -*) prefix='./';;
-       *)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-       test -z "$d" && continue
-
-       prefix=$prefix$d
-       if test -d "$prefix"; then
-         prefixes=
-       else
-         if $posix_mkdir; then
-           (umask=$mkdir_umask &&
-            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-           # Don't fail if two instances are running concurrently.
-           test -d "$prefix" || exit 1
-         else
-           case $prefix in
-             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-             *) qprefix=$prefix;;
-           esac
-           prefixes="$prefixes '$qprefix'"
-         fi
-       fi
-       prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-       # Don't fail if two instances are running concurrently.
-       (umask $mkdir_umask &&
-        eval "\$doit_exec \$mkdirprog $prefixes") ||
-         test -d "$dstdir" || exit 1
-       obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -465,15 +456,12 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -486,24 +474,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-       # Now remove or move aside any old file at destination location.
-       # We try this two ways since rm can't unlink itself on some
-       # systems and the destination file might be busy for other
-       # reasons.  In this case, the final cleanup might fail but the new
-       # file should still install successfully.
-       {
-         test ! -f "$dst" ||
-         $doit $rmcmd -f "$dst" 2>/dev/null ||
-         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-         } ||
-         { echo "$0: cannot unlink or rename $dst" >&2
-           (exit 1); exit 1
-         }
-       } &&
-
-       # Now rename the file to the real destination.
-       $doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
@@ -515,5 +503,6 @@ done
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644 (file)
index 0000000..fabfdf2
--- /dev/null
@@ -0,0 +1,75 @@
+#
+# Check: a unit test framework for C
+# Copyright (C) 2011 Mateusz Loskot
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+
+set(SOURCES libcompat.c)
+
+set(SOURCES ${SOURCES} fpclassify.c)
+
+if (NOT HAVE_LIBRT)
+  set(SOURCES ${SOURCES} clock_gettime.c)
+  set(SOURCES ${SOURCES} timer_create.c)
+  set(SOURCES ${SOURCES} timer_delete.c)
+  set(SOURCES ${SOURCES} timer_settime.c)
+endif(NOT HAVE_LIBRT)
+
+if(NOT HAVE_GETLINE)
+  set(SOURCES ${SOURCES} getline.c)
+endif(NOT HAVE_GETLINE)
+
+if(NOT HAVE_GETTIMEOFDAY)
+  set(SOURCES ${SOURCES} gettimeofday.c)
+endif(NOT HAVE_GETTIMEOFDAY)
+
+if(NOT HAVE_DECL_LOCALTIME_R)
+  set(SOURCES ${SOURCES} localtime_r.c)
+endif(NOT HAVE_DECL_LOCALTIME_R)
+
+if(NOT HAVE_MALLOC)
+  set(SOURCES ${SOURCES} malloc.c)
+endif(NOT HAVE_MALLOC)
+
+if(NOT HAVE_REALLOC)
+  set(SOURCES ${SOURCES} realloc.c)
+endif(NOT HAVE_REALLOC)
+
+if(NOT HAVE_SNPRINTF)
+    set(SOURCES ${SOURCES} snprintf.c)
+endif(NOT HAVE_SNPRINTF)
+
+if(NOT HAVE_DECL_STRDUP AND NOT HAVE__STRDUP)
+  set(SOURCES ${SOURCES} strdup.c)
+endif(NOT HAVE_DECL_STRDUP AND NOT HAVE__STRDUP)
+
+if(NOT HAVE_DECL_STRSIGNAL)
+  set(SOURCES ${SOURCES} strsignal.c)
+endif(NOT HAVE_DECL_STRSIGNAL)
+
+
+set(HEADERS libcompat.h)
+
+add_library(compat STATIC ${SOURCES} ${HEADERS})
+
+install(TARGETS compat
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib) 
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libcompat.h DESTINATION include)
index daf57ab..12c4f20 100644 (file)
@@ -2,5 +2,5 @@
 
 noinst_LTLIBRARIES = libcompat.la
 libcompat_la_LDFLAGS = -no-undefined
-libcompat_la_SOURCES = libcompat.c libcompat.h
+libcompat_la_SOURCES = libcompat.c libcompat.h fpclassify.c
 libcompat_la_LIBADD = $(LTLIBOBJS) $(LTALLOCA)
index 5330bb8..8e62c89 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 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.
+# Copyright (C) 1994-2014 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -33,52 +89,107 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = lib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in fileno.c \
-       localtime_r.c malloc.c pipe.c putenv.c realloc.c setenv.c \
-       sleep.c strdup.c strsignal.c unsetenv.c
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
        $(top_srcdir)/m4/ax_c_check_flag.m4 \
-       $(top_srcdir)/m4/ax_cflags_warn_all_ansi.m4 \
-       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+       $(top_srcdir)/m4/librt_timers.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libcompat_la_DEPENDENCIES = $(LTLIBOBJS)
-am_libcompat_la_OBJECTS = libcompat.lo
+am_libcompat_la_OBJECTS = libcompat.lo fpclassify.lo
 libcompat_la_OBJECTS = $(am_libcompat_la_OBJECTS)
-libcompat_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcompat_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(libcompat_la_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(libcompat_la_SOURCES)
 DIST_SOURCES = $(libcompat_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp alarm.c \
+       clock_gettime.c getline.c gettimeofday.c localtime_r.c \
+       malloc.c realloc.c snprintf.c strdup.c strsignal.c \
+       timer_create.c timer_delete.c timer_settime.c
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+AWK_GSUB_DBL_BSLASH = @AWK_GSUB_DBL_BSLASH@
+AWK_PATH = @AWK_PATH@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -91,20 +202,25 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_REGEX = @ENABLE_REGEX@
 ENABLE_SUBUNIT = @ENABLE_SUBUNIT@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILTERDIFF = @FILTERDIFF@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
 GENHTML = @GENHTML@
 GREP = @GREP@
+HAVE_FORK = @HAVE_FORK@
+HAVE_REGEX = @HAVE_REGEX@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -115,11 +231,16 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBSUBUNIT_CFLAGS = @LIBSUBUNIT_CFLAGS@
+LIBSUBUNIT_LIBS = @LIBSUBUNIT_LIBS@
+LIBSUBUNIT_PC = @LIBSUBUNIT_PC@
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -132,8 +253,12 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -148,6 +273,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 acx_pthread_config = @acx_pthread_config@
@@ -181,7 +307,6 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -189,6 +314,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -199,7 +325,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libcompat.la
 libcompat_la_LDFLAGS = -no-undefined
-libcompat_la_SOURCES = libcompat.c libcompat.h
+libcompat_la_SOURCES = libcompat.c libcompat.h fpclassify.c
 libcompat_la_LIBADD = $(LTLIBOBJS) $(LTALLOCA)
 all: all-am
 
@@ -214,10 +340,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  lib/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnits  lib/Makefile
-.PRECIOUS: Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits lib/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -234,17 +359,21 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstLTLIBRARIES:
        -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-       @list='$(noinst_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
-libcompat.la: $(libcompat_la_OBJECTS) $(libcompat_la_DEPENDENCIES) 
-       $(libcompat_la_LINK)  $(libcompat_la_OBJECTS) $(libcompat_la_LIBADD) $(LIBS)
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
+libcompat.la: $(libcompat_la_OBJECTS) $(libcompat_la_DEPENDENCIES) $(EXTRA_libcompat_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libcompat_la_LINK)  $(libcompat_la_OBJECTS) $(libcompat_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -252,39 +381,42 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fileno.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alarm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clock_gettime.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getline.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gettimeofday.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/localtime_r.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pipe.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/putenv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sleep.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strsignal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/unsetenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/timer_create.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/timer_delete.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/timer_settime.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpclassify.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcompat.Plo@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -292,49 +424,54 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(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 \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -355,13 +492,17 @@ distdir: $(DISTFILES)
          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 "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -379,16 +520,22 @@ install-am: all-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
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -410,6 +557,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -418,18 +567,28 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -454,18 +613,22 @@ uninstall-am:
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstLTLIBRARIES ctags distclean \
-       distclean-compile distclean-generic distclean-libtool \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       pdf pdf-am ps ps-am tags uninstall uninstall-am
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
+       ctags-am distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/lib/alarm.c b/lib/alarm.c
new file mode 100644 (file)
index 0000000..0de00e5
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+
+unsigned int alarm(unsigned int seconds CK_ATTRIBUTE_UNUSED)
+{
+    assert(0);
+    return 0;
+}
diff --git a/lib/clock_gettime.c b/lib/clock_gettime.c
new file mode 100644 (file)
index 0000000..d9e354d
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+
+#ifdef __APPLE__
+#include <mach/clock.h>
+#include <mach/mach.h>
+#include <mach/mach_time.h>
+#include <CoreServices/CoreServices.h>
+#include <unistd.h>
+#endif
+
+#define NANOSECONDS_PER_SECOND 1000000000
+
+
+
+int clock_gettime(clockid_t clk_id CK_ATTRIBUTE_UNUSED, struct timespec *ts)
+{
+
+#ifdef __APPLE__
+    /* Some versions of macOS and iOS do not have clock_gettime, use
+     * mach_absolute_time */
+
+    static mach_timebase_info_data_t sTimebaseInfo;
+    uint64_t rawTime;
+    uint64_t nanos;
+
+    rawTime = mach_absolute_time();
+
+    /*
+     * OS X has a function to convert abs time to nano seconds: AbsoluteToNanoseconds
+     * However, the function may not be available as we may not have
+     * access to CoreServices. Because of this, we convert the abs time
+     * to nano seconds manually.
+     */
+
+    /*
+     * First grab the time base used on the system, if this is the first
+     * time we are being called. We can check if the value is uninitialized,
+     * as the denominator will be zero. 
+     */
+    if(sTimebaseInfo.denom == 0)
+    {
+        (void)mach_timebase_info(&sTimebaseInfo);
+    }
+
+    /* 
+     * Do the conversion. We hope that the multiplication doesn't 
+     * overflow; the price you pay for working in fixed point.
+     */
+    nanos = rawTime * sTimebaseInfo.numer / sTimebaseInfo.denom;
+
+    /* 
+     * Fill in the timespec container 
+     */
+    ts->tv_sec = nanos / NANOSECONDS_PER_SECOND;
+    ts->tv_nsec = nanos - (ts->tv_sec * NANOSECONDS_PER_SECOND);
+#else
+    /* 
+     * As there is no function to fall back onto to get the current
+     * time, zero out the time so the caller will have a sane value. 
+     */
+    ts->tv_sec = 0;
+    ts->tv_nsec = 0;
+#endif
+
+    return 0;
+}
diff --git a/lib/fileno.c b/lib/fileno.c
deleted file mode 100644 (file)
index 3a3b664..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libcompat.h"
-
-int fileno(FILE *stream CK_ATTRIBUTE_UNUSED)
-{
-  assert (0);
-  return 0;
-}
-
diff --git a/lib/fpclassify.c b/lib/fpclassify.c
new file mode 100644 (file)
index 0000000..2efa3a3
--- /dev/null
@@ -0,0 +1,63 @@
+/* Copyright (C) 2017, bel2125
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+/* Note: Within "check", this file uses the LGPL license.
+ * If you need only this file, you may find a MIT licensed version in
+ * the "floatmagic" repository of the initial author.
+ */
+
+#include "libcompat.h"
+
+double DOUBLE_ZERO = 0.0;
+
+#if defined(NEED_fpclassify)
+
+#if defined(HAVE_STDINT_H)
+#include <stdint.h>
+typedef uint64_t bitfield64;
+#elif defined(_MSC_VER)
+typedef unsigned __int64 bitfield64;
+#else
+typedef unsigned long long bitfield64;
+#endif
+
+static bitfield64 ms = 0x8000000000000000;
+static bitfield64 me = 0x7FF0000000000000;
+static bitfield64 mf = 0x000FFFFFFFFFFFFF;
+
+int fpclassify(double d) 
+{
+  bitfield64 *p = (bitfield64 *)&d;
+  if ((*p & me) != me) {
+    /* finite */
+    if (*p & mf) {
+      /* finite and not null */
+      if (*p & me) {
+        return FP_NORMAL;
+      }
+      return FP_SUBNORMAL;
+    }  
+    return FP_ZERO;
+  }
+  if (*p & mf) {
+    return FP_NAN;
+  }
+  return FP_INFINITE;
+}
+
+#endif
+
diff --git a/lib/getline.c b/lib/getline.c
new file mode 100644 (file)
index 0000000..c27da7e
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+#include <stdio.h>
+
+#define INITIAL_SIZE 16
+#define DELIMITER '\n'
+
+ssize_t getline(char **lineptr, size_t *n, FILE *stream)
+{
+     ssize_t written = 0;
+     int character;
+
+     if(*lineptr == NULL || *n < INITIAL_SIZE)
+     {
+          free(*lineptr);
+          *lineptr = (char *)malloc(INITIAL_SIZE);
+          *n = INITIAL_SIZE;
+     }
+
+     while( (character = fgetc(stream)) != EOF)
+     {
+          written += 1;
+          if(written >= *n)
+          {
+               *n = *n * 2;
+               *lineptr = realloc(*lineptr, *n);
+          }
+
+          (*lineptr)[written-1] = character;
+
+          if(character == DELIMITER)
+          {
+               break;
+          }
+     }
+
+     (*lineptr)[written] = '\0';
+
+     return written;
+}
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
new file mode 100644 (file)
index 0000000..e2ee0b1
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+#include <errno.h>
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define EPOCHFILETIME (116444736000000000i64)
+#else
+#define EPOCHFILETIME (116444736000000000LL)
+#endif
+
+int gettimeofday(struct timeval *tv, void *tz)
+{
+#if defined(_MSC_VER)
+    union
+    {
+        __int64 ns100;          /*time since 1 Jan 1601 in 100ns units */
+        FILETIME ft;
+    } now;
+
+    GetSystemTimeAsFileTime(&now.ft);
+    tv->tv_usec = (long)((now.ns100 / 10LL) % 1000000LL);
+    tv->tv_sec = (long)((now.ns100 - EPOCHFILETIME) / 10000000LL);
+    return (0);
+#else
+    // Return that there is no implementation of this on the system
+    errno = ENOSYS;
+    return -1;
+#endif /* _MSC_VER */
+}
index 9687e51..e9b654a 100644 (file)
@@ -1,8 +1,34 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "libcompat.h"
 
 /* silence warnings about an empty library */
-void
-ck_do_nothing (void)
+void ck_do_nothing(void)
 {
-  assert (0);
+    assert(0);
+
+    /*
+     * to silence warning about this function actually
+     * returning, but being marked as noreturn. assert()
+     * must be marked as a function that returns.
+     */
+    exit(1);
 }
index e0085c6..9ec6eb8 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #ifndef LIBCOMPAT_H
 #define LIBCOMPAT_H
 
 #if GCC_VERSION_AT_LEAST(2,95)
 #define CK_ATTRIBUTE_UNUSED __attribute__ ((unused))
 #else
-#define CK_ATTRIBUTE_UNUSED              
+#define CK_ATTRIBUTE_UNUSED
 #endif /* GCC 2.95 */
 
+#if GCC_VERSION_AT_LEAST(2,5)
+#define CK_ATTRIBUTE_NORETURN __attribute__ ((noreturn))
+#else
+#define CK_ATTRIBUTE_NORETURN
+#endif /* GCC 2.5 */
+
+/*
+ * Used for MSVC to create the export attribute
+ * CK_DLL_EXP is defined during the compilation of the library
+ * on the command line.
+ */
+#ifndef CK_DLL_EXP
+#define CK_DLL_EXP
+#endif
+
+#if defined(_MSC_VER)
+#include <WinSock2.h>           /* struct timeval, API used in gettimeofday implementation */
+#include <io.h>                 /* read, write */
+#include <process.h>            /* getpid */
+#endif /* _MSC_VER */
+
 /* defines size_t */
 #include <sys/types.h>
 
 /* defines FILE */
 #include <stdio.h>
 
+/* defines exit() */
+#include <stdlib.h>
+
+/* defines NAN, INFINITY, isnan(), isinf(), isfinite() */
+#include <math.h>
+
+/* However, some older Visual Studio Versions do not */
+#if !defined(INFINITY) || !defined(NAN)
+extern double DOUBLE_ZERO;
+#define INFINITY (1.0/DOUBLE_ZERO)
+#define NAN (DOUBLE_ZERO/DOUBLE_ZERO)
+#endif
+#if !defined(isnan) || !defined(isinf) || !defined(isfinite)
+#define NEED_fpclassify
+extern int fpclassify(double d);
+#define FP_INFINITE (1)
+#define FP_NAN (2)
+#define FP_ZERO (4)
+#define FP_NORMAL (8)
+#define FP_SUBNORMAL (16)
+#define isnan(x) ((fpclassify((double)(x)) & FP_NAN) == FP_NAN)
+#define isinf(x) ((fpclassify((double)(x)) & FP_INFINITE) == FP_INFINITE)
+#define isfinite(x) ((fpclassify((double)(x)) & (FP_NAN|FP_INFINITE)) == 0)
+#endif
+
+
 /* provides localtime and struct tm */
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif /* !HAVE_SYS_TIME_H */
 #include <time.h>
 
 /* declares fork(), _POSIX_VERSION.  according to Autoconf.info,
 #include <pthread.h>
 #endif
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
 /* replacement functions for broken originals */
+#if !HAVE_DECL_ALARM
+CK_DLL_EXP unsigned int alarm(unsigned int seconds);
+#endif /* !HAVE_DECL_ALARM */
+
 #if !HAVE_MALLOC
-void *rpl_malloc (size_t n);
+CK_DLL_EXP void *rpl_malloc(size_t n);
 #endif /* !HAVE_MALLOC */
 
 #if !HAVE_REALLOC
-void *rpl_realloc (void *p, size_t n);
+CK_DLL_EXP void *rpl_realloc(void *p, size_t n);
 #endif /* !HAVE_REALLOC */
 
-/* functions that may be undeclared */
-#if !HAVE_DECL_FILENO
-int fileno (FILE *stream);
-#endif /* !HAVE_DECL_FILENO */
+#if !HAVE_GETPID && HAVE__GETPID
+#define getpid _getpid
+#endif /* !HAVE_GETPID && HAVE__GETPID */
+
+#if !HAVE_GETTIMEOFDAY
+CK_DLL_EXP int gettimeofday(struct timeval *tv, void *tz);
+#endif /* !HAVE_GETTIMEOFDAY */
 
 #if !HAVE_DECL_LOCALTIME_R
-struct tm *localtime_r (const time_t *clock, struct tm *result);
+#if !defined(localtime_r)
+CK_DLL_EXP struct tm *localtime_r(const time_t * clock, struct tm *result);
+#endif
 #endif /* !HAVE_DECL_LOCALTIME_R */
 
-#if !HAVE_DECL_PIPE
-int pipe (int *fildes);
-#endif /* !HAVE_DECL_PIPE */
+#if !HAVE_DECL_STRDUP && !HAVE__STRDUP
+CK_DLL_EXP char *strdup(const char *str);
+#elif !HAVE_DECL_STRDUP && HAVE__STRDUP
+#define strdup _strdup
+#endif /* !HAVE_DECL_STRDUP && HAVE__STRDUP */
 
-#if !HAVE_DECL_PUTENV
-int putenv (const char *string);
-#endif /* !HAVE_DECL_PUTENV */
+#if !HAVE_DECL_STRSIGNAL
+CK_DLL_EXP char *strsignal(int sig);
+#endif /* !HAVE_DECL_STRSIGNAL */
 
-#if !HAVE_DECL_SETENV
-int setenv (const char *name, const char *value, int overwrite);
-#endif /* !HAVE_DECL_SETENV */
+/*
+ * On systems where clock_gettime() is not available, or
+ * on systems where some clocks may not be supported, the
+ * definition for CLOCK_MONOTONIC and CLOCK_REALTIME may not
+ * be available. These should define which type of clock
+ * clock_gettime() should use. We define it here if it is
+ * not defined simply so the reimplementation can ignore it.
+ *
+ * We set the values of these clocks to some (hopefully)
+ * invalid value, to avoid the case where we define a
+ * clock with a valid value, and unintentionally use
+ * an actual good clock by accident.
+ */
+#ifndef CLOCK_MONOTONIC
+#define CLOCK_MONOTONIC -1
+#endif
+#ifndef CLOCK_REALTIME
+#define CLOCK_REALTIME -1
+#endif
 
-/* our setenv implementation is currently broken */
-#if !HAVE_SETENV
-#define HAVE_WORKING_SETENV 0
-#else
-#define HAVE_WORKING_SETENV 1
+#ifndef HAVE_LIBRT
+
+#ifdef STRUCT_TIMESPEC_DEFINITION_MISSING
+/*
+ * The following structure is defined in POSIX 1003.1 for times
+ * specified in seconds and nanoseconds. If it is not defined in
+ * time.g, then we need to define it here
+ */
+struct timespec
+{
+    time_t tv_sec;
+    long tv_nsec;
+};
+#endif /* STRUCT_TIMESPEC_DEFINITION_MISSING */
+
+#ifdef STRUCT_ITIMERSPEC_DEFINITION_MISSING
+/* 
+ * The following structure is defined in POSIX.1b for timer start values and intervals.
+ * If it is not defined in time.h, then we need to define it here.
+ */
+struct itimerspec
+{
+    struct timespec it_interval;
+    struct timespec it_value;
+};
+#endif /* STRUCT_ITIMERSPEC_DEFINITION_MISSING */
+
+/* 
+ * Do a simple forward declaration in case the struct is not defined.
+ * In the versions of timer_create in libcompat, sigevent is never
+ * used.
+ */
+struct sigevent;
+
+CK_DLL_EXP int clock_gettime(clockid_t clk_id, struct timespec *ts);
+CK_DLL_EXP int timer_create(clockid_t clockid, struct sigevent *sevp,
+                            timer_t * timerid);
+CK_DLL_EXP int timer_settime(timer_t timerid, int flags,
+                             const struct itimerspec *new_value,
+                             struct itimerspec *old_value);
+CK_DLL_EXP int timer_delete(timer_t timerid);
+#endif /* HAVE_LIBRT */
+
+/*
+ * The following checks are to determine if the system's
+ * snprintf (or its variants) should be replaced with
+ * the C99 compliant version in libcompat.
+ */
+#if HAVE_CONFIG_H
+#include <config.h>
 #endif
+#if HAVE_STDARG_H
+#include <stdarg.h>
 
-#if !HAVE_DECL_SLEEP
-unsigned int sleep (unsigned int seconds);
-#endif /* !HAVE_DECL_SLEEP */
+#if !HAVE_VSNPRINTF
+CK_DLL_EXP int rpl_vsnprintf(char *, size_t, const char *, va_list);
 
-#if !HAVE_DECL_STRDUP
-char *strdup (const char *str);
-#endif /* !HAVE_DECL_STRDUP */
+#define vsnprintf rpl_vsnprintf
+#endif
+#if !HAVE_SNPRINTF
+CK_DLL_EXP int rpl_snprintf(char *, size_t, const char *, ...);
 
-#if !HAVE_DECL_STRSIGNAL
-const char *strsignal (int sig);
-#endif /* !HAVE_DECL_STRSIGNAL */
+#define snprintf rpl_snprintf
+#endif
+#endif /* HAVE_STDARG_H */
 
-#if !HAVE_DECL_UNSETENV
-void unsetenv (const char *name);
-#endif /* !HAVE_DECL_UNSETENV */
+#if !HAVE_GETLINE
+CK_DLL_EXP ssize_t getline(char **lineptr, size_t *n, FILE *stream);
+#endif
 
 /* silence warnings about an empty library */
-void ck_do_nothing (void);
+CK_DLL_EXP void ck_do_nothing(void) CK_ATTRIBUTE_NORETURN;
 
 #endif /* !LIBCOMPAT_H */
index 65ea7bb..540527d 100644 (file)
@@ -1,16 +1,41 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "libcompat.h"
-  
-struct tm *
-localtime_r (const time_t *clock, struct tm *result)
+
+#if !defined(localtime_r)
+
+struct tm *localtime_r(const time_t * clock, struct tm *result)
 {
-  struct tm *now = localtime (clock);
-  if (now == NULL)
+    struct tm *now = localtime(clock);
+
+    if(now == NULL)
     {
-      return NULL;
+        return NULL;
     }
-  else
+    else
     {
-      *result = *now;
+        *result = *now;
     }
-  return result;
+
+    return result;
 }
+
+#endif /* !defined(localtime_r) */
index 39b11e9..8cc0044 100644 (file)
@@ -1,5 +1,27 @@
-/* AC_FUNC_MALLOC in configure defines malloc to rpl_malloc if
-   malloc (0) is NULL to provide GNU compatibility */
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+/*
+ * AC_FUNC_MALLOC in configure defines malloc to rpl_malloc if
+ * malloc (0) is NULL to provide GNU compatibility
+ */
 
 #include "libcompat.h"
 
 #undef malloc
 
 /* this gives us the real malloc to use below */
-void *malloc (size_t n);
+void *malloc(size_t n);
 
 /* force malloc(0) to return a valid pointer */
-void *
-rpl_malloc (size_t n)
+void *rpl_malloc(size_t n)
 {
-  if (n == 0)
-    n = 1;
-  return malloc (n);
+    if(n == 0)
+        n = 1;
+    return malloc(n);
 }
diff --git a/lib/pipe.c b/lib/pipe.c
deleted file mode 100644 (file)
index 602f94a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libcompat.h"
-
-int
-pipe (int *fildes CK_ATTRIBUTE_UNUSED)
-{
-  assert (0);
-  return 0;
-}
diff --git a/lib/putenv.c b/lib/putenv.c
deleted file mode 100644 (file)
index ad9b581..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libcompat.h"
-
-int
-putenv (const char *string CK_ATTRIBUTE_UNUSED);
-{
-  assert (0);
-  return 0;
-}
index bbf51bb..7d72876 100644 (file)
@@ -1,22 +1,43 @@
-/* AC_FUNC_REALLOC in configure defines realloc to rpl_realloc if
-   realloc (p, 0) or realloc (0, n) is NULL to provide GNU
-   compatibility */
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+/*
+ * AC_FUNC_REALLOC in configure defines realloc to rpl_realloc if
+ * realloc (p, 0) or realloc (0, n) is NULL to provide GNU
+ * compatibility
+ */
 
 #include "libcompat.h"
 
 /* realloc has been defined to rpl_realloc, so first undo that */
 #undef realloc
-     
+
 /* this gives us the real realloc to use below */
-void *realloc (void *p, size_t n);
-     
+void *realloc(void *p, size_t n);
+
 /* force realloc(p, 0) and realloc (NULL, n) to return a valid pointer */
-void *
-rpl_realloc (void *p, size_t n)
+void *rpl_realloc(void *p, size_t n)
 {
-  if (n == 0)
-    n = 1;
-  if (p == 0)
-    return malloc (n);
-  return realloc (p, n);
+    if(n == 0)
+        n = 1;
+    if(p == 0)
+        return malloc(n);
+    return realloc(p, n);
 }
diff --git a/lib/setenv.c b/lib/setenv.c
deleted file mode 100644 (file)
index 86cc8c8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libcompat.h"
-
-int
-setenv (const char *name CK_ATTRIBUTE_UNUSED, const char *value CK_ATTRIBUTE_UNUSED, int overwrite CK_ATTRIBUTE_UNUSED)
-{
-  assert (0);
-  return 0;
-}
diff --git a/lib/sleep.c b/lib/sleep.c
deleted file mode 100644 (file)
index a70ffbd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libcompat.h"
-
-unsigned int
-sleep (unsigned int seconds CK_ATTRIBUTE_UNUSED)
-{
-  assert (0);
-  return 0;
-}
diff --git a/lib/snprintf.c b/lib/snprintf.c
new file mode 100644 (file)
index 0000000..b91b65c
--- /dev/null
@@ -0,0 +1,2022 @@
+/* $Id: snprintf.c,v 1.9 2008/01/20 14:02:00 holger Exp $ */
+
+/*
+ * Copyright (c) 1995 Patrick Powell.
+ *
+ * This code is based on code written by Patrick Powell <papowell@astart.com>.
+ * It may be used for any purpose as long as this notice remains intact on all
+ * source code distributions.
+ */
+
+/*
+ * Copyright (c) 2008 Holger Weiss.
+ *
+ * This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.
+ * My changes to the code may freely be used, modified and/or redistributed for
+ * any purpose.  It would be nice if additions and fixes to this file (including
+ * trivial code cleanups) would be sent back in order to let me include them in
+ * the version available at <http://www.jhweiss.de/software/snprintf.html>.
+ * However, this is not a requirement for using or redistributing (possibly
+ * modified) versions of this file, nor is leaving this notice intact mandatory.
+ */
+
+/*
+ * History
+ *
+ * 2008-01-20 Holger Weiss <holger@jhweiss.de> for C99-snprintf 1.1:
+ *
+ *     Fixed the detection of infinite floating point values on IRIX (and
+ *     possibly other systems) and applied another few minor cleanups.
+ *
+ * 2008-01-06 Holger Weiss <holger@jhweiss.de> for C99-snprintf 1.0:
+ *
+ *     Added a lot of new features, fixed many bugs, and incorporated various
+ *     improvements done by Andrew Tridgell <tridge@samba.org>, Russ Allbery
+ *     <rra@stanford.edu>, Hrvoje Niksic <hniksic@xemacs.org>, Damien Miller
+ *     <djm@mindrot.org>, and others for the Samba, INN, Wget, and OpenSSH
+ *     projects.  The additions include: support the "e", "E", "g", "G", and
+ *     "F" conversion specifiers (and use conversion style "f" or "F" for the
+ *     still unsupported "a" and "A" specifiers); support the "hh", "ll", "j",
+ *     "t", and "z" length modifiers; support the "#" flag and the (non-C99)
+ *     "'" flag; use localeconv(3) (if available) to get both the current
+ *     locale's decimal point character and the separator between groups of
+ *     digits; fix the handling of various corner cases of field width and
+ *     precision specifications; fix various floating point conversion bugs;
+ *     handle infinite and NaN floating point values; don't attempt to write to
+ *     the output buffer (which may be NULL) if a size of zero was specified;
+ *     check for integer overflow of the field width, precision, and return
+ *     values and during the floating point conversion; use the OUTCHAR() macro
+ *     instead of a function for better performance; provide asprintf(3) and
+ *     vasprintf(3) functions; add new test cases.  The replacement functions
+ *     have been renamed to use an "rpl_" prefix, the function calls in the
+ *     main project (and in this file) must be redefined accordingly for each
+ *     replacement function which is needed (by using Autoconf or other means).
+ *     Various other minor improvements have been applied and the coding style
+ *     was cleaned up for consistency.
+ *
+ * 2007-07-23 Holger Weiss <holger@jhweiss.de> for Mutt 1.5.13:
+ *
+ *     C99 compliant snprintf(3) and vsnprintf(3) functions return the number
+ *     of characters that would have been written to a sufficiently sized
+ *     buffer (excluding the '\0').  The original code simply returned the
+ *     length of the resulting output string, so that's been fixed.
+ *
+ * 1998-03-05 Michael Elkins <me@mutt.org> for Mutt 0.90.8:
+ *
+ *     The original code assumed that both snprintf(3) and vsnprintf(3) were
+ *     missing.  Some systems only have snprintf(3) but not vsnprintf(3), so
+ *     the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
+ *
+ * 1998-01-27 Thomas Roessler <roessler@does-not-exist.org> for Mutt 0.89i:
+ *
+ *     The PGP code was using unsigned hexadecimal formats.  Unfortunately,
+ *     unsigned formats simply didn't work.
+ *
+ * 1997-10-22 Brandon Long <blong@fiction.net> for Mutt 0.87.1:
+ *
+ *     Ok, added some minimal floating point support, which means this probably
+ *     requires libm on most operating systems.  Don't yet support the exponent
+ *     (e,E) and sigfig (g,G).  Also, fmtint() was pretty badly broken, it just
+ *     wasn't being exercised in ways which showed it, so that's been fixed.
+ *     Also, formatted the code to Mutt conventions, and removed dead code left
+ *     over from the original.  Also, there is now a builtin-test, run with:
+ *     gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm && ./snprintf
+ *
+ * 2996-09-15 Brandon Long <blong@fiction.net> for Mutt 0.43:
+ *
+ *     This was ugly.  It is still ugly.  I opted out of floating point
+ *     numbers, but the formatter understands just about everything from the
+ *     normal C string format, at least as far as I can tell from the Solaris
+ *     2.5 printf(3S) man page.
+ */
+
+/*
+ * ToDo
+ *
+ * - Add wide character support.
+ * - Add support for "%a" and "%A" conversions.
+ * - Create test routines which predefine the expected results.  Our test cases
+ *   usually expose bugs in system implementations rather than in ours :-)
+ */
+
+/*
+ * Usage
+ *
+ * 1) The following preprocessor macros should be defined to 1 if the feature or
+ *    file in question is available on the target system (by using Autoconf or
+ *    other means), though basic functionality should be available as long as
+ *    HAVE_STDARG_H and HAVE_STDLIB_H are defined correctly:
+ *
+ *     HAVE_VSNPRINTF
+ *     HAVE_SNPRINTF
+ *     HAVE_VASPRINTF
+ *     HAVE_ASPRINTF
+ *     HAVE_STDARG_H
+ *     HAVE_STDDEF_H
+ *     HAVE_STDINT_H
+ *     HAVE_STDLIB_H
+ *     HAVE_INTTYPES_H
+ *     HAVE_LOCALE_H
+ *     HAVE_LOCALECONV
+ *     HAVE_LCONV_DECIMAL_POINT
+ *     HAVE_LCONV_THOUSANDS_SEP
+ *     HAVE_LONG_DOUBLE
+ *     HAVE_LONG_LONG_INT
+ *     HAVE_UNSIGNED_LONG_LONG_INT
+ *     HAVE_INTMAX_T
+ *     HAVE_UINTMAX_T
+ *     HAVE_UINTPTR_T
+ *     HAVE_PTRDIFF_T
+ *     HAVE_VA_COPY
+ *     HAVE___VA_COPY
+ *
+ * 2) The calls to the functions which should be replaced must be redefined
+ *    throughout the project files (by using Autoconf or other means):
+ *
+ *     #define vsnprintf rpl_vsnprintf
+ *     #define snprintf rpl_snprintf
+ *     #define vasprintf rpl_vasprintf
+ *     #define asprintf rpl_asprintf
+ *
+ * 3) The required replacement functions should be declared in some header file
+ *    included throughout the project files:
+ *
+ *     #if HAVE_CONFIG_H
+ *     #include <config.h>
+ *     #endif
+ *     #if HAVE_STDARG_H
+ *     #include <stdarg.h>
+ *     #if !HAVE_VSNPRINTF
+ *     int rpl_vsnprintf(char *, size_t, const char *, va_list);
+ *     #endif
+ *     #if !HAVE_SNPRINTF
+ *     int rpl_snprintf(char *, size_t, const char *, ...);
+ *     #endif
+ *     #if !HAVE_VASPRINTF
+ *     int rpl_vasprintf(char **, const char *, va_list);
+ *     #endif
+ *     #if !HAVE_ASPRINTF
+ *     int rpl_asprintf(char **, const char *, ...);
+ *     #endif
+ *     #endif
+ *
+ * Autoconf macros for handling step 1 and step 2 are available at
+ * <http://www.jhweiss.de/software/snprintf.html>.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+#if TEST_SNPRINTF
+#include <math.h>      /* For pow(3), NAN, and INFINITY. */
+#include <string.h>    /* For strcmp(3). */
+#if defined(__NetBSD__) || \
+    defined(__FreeBSD__) || \
+    defined(__OpenBSD__) || \
+    defined(__NeXT__) || \
+    defined(__bsd__)
+#define OS_BSD 1
+#elif defined(sgi) || defined(__sgi)
+#ifndef __c99
+#define __c99  /* Force C99 mode to get <stdint.h> included on IRIX 6.5.30. */
+#endif /* !defined(__c99) */
+#define OS_IRIX 1
+#define OS_SYSV 1
+#elif defined(__svr4__)
+#define OS_SYSV 1
+#elif defined(__linux__)
+#define OS_LINUX 1
+#endif /* defined(__NetBSD__) || defined(__FreeBSD__) || [...] */
+#if HAVE_CONFIG_H      /* Undefine definitions possibly done in config.h. */
+#ifdef HAVE_SNPRINTF
+#undef HAVE_SNPRINTF
+#endif /* defined(HAVE_SNPRINTF) */
+#ifdef HAVE_VSNPRINTF
+#undef HAVE_VSNPRINTF
+#endif /* defined(HAVE_VSNPRINTF) */
+#ifdef snprintf
+#undef snprintf
+#endif /* defined(snprintf) */
+#ifdef vsnprintf
+#undef vsnprintf
+#endif /* defined(vsnprintf) */
+#else  /* By default, we assume a modern system for testing. */
+#ifndef HAVE_STDARG_H
+#define HAVE_STDARG_H 1
+#endif /* HAVE_STDARG_H */
+#ifndef HAVE_STDDEF_H
+#define HAVE_STDDEF_H 1
+#endif /* HAVE_STDDEF_H */
+#ifndef HAVE_STDINT_H
+#define HAVE_STDINT_H 1
+#endif /* HAVE_STDINT_H */
+#ifndef HAVE_STDLIB_H
+#define HAVE_STDLIB_H 1
+#endif /* HAVE_STDLIB_H */
+#ifndef HAVE_INTTYPES_H
+#define HAVE_INTTYPES_H 1
+#endif /* HAVE_INTTYPES_H */
+#ifndef HAVE_LOCALE_H
+#define HAVE_LOCALE_H 1
+#endif /* HAVE_LOCALE_H */
+#ifndef HAVE_LOCALECONV
+#define HAVE_LOCALECONV 1
+#endif /* !defined(HAVE_LOCALECONV) */
+#ifndef HAVE_LCONV_DECIMAL_POINT
+#define HAVE_LCONV_DECIMAL_POINT 1
+#endif /* HAVE_LCONV_DECIMAL_POINT */
+#ifndef HAVE_LCONV_THOUSANDS_SEP
+#define HAVE_LCONV_THOUSANDS_SEP 1
+#endif /* HAVE_LCONV_THOUSANDS_SEP */
+#ifndef HAVE_LONG_DOUBLE
+#define HAVE_LONG_DOUBLE 1
+#endif /* !defined(HAVE_LONG_DOUBLE) */
+#ifndef HAVE_LONG_LONG_INT
+#define HAVE_LONG_LONG_INT 1
+#endif /* !defined(HAVE_LONG_LONG_INT) */
+#ifndef HAVE_UNSIGNED_LONG_LONG_INT
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+#endif /* !defined(HAVE_UNSIGNED_LONG_LONG_INT) */
+#ifndef HAVE_INTMAX_T
+#define HAVE_INTMAX_T 1
+#endif /* !defined(HAVE_INTMAX_T) */
+#ifndef HAVE_UINTMAX_T
+#define HAVE_UINTMAX_T 1
+#endif /* !defined(HAVE_UINTMAX_T) */
+#ifndef HAVE_UINTPTR_T
+#define HAVE_UINTPTR_T 1
+#endif /* !defined(HAVE_UINTPTR_T) */
+#ifndef HAVE_PTRDIFF_T
+#define HAVE_PTRDIFF_T 1
+#endif /* !defined(HAVE_PTRDIFF_T) */
+#ifndef HAVE_VA_COPY
+#define HAVE_VA_COPY 1
+#endif /* !defined(HAVE_VA_COPY) */
+#ifndef HAVE___VA_COPY
+#define HAVE___VA_COPY 1
+#endif /* !defined(HAVE___VA_COPY) */
+#endif /* HAVE_CONFIG_H */
+#define snprintf rpl_snprintf
+#define vsnprintf rpl_vsnprintf
+#endif /* TEST_SNPRINTF */
+
+#if !HAVE_SNPRINTF || !HAVE_VSNPRINTF
+#include <stdio.h>     /* For NULL, size_t, vsnprintf(3), and vasprintf(3). */
+#ifdef VA_START
+#undef VA_START
+#endif /* defined(VA_START) */
+#ifdef VA_SHIFT
+#undef VA_SHIFT
+#endif /* defined(VA_SHIFT) */
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#define VA_START(ap, last) va_start(ap, last)
+#define VA_SHIFT(ap, value, type) /* No-op for ANSI C. */
+#else  /* Assume <varargs.h> is available. */
+#include <varargs.h>
+#define VA_START(ap, last) va_start(ap)        /* "last" is ignored. */
+#define VA_SHIFT(ap, value, type) value = va_arg(ap, type)
+#endif /* HAVE_STDARG_H */
+
+#if !HAVE_VSNPRINTF
+#include <errno.h>     /* For ERANGE and errno. */
+#include <limits.h>    /* For *_MAX. */
+#if HAVE_INTTYPES_H
+#include <inttypes.h>  /* For intmax_t (if not defined in <stdint.h>). */
+#endif /* HAVE_INTTYPES_H */
+#if HAVE_LOCALE_H
+#include <locale.h>    /* For localeconv(3). */
+#endif /* HAVE_LOCALE_H */
+#if HAVE_STDDEF_H
+#include <stddef.h>    /* For ptrdiff_t. */
+#endif /* HAVE_STDDEF_H */
+#if HAVE_STDINT_H
+#include <stdint.h>    /* For intmax_t. */
+#endif /* HAVE_STDINT_H */
+
+/* Support for unsigned long long int.  We may also need ULLONG_MAX. */
+#ifndef ULONG_MAX      /* We may need ULONG_MAX as a fallback. */
+#ifdef UINT_MAX
+#define ULONG_MAX UINT_MAX
+#else
+#define ULONG_MAX INT_MAX
+#endif /* defined(UINT_MAX) */
+#endif /* !defined(ULONG_MAX) */
+#ifdef ULLONG
+#undef ULLONG
+#endif /* defined(ULLONG) */
+#if HAVE_UNSIGNED_LONG_LONG_INT
+#define ULLONG unsigned long long int
+#ifndef ULLONG_MAX
+#define ULLONG_MAX ULONG_MAX
+#endif /* !defined(ULLONG_MAX) */
+#else
+#define ULLONG unsigned long int
+#ifdef ULLONG_MAX
+#undef ULLONG_MAX
+#endif /* defined(ULLONG_MAX) */
+#define ULLONG_MAX ULONG_MAX
+#endif /* HAVE_LONG_LONG_INT */
+
+/* Support for uintmax_t.  We also need UINTMAX_MAX. */
+#ifdef UINTMAX_T
+#undef UINTMAX_T
+#endif /* defined(UINTMAX_T) */
+#if defined(HAVE_UINTMAX_T) || defined(uintmax_t)
+#define UINTMAX_T uintmax_t
+#ifndef UINTMAX_MAX
+#define UINTMAX_MAX ULLONG_MAX
+#endif /* !defined(UINTMAX_MAX) */
+#else
+#define UINTMAX_T ULLONG
+#ifdef UINTMAX_MAX
+#undef UINTMAX_MAX
+#endif /* defined(UINTMAX_MAX) */
+#define UINTMAX_MAX ULLONG_MAX
+#endif /* HAVE_UINTMAX_T || defined(uintmax_t) */
+
+/* Support for long double. */
+#ifndef LDOUBLE
+#if HAVE_LONG_DOUBLE
+#define LDOUBLE long double
+#else
+#define LDOUBLE double
+#endif /* HAVE_LONG_DOUBLE */
+#endif /* !defined(LDOUBLE) */
+
+/* Support for long long int. */
+#ifndef LLONG
+#if HAVE_LONG_LONG_INT
+#define LLONG long long int
+#else
+#define LLONG long int
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !defined(LLONG) */
+
+/* Support for intmax_t. */
+#ifndef INTMAX_T
+#if defined(HAVE_INTMAX_T) || defined(intmax_t)
+#define INTMAX_T intmax_t
+#else
+#define INTMAX_T LLONG
+#endif /* HAVE_INTMAX_T || defined(intmax_t) */
+#endif /* !defined(INTMAX_T) */
+
+/* Support for uintptr_t. */
+#ifndef UINTPTR_T
+#if defined(HAVE_UINTPTR_T) || defined(uintptr_t)
+#define UINTPTR_T uintptr_t
+#else
+#define UINTPTR_T unsigned long int
+#endif /* HAVE_UINTPTR_T || defined(uintptr_t) */
+#endif /* !defined(UINTPTR_T) */
+
+/* Support for ptrdiff_t. */
+#ifndef PTRDIFF_T
+#if defined(HAVE_PTRDIFF_T) || defined(ptrdiff_t)
+#define PTRDIFF_T ptrdiff_t
+#else
+#define PTRDIFF_T long int
+#endif /* HAVE_PTRDIFF_T || defined(ptrdiff_t) */
+#endif /* !defined(PTRDIFF_T) */
+
+/*
+ * We need an unsigned integer type corresponding to ptrdiff_t (cf. C99:
+ * 7.19.6.1, 7).  However, we'll simply use PTRDIFF_T and convert it to an
+ * unsigned type if necessary.  This should work just fine in practice.
+ */
+#ifndef UPTRDIFF_T
+#define UPTRDIFF_T PTRDIFF_T
+#endif /* !defined(UPTRDIFF_T) */
+
+/*
+ * We need a signed integer type corresponding to size_t (cf. C99: 7.19.6.1, 7).
+ * However, we'll simply use size_t and convert it to a signed type if
+ * necessary.  This should work just fine in practice.
+ */
+#ifndef SSIZE_T
+#define SSIZE_T size_t
+#endif /* !defined(SSIZE_T) */
+
+/* Either ERANGE or E2BIG should be available everywhere. */
+#ifndef ERANGE
+#define ERANGE E2BIG
+#endif /* !defined(ERANGE) */
+#ifndef EOVERFLOW
+#define EOVERFLOW ERANGE
+#endif /* !defined(EOVERFLOW) */
+
+/*
+ * Buffer size to hold the octal string representation of UINT128_MAX without
+ * nul-termination ("3777777777777777777777777777777777777777777").
+ */
+#ifdef MAX_CONVERT_LENGTH
+#undef MAX_CONVERT_LENGTH
+#endif /* defined(MAX_CONVERT_LENGTH) */
+#define MAX_CONVERT_LENGTH      43
+
+/* Format read states. */
+#define PRINT_S_DEFAULT         0
+#define PRINT_S_FLAGS           1
+#define PRINT_S_WIDTH           2
+#define PRINT_S_DOT             3
+#define PRINT_S_PRECISION       4
+#define PRINT_S_MOD             5
+#define PRINT_S_CONV            6
+
+/* Format flags. */
+#define PRINT_F_MINUS           (1 << 0)
+#define PRINT_F_PLUS            (1 << 1)
+#define PRINT_F_SPACE           (1 << 2)
+#define PRINT_F_NUM             (1 << 3)
+#define PRINT_F_ZERO            (1 << 4)
+#define PRINT_F_QUOTE           (1 << 5)
+#define PRINT_F_UP              (1 << 6)
+#define PRINT_F_UNSIGNED        (1 << 7)
+#define PRINT_F_TYPE_G          (1 << 8)
+#define PRINT_F_TYPE_E          (1 << 9)
+
+/* Conversion flags. */
+#define PRINT_C_CHAR            1
+#define PRINT_C_SHORT           2
+#define PRINT_C_LONG            3
+/*#define PRINT_C_LLONG         4 */
+#define PRINT_C_LDOUBLE         5
+#define PRINT_C_SIZE            6
+#define PRINT_C_PTRDIFF         7
+#define PRINT_C_INTMAX          8
+
+#ifndef MAX
+#define MAX(x, y) ((x >= y) ? x : y)
+#endif /* !defined(MAX) */
+#ifndef CHARTOINT
+#define CHARTOINT(ch) (ch - '0')
+#endif /* !defined(CHARTOINT) */
+#ifndef ISDIGIT
+#define ISDIGIT(ch) ('0' <= (unsigned char)ch && (unsigned char)ch <= '9')
+#endif /* !defined(ISDIGIT) */
+#ifndef ISNAN
+#define ISNAN(x) (x != x)
+#endif /* !defined(ISNAN) */
+#ifndef ISINF
+#define ISINF(x) (x != 0.0 && x + x == x)
+#endif /* !defined(ISINF) */
+
+#ifdef OUTCHAR
+#undef OUTCHAR
+#endif /* defined(OUTCHAR) */
+#define OUTCHAR(str, len, size, ch)                                          \
+do {                                                                         \
+       if (len + 1 < size)                                                  \
+               str[len] = ch;                                               \
+       (len)++;                                                             \
+} while (/* CONSTCOND */ 0)
+
+static void fmtstr(char *, size_t *, size_t, const char *, int, int, int);
+static void fmtint(char *, size_t *, size_t, INTMAX_T, int, int, int, int);
+static void fmtflt(char *, size_t *, size_t, LDOUBLE, int, int, int, int *);
+static void printsep(char *, size_t *, size_t);
+static int getnumsep(int);
+static int getexponent(LDOUBLE);
+static int convert(UINTMAX_T, char *, size_t, int, int);
+static UINTMAX_T cast(LDOUBLE);
+static UINTMAX_T myround(LDOUBLE);
+static LDOUBLE mypow10(int);
+
+extern int errno;
+
+int
+rpl_vsnprintf(char *str, size_t size, const char *format, va_list args)
+{
+       LDOUBLE fvalue;
+       INTMAX_T value;
+       unsigned char cvalue;
+       const char *strvalue;
+       INTMAX_T *intmaxptr;
+       PTRDIFF_T *ptrdiffptr;
+       SSIZE_T *sizeptr;
+       /* Disabling, as long long is not supported in C90.
+       LLONG *llongptr;
+       */
+       long int *longptr;
+       int *intptr;
+       short int *shortptr;
+       signed char *charptr;
+       size_t len = 0;
+       int overflow = 0;
+       int base = 0;
+       int cflags = 0;
+       int flags = 0;
+       int width = 0;
+       int precision = -1;
+       int state = PRINT_S_DEFAULT;
+       char ch = *format++;
+
+       /*
+        * C99 says: "If `n' is zero, nothing is written, and `s' may be a null
+        * pointer." (7.19.6.5, 2)  We're forgiving and allow a NULL pointer
+        * even if a size larger than zero was specified.  At least NetBSD's
+        * snprintf(3) does the same, as well as other versions of this file.
+        * (Though some of these versions will write to a non-NULL buffer even
+        * if a size of zero was specified, which violates the standard.)
+        */
+       if (str == NULL && size != 0)
+               size = 0;
+
+       while (ch != '\0')
+               switch (state) {
+               case PRINT_S_DEFAULT:
+                       if (ch == '%')
+                               state = PRINT_S_FLAGS;
+                       else
+                               OUTCHAR(str, len, size, ch);
+                       ch = *format++;
+                       break;
+               case PRINT_S_FLAGS:
+                       switch (ch) {
+                       case '-':
+                               flags |= PRINT_F_MINUS;
+                               ch = *format++;
+                               break;
+                       case '+':
+                               flags |= PRINT_F_PLUS;
+                               ch = *format++;
+                               break;
+                       case ' ':
+                               flags |= PRINT_F_SPACE;
+                               ch = *format++;
+                               break;
+                       case '#':
+                               flags |= PRINT_F_NUM;
+                               ch = *format++;
+                               break;
+                       case '0':
+                               flags |= PRINT_F_ZERO;
+                               ch = *format++;
+                               break;
+                       case '\'':      /* SUSv2 flag (not in C99). */
+                               flags |= PRINT_F_QUOTE;
+                               ch = *format++;
+                               break;
+                       default:
+                               state = PRINT_S_WIDTH;
+                               break;
+                       }
+                       break;
+               case PRINT_S_WIDTH:
+                       if (ISDIGIT(ch)) {
+                               ch = CHARTOINT(ch);
+                               if (width > (INT_MAX - ch) / 10) {
+                                       overflow = 1;
+                                       goto out;
+                               }
+                               width = 10 * width + ch;
+                               ch = *format++;
+                       } else if (ch == '*') {
+                               /*
+                                * C99 says: "A negative field width argument is
+                                * taken as a `-' flag followed by a positive
+                                * field width." (7.19.6.1, 5)
+                                */
+                               if ((width = va_arg(args, int)) < 0) {
+                                       flags |= PRINT_F_MINUS;
+                                       width = -width;
+                               }
+                               ch = *format++;
+                               state = PRINT_S_DOT;
+                       } else
+                               state = PRINT_S_DOT;
+                       break;
+               case PRINT_S_DOT:
+                       if (ch == '.') {
+                               state = PRINT_S_PRECISION;
+                               ch = *format++;
+                       } else
+                               state = PRINT_S_MOD;
+                       break;
+               case PRINT_S_PRECISION:
+                       if (precision == -1)
+                               precision = 0;
+                       if (ISDIGIT(ch)) {
+                               ch = CHARTOINT(ch);
+                               if (precision > (INT_MAX - ch) / 10) {
+                                       overflow = 1;
+                                       goto out;
+                               }
+                               precision = 10 * precision + ch;
+                               ch = *format++;
+                       } else if (ch == '*') {
+                               /*
+                                * C99 says: "A negative precision argument is
+                                * taken as if the precision were omitted."
+                                * (7.19.6.1, 5)
+                                */
+                               if ((precision = va_arg(args, int)) < 0)
+                                       precision = -1;
+                               ch = *format++;
+                               state = PRINT_S_MOD;
+                       } else
+                               state = PRINT_S_MOD;
+                       break;
+               case PRINT_S_MOD:
+                       switch (ch) {
+                       case 'h':
+                               ch = *format++;
+                               if (ch == 'h') {        /* It's a char. */
+                                       ch = *format++;
+                                       cflags = PRINT_C_CHAR;
+                               } else
+                                       cflags = PRINT_C_SHORT;
+                               break;
+                       case 'l':
+                               ch = *format++;
+                               /*
+                               if (ch == 'l') }
+                                       ch = *format++;
+                                       cflags = PRINT_C_LLONG;
+                               } else */
+                                       cflags = PRINT_C_LONG;
+                               break;
+                       case 'L':
+                               cflags = PRINT_C_LDOUBLE;
+                               ch = *format++;
+                               break;
+                       case 'j':
+                               cflags = PRINT_C_INTMAX;
+                               ch = *format++;
+                               break;
+                       case 't':
+                               cflags = PRINT_C_PTRDIFF;
+                               ch = *format++;
+                               break;
+                       case 'z':
+                               cflags = PRINT_C_SIZE;
+                               ch = *format++;
+                               break;
+                       default:
+                               /* Lenght modifier is invalid */
+                               break;
+                       }
+                       state = PRINT_S_CONV;
+                       break;
+               case PRINT_S_CONV:
+                       switch (ch) {
+                       case 'd':
+                               /* FALLTHROUGH */
+                       case 'i':
+                               switch (cflags) {
+                               case PRINT_C_CHAR:
+                                       value = (signed char)va_arg(args, int);
+                                       break;
+                               case PRINT_C_SHORT:
+                                       value = (short int)va_arg(args, int);
+                                       break;
+                               case PRINT_C_LONG:
+                                       value = va_arg(args, long int);
+                                       break;
+                               /*
+                               case PRINT_C_LLONG:
+                                       value = va_arg(args, LLONG);
+                                       break;
+                               */
+                               case PRINT_C_SIZE:
+                                       value = va_arg(args, SSIZE_T);
+                                       break;
+                               case PRINT_C_INTMAX:
+                                       value = va_arg(args, INTMAX_T);
+                                       break;
+                               case PRINT_C_PTRDIFF:
+                                       value = va_arg(args, PTRDIFF_T);
+                                       break;
+                               default:
+                                       value = va_arg(args, int);
+                                       break;
+                               }
+                               fmtint(str, &len, size, value, 10, width,
+                                   precision, flags);
+                               break;
+                       case 'X':
+                               flags |= PRINT_F_UP;
+                               /* FALLTHROUGH */
+                       case 'x':
+                               base = 16;
+                               /* FALLTHROUGH */
+                       case 'o':
+                               if (base == 0)
+                                       base = 8;
+                               /* FALLTHROUGH */
+                       case 'u':
+                               if (base == 0)
+                                       base = 10;
+                               flags |= PRINT_F_UNSIGNED;
+                               switch (cflags) {
+                               case PRINT_C_CHAR:
+                                       value = (unsigned char)va_arg(args,
+                                           unsigned int);
+                                       break;
+                               case PRINT_C_SHORT:
+                                       value = (unsigned short int)va_arg(args,
+                                           unsigned int);
+                                       break;
+                               case PRINT_C_LONG:
+                                       value = va_arg(args, unsigned long int);
+                                       break;
+                               /*
+                               case PRINT_C_LLONG:
+                                       value = va_arg(args, ULLONG);
+                                       break;
+                               */
+                               case PRINT_C_SIZE:
+                                       value = va_arg(args, size_t);
+                                       break;
+                               case PRINT_C_INTMAX:
+                                       value = va_arg(args, UINTMAX_T);
+                                       break;
+                               case PRINT_C_PTRDIFF:
+                                       value = va_arg(args, UPTRDIFF_T);
+                                       break;
+                               default:
+                                       value = va_arg(args, unsigned int);
+                                       break;
+                               }
+                               fmtint(str, &len, size, value, base, width,
+                                   precision, flags);
+                               break;
+                       case 'A':
+                               /* Not yet supported, we'll use "%F". */
+                               /* FALLTHROUGH */
+                       case 'F':
+                               flags |= PRINT_F_UP;
+                       case 'a':
+                               /* Not yet supported, we'll use "%f". */
+                               /* FALLTHROUGH */
+                       case 'f':
+                               if (cflags == PRINT_C_LDOUBLE)
+                                       fvalue = va_arg(args, LDOUBLE);
+                               else
+                                       fvalue = va_arg(args, double);
+                               fmtflt(str, &len, size, fvalue, width,
+                                   precision, flags, &overflow);
+                               if (overflow)
+                                       goto out;
+                               break;
+                       case 'E':
+                               flags |= PRINT_F_UP;
+                               /* FALLTHROUGH */
+                       case 'e':
+                               flags |= PRINT_F_TYPE_E;
+                               if (cflags == PRINT_C_LDOUBLE)
+                                       fvalue = va_arg(args, LDOUBLE);
+                               else
+                                       fvalue = va_arg(args, double);
+                               fmtflt(str, &len, size, fvalue, width,
+                                   precision, flags, &overflow);
+                               if (overflow)
+                                       goto out;
+                               break;
+                       case 'G':
+                               flags |= PRINT_F_UP;
+                               /* FALLTHROUGH */
+                       case 'g':
+                               flags |= PRINT_F_TYPE_G;
+                               if (cflags == PRINT_C_LDOUBLE)
+                                       fvalue = va_arg(args, LDOUBLE);
+                               else
+                                       fvalue = va_arg(args, double);
+                               /*
+                                * If the precision is zero, it is treated as
+                                * one (cf. C99: 7.19.6.1, 8).
+                                */
+                               if (precision == 0)
+                                       precision = 1;
+                               fmtflt(str, &len, size, fvalue, width,
+                                   precision, flags, &overflow);
+                               if (overflow)
+                                       goto out;
+                               break;
+                       case 'c':
+                               cvalue = va_arg(args, int);
+                               OUTCHAR(str, len, size, cvalue);
+                               break;
+                       case 's':
+                               strvalue = va_arg(args, char *);
+                               fmtstr(str, &len, size, strvalue, width,
+                                   precision, flags);
+                               break;
+                       case 'p':
+                               /*
+                                * C99 says: "The value of the pointer is
+                                * converted to a sequence of printing
+                                * characters, in an implementation-defined
+                                * manner." (C99: 7.19.6.1, 8)
+                                */
+                               if ((strvalue = (const char *)va_arg(args, void *)) == NULL)
+                                       /*
+                                        * We use the glibc format.  BSD prints
+                                        * "0x0", SysV "0".
+                                        */
+                                       fmtstr(str, &len, size, "(nil)", width,
+                                           -1, flags);
+                               else {
+                                       /*
+                                        * We use the BSD/glibc format.  SysV
+                                        * omits the "0x" prefix (which we emit
+                                        * using the PRINT_F_NUM flag).
+                                        */
+                                       flags |= PRINT_F_NUM;
+                                       flags |= PRINT_F_UNSIGNED;
+                                       fmtint(str, &len, size,
+                                           (UINTPTR_T)strvalue, 16, width,
+                                           precision, flags);
+                               }
+                               break;
+                       case 'n':
+                               switch (cflags) {
+                               case PRINT_C_CHAR:
+                                       charptr = va_arg(args, signed char *);
+                                       *charptr = len;
+                                       break;
+                               case PRINT_C_SHORT:
+                                       shortptr = va_arg(args, short int *);
+                                       *shortptr = len;
+                                       break;
+                               case PRINT_C_LONG:
+                                       longptr = va_arg(args, long int *);
+                                       *longptr = len;
+                                       break;
+                               /*
+                               case PRINT_C_LLONG:
+                                       llongptr = va_arg(args, LLONG *);
+                                       *llongptr = len;
+                                       break;
+                               */
+                               case PRINT_C_SIZE:
+                                       /*
+                                        * C99 says that with the "z" length
+                                        * modifier, "a following `n' conversion
+                                        * specifier applies to a pointer to a
+                                        * signed integer type corresponding to
+                                        * size_t argument." (7.19.6.1, 7)
+                                        */
+                                       sizeptr = va_arg(args, SSIZE_T *);
+                                       *sizeptr = len;
+                                       break;
+                               case PRINT_C_INTMAX:
+                                       intmaxptr = va_arg(args, INTMAX_T *);
+                                       *intmaxptr = len;
+                                       break;
+                               case PRINT_C_PTRDIFF:
+                                       ptrdiffptr = va_arg(args, PTRDIFF_T *);
+                                       *ptrdiffptr = len;
+                                       break;
+                               default:
+                                       intptr = va_arg(args, int *);
+                                       *intptr = len;
+                                       break;
+                               }
+                               break;
+                       case '%':       /* Print a "%" character verbatim. */
+                               OUTCHAR(str, len, size, ch);
+                               break;
+                       default:        /* Skip other characters. */
+                               break;
+                       }
+                       ch = *format++;
+                       state = PRINT_S_DEFAULT;
+                       base = cflags = flags = width = 0;
+                       precision = -1;
+                       break;
+               default:
+                       /* This is an invalid state, should not get here */
+                       break;
+               }
+out:
+       if (len < size)
+               str[len] = '\0';
+       else if (size > 0)
+               str[size - 1] = '\0';
+
+       if (overflow || len >= INT_MAX) {
+               errno = overflow ? EOVERFLOW : ERANGE;
+               return -1;
+       }
+       return (int)len;
+}
+
+static void
+fmtstr(char *str, size_t *len, size_t size, const char *value, int width,
+       int precision, int flags)
+{
+       int padlen, strln;      /* Amount to pad. */
+       int noprecision = (precision == -1);
+
+       if (value == NULL)      /* We're forgiving. */
+               value = "(null)";
+
+       /* If a precision was specified, don't read the string past it. */
+       for (strln = 0; value[strln] != '\0' &&
+           (noprecision || strln < precision); strln++)
+               continue;
+
+       if ((padlen = width - strln) < 0)
+               padlen = 0;
+       if (flags & PRINT_F_MINUS)      /* Left justify. */
+               padlen = -padlen;
+
+       while (padlen > 0) {    /* Leading spaces. */
+               OUTCHAR(str, *len, size, ' ');
+               padlen--;
+       }
+       while (*value != '\0' && (noprecision || precision-- > 0)) {
+               OUTCHAR(str, *len, size, *value);
+               value++;
+       }
+       while (padlen < 0) {    /* Trailing spaces. */
+               OUTCHAR(str, *len, size, ' ');
+               padlen++;
+       }
+}
+
+static void
+fmtint(char *str, size_t *len, size_t size, INTMAX_T value, int base, int width,
+       int precision, int flags)
+{
+       UINTMAX_T uvalue;
+       char iconvert[MAX_CONVERT_LENGTH];
+       char sign = 0;
+       char hexprefix = 0;
+       int spadlen = 0;        /* Amount to space pad. */
+       int zpadlen = 0;        /* Amount to zero pad. */
+       int pos;
+       int separators = (flags & PRINT_F_QUOTE);
+       int noprecision = (precision == -1);
+
+       if (flags & PRINT_F_UNSIGNED)
+               uvalue = value;
+       else {
+               uvalue = (value >= 0) ? value : -value;
+               if (value < 0)
+                       sign = '-';
+               else if (flags & PRINT_F_PLUS)  /* Do a sign. */
+                       sign = '+';
+               else if (flags & PRINT_F_SPACE)
+                       sign = ' ';
+       }
+
+       pos = convert(uvalue, iconvert, sizeof(iconvert), base,
+           flags & PRINT_F_UP);
+
+       if (flags & PRINT_F_NUM && uvalue != 0) {
+               /*
+                * C99 says: "The result is converted to an `alternative form'.
+                * For `o' conversion, it increases the precision, if and only
+                * if necessary, to force the first digit of the result to be a
+                * zero (if the value and precision are both 0, a single 0 is
+                * printed).  For `x' (or `X') conversion, a nonzero result has
+                * `0x' (or `0X') prefixed to it." (7.19.6.1, 6)
+                */
+               switch (base) {
+               case 8:
+                       if (precision <= pos)
+                               precision = pos + 1;
+                       break;
+               case 16:
+                       hexprefix = (flags & PRINT_F_UP) ? 'X' : 'x';
+                       break;
+               default:
+                       /* Invalid base */
+                       break;
+               }
+       }
+
+       if (separators) /* Get the number of group separators we'll print. */
+               separators = getnumsep(pos);
+
+       zpadlen = precision - pos - separators;
+       spadlen = width                         /* Minimum field width. */
+           - separators                        /* Number of separators. */
+           - MAX(precision, pos)               /* Number of integer digits. */
+           - ((sign != 0) ? 1 : 0)             /* Will we print a sign? */
+           - ((hexprefix != 0) ? 2 : 0);       /* Will we print a prefix? */
+
+       if (zpadlen < 0)
+               zpadlen = 0;
+       if (spadlen < 0)
+               spadlen = 0;
+
+       /*
+        * C99 says: "If the `0' and `-' flags both appear, the `0' flag is
+        * ignored.  For `d', `i', `o', `u', `x', and `X' conversions, if a
+        * precision is specified, the `0' flag is ignored." (7.19.6.1, 6)
+        */
+       if (flags & PRINT_F_MINUS)      /* Left justify. */
+               spadlen = -spadlen;
+       else if (flags & PRINT_F_ZERO && noprecision) {
+               zpadlen += spadlen;
+               spadlen = 0;
+       }
+       while (spadlen > 0) {   /* Leading spaces. */
+               OUTCHAR(str, *len, size, ' ');
+               spadlen--;
+       }
+       if (sign != 0)  /* Sign. */
+               OUTCHAR(str, *len, size, sign);
+       if (hexprefix != 0) {   /* A "0x" or "0X" prefix. */
+               OUTCHAR(str, *len, size, '0');
+               OUTCHAR(str, *len, size, hexprefix);
+       }
+       while (zpadlen > 0) {   /* Leading zeros. */
+               OUTCHAR(str, *len, size, '0');
+               zpadlen--;
+       }
+       while (pos > 0) {       /* The actual digits. */
+               pos--;
+               OUTCHAR(str, *len, size, iconvert[pos]);
+               if (separators > 0 && pos > 0 && pos % 3 == 0)
+                       printsep(str, len, size);
+       }
+       while (spadlen < 0) {   /* Trailing spaces. */
+               OUTCHAR(str, *len, size, ' ');
+               spadlen++;
+       }
+}
+
+static void
+fmtflt(char *str, size_t *len, size_t size, LDOUBLE fvalue, int width,
+       int precision, int flags, int *overflow)
+{
+       LDOUBLE ufvalue;
+       UINTMAX_T intpart;
+       UINTMAX_T fracpart;
+       UINTMAX_T mask;
+       const char *infnan = NULL;
+       char iconvert[MAX_CONVERT_LENGTH];
+       char fconvert[MAX_CONVERT_LENGTH];
+       char econvert[4];       /* "e-12" (without nul-termination). */
+       char esign = 0;
+       char sign = 0;
+       int leadfraczeros = 0;
+       int exponent = 0;
+       int emitpoint = 0;
+       int omitzeros = 0;
+       int omitcount = 0;
+       int padlen = 0;
+       int epos = 0;
+       int fpos = 0;
+       int ipos = 0;
+       int separators = (flags & PRINT_F_QUOTE);
+       int estyle = (flags & PRINT_F_TYPE_E);
+#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT
+       struct lconv *lc = localeconv();
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */
+
+       /*
+        * AIX' man page says the default is 0, but C99 and at least Solaris'
+        * and NetBSD's man pages say the default is 6, and sprintf(3) on AIX
+        * defaults to 6.
+        */
+       if (precision == -1)
+               precision = 6;
+
+       if (fvalue < 0.0)
+               sign = '-';
+       else if (flags & PRINT_F_PLUS)  /* Do a sign. */
+               sign = '+';
+       else if (flags & PRINT_F_SPACE)
+               sign = ' ';
+
+       if (ISNAN(fvalue))
+               infnan = (flags & PRINT_F_UP) ? "NAN" : "nan";
+       else if (ISINF(fvalue))
+               infnan = (flags & PRINT_F_UP) ? "INF" : "inf";
+
+       if (infnan != NULL) {
+               if (sign != 0)
+                       iconvert[ipos++] = sign;
+               while (*infnan != '\0')
+                       iconvert[ipos++] = *infnan++;
+               fmtstr(str, len, size, iconvert, width, ipos, flags);
+               return;
+       }
+
+       /* "%e" (or "%E") or "%g" (or "%G") conversion. */
+       if (flags & PRINT_F_TYPE_E || flags & PRINT_F_TYPE_G) {
+               if (flags & PRINT_F_TYPE_G) {
+                       /*
+                        * For "%g" (and "%G") conversions, the precision
+                        * specifies the number of significant digits, which
+                        * includes the digits in the integer part.  The
+                        * conversion will or will not be using "e-style" (like
+                        * "%e" or "%E" conversions) depending on the precision
+                        * and on the exponent.  However, the exponent can be
+                        * affected by rounding the converted value, so we'll
+                        * leave this decision for later.  Until then, we'll
+                        * assume that we're going to do an "e-style" conversion
+                        * (in order to get the exponent calculated).  For
+                        * "e-style", the precision must be decremented by one.
+                        */
+                       precision--;
+                       /*
+                        * For "%g" (and "%G") conversions, trailing zeros are
+                        * removed from the fractional portion of the result
+                        * unless the "#" flag was specified.
+                        */
+                       if (!(flags & PRINT_F_NUM))
+                               omitzeros = 1;
+               }
+               exponent = getexponent(fvalue);
+               estyle = 1;
+       }
+
+again:
+       /*
+        * Sorry, we only support 9, 19, or 38 digits (that is, the number of
+        * digits of the 32-bit, the 64-bit, or the 128-bit UINTMAX_MAX value
+        * minus one) past the decimal point due to our conversion method.
+        */
+       switch (sizeof(UINTMAX_T)) {
+       case 16:
+               if (precision > 38)
+                       precision = 38;
+               break;
+       case 8:
+               if (precision > 19)
+                       precision = 19;
+               break;
+       default:
+               if (precision > 9)
+                       precision = 9;
+               break;
+       }
+
+       ufvalue = (fvalue >= 0.0) ? fvalue : -fvalue;
+       if (estyle)     /* We want exactly one integer digit. */
+               ufvalue /= mypow10(exponent);
+
+       if ((intpart = cast(ufvalue)) == UINTMAX_MAX) {
+               *overflow = 1;
+               return;
+       }
+
+       /*
+        * Factor of ten with the number of digits needed for the fractional
+        * part.  For example, if the precision is 3, the mask will be 1000.
+        */
+       mask = mypow10(precision);
+       /*
+        * We "cheat" by converting the fractional part to integer by
+        * multiplying by a factor of ten.
+        */
+       if ((fracpart = myround(mask * (ufvalue - intpart))) >= mask) {
+               /*
+                * For example, ufvalue = 2.99962, intpart = 2, and mask = 1000
+                * (because precision = 3).  Now, myround(1000 * 0.99962) will
+                * return 1000.  So, the integer part must be incremented by one
+                * and the fractional part must be set to zero.
+                */
+               intpart++;
+               fracpart = 0;
+               if (estyle && intpart == 10) {
+                       /*
+                        * The value was rounded up to ten, but we only want one
+                        * integer digit if using "e-style".  So, the integer
+                        * part must be set to one and the exponent must be
+                        * incremented by one.
+                        */
+                       intpart = 1;
+                       exponent++;
+               }
+       }
+
+       /*
+        * Now that we know the real exponent, we can check whether or not to
+        * use "e-style" for "%g" (and "%G") conversions.  If we don't need
+        * "e-style", the precision must be adjusted and the integer and
+        * fractional parts must be recalculated from the original value.
+        *
+        * C99 says: "Let P equal the precision if nonzero, 6 if the precision
+        * is omitted, or 1 if the precision is zero.  Then, if a conversion
+        * with style `E' would have an exponent of X:
+        *
+        * - if P > X >= -4, the conversion is with style `f' (or `F') and
+        *   precision P - (X + 1).
+        *
+        * - otherwise, the conversion is with style `e' (or `E') and precision
+        *   P - 1." (7.19.6.1, 8)
+        *
+        * Note that we had decremented the precision by one.
+        */
+       if (flags & PRINT_F_TYPE_G && estyle &&
+           precision + 1 > exponent && exponent >= -4) {
+               precision -= exponent;
+               estyle = 0;
+               goto again;
+       }
+
+       if (estyle) {
+               if (exponent < 0) {
+                       exponent = -exponent;
+                       esign = '-';
+               } else
+                       esign = '+';
+
+               /*
+                * Convert the exponent.  The sizeof(econvert) is 4.  So, the
+                * econvert buffer can hold e.g. "e+99" and "e-99".  We don't
+                * support an exponent which contains more than two digits.
+                * Therefore, the following stores are safe.
+                */
+               epos = convert(exponent, econvert, 2, 10, 0);
+               /*
+                * C99 says: "The exponent always contains at least two digits,
+                * and only as many more digits as necessary to represent the
+                * exponent." (7.19.6.1, 8)
+                */
+               if (epos == 1)
+                       econvert[epos++] = '0';
+               econvert[epos++] = esign;
+               econvert[epos++] = (flags & PRINT_F_UP) ? 'E' : 'e';
+       }
+
+       /* Convert the integer part and the fractional part. */
+       ipos = convert(intpart, iconvert, sizeof(iconvert), 10, 0);
+       if (fracpart != 0)      /* convert() would return 1 if fracpart == 0. */
+               fpos = convert(fracpart, fconvert, sizeof(fconvert), 10, 0);
+
+       leadfraczeros = precision - fpos;
+
+       if (omitzeros) {
+               if (fpos > 0)   /* Omit trailing fractional part zeros. */
+                       while (omitcount < fpos && fconvert[omitcount] == '0')
+                               omitcount++;
+               else {  /* The fractional part is zero, omit it completely. */
+                       omitcount = precision;
+                       leadfraczeros = 0;
+               }
+               precision -= omitcount;
+       }
+
+       /*
+        * Print a decimal point if either the fractional part is non-zero
+        * and/or the "#" flag was specified.
+        */
+       if (precision > 0 || flags & PRINT_F_NUM)
+               emitpoint = 1;
+       if (separators) /* Get the number of group separators we'll print. */
+               separators = getnumsep(ipos);
+
+       padlen = width                  /* Minimum field width. */
+           - ipos                      /* Number of integer digits. */
+           - epos                      /* Number of exponent characters. */
+           - precision                 /* Number of fractional digits. */
+           - separators                /* Number of group separators. */
+           - (emitpoint ? 1 : 0)       /* Will we print a decimal point? */
+           - ((sign != 0) ? 1 : 0);    /* Will we print a sign character? */
+
+       if (padlen < 0)
+               padlen = 0;
+
+       /*
+        * C99 says: "If the `0' and `-' flags both appear, the `0' flag is
+        * ignored." (7.19.6.1, 6)
+        */
+       if (flags & PRINT_F_MINUS)      /* Left justifty. */
+               padlen = -padlen;
+       else if (flags & PRINT_F_ZERO && padlen > 0) {
+               if (sign != 0) {        /* Sign. */
+                       OUTCHAR(str, *len, size, sign);
+                       sign = 0;
+               }
+               while (padlen > 0) {    /* Leading zeros. */
+                       OUTCHAR(str, *len, size, '0');
+                       padlen--;
+               }
+       }
+       while (padlen > 0) {    /* Leading spaces. */
+               OUTCHAR(str, *len, size, ' ');
+               padlen--;
+       }
+       if (sign != 0)  /* Sign. */
+               OUTCHAR(str, *len, size, sign);
+       while (ipos > 0) {      /* Integer part. */
+               ipos--;
+               OUTCHAR(str, *len, size, iconvert[ipos]);
+               if (separators > 0 && ipos > 0 && ipos % 3 == 0)
+                       printsep(str, len, size);
+       }
+       if (emitpoint) {        /* Decimal point. */
+#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT
+               if (lc->decimal_point != NULL && *lc->decimal_point != '\0')
+                       OUTCHAR(str, *len, size, *lc->decimal_point);
+               else    /* We'll always print some decimal point character. */
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */
+                       OUTCHAR(str, *len, size, '.');
+       }
+       while (leadfraczeros > 0) {     /* Leading fractional part zeros. */
+               OUTCHAR(str, *len, size, '0');
+               leadfraczeros--;
+       }
+       while (fpos > omitcount) {      /* The remaining fractional part. */
+               fpos--;
+               OUTCHAR(str, *len, size, fconvert[fpos]);
+       }
+       while (epos > 0) {      /* Exponent. */
+               epos--;
+               OUTCHAR(str, *len, size, econvert[epos]);
+       }
+       while (padlen < 0) {    /* Trailing spaces. */
+               OUTCHAR(str, *len, size, ' ');
+               padlen++;
+       }
+}
+
+static void
+printsep(char *str, size_t *len, size_t size)
+{
+#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP
+       struct lconv *lc = localeconv();
+       int i;
+
+       if (lc->thousands_sep != NULL)
+               for (i = 0; lc->thousands_sep[i] != '\0'; i++)
+                       OUTCHAR(str, *len, size, lc->thousands_sep[i]);
+       else
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */
+               OUTCHAR(str, *len, size, ',');
+}
+
+static int
+getnumsep(int digits)
+{
+       int separators = (digits - ((digits % 3 == 0) ? 1 : 0)) / 3;
+#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP
+       int strln;
+       struct lconv *lc = localeconv();
+
+       /* We support an arbitrary separator length (including zero). */
+       if (lc->thousands_sep != NULL) {
+               for (strln = 0; lc->thousands_sep[strln] != '\0'; strln++)
+                       continue;
+               separators *= strln;
+       }
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */
+       return separators;
+}
+
+static int
+getexponent(LDOUBLE value)
+{
+       LDOUBLE tmp = (value >= 0.0) ? value : -value;
+       int exponent = 0;
+
+       /*
+        * We check for 99 > exponent > -99 in order to work around possible
+        * endless loops which could happen (at least) in the second loop (at
+        * least) if we're called with an infinite value.  However, we checked
+        * for infinity before calling this function using our ISINF() macro, so
+        * this might be somewhat paranoid.
+        */
+       while (tmp < 1.0 && tmp > 0.0 && --exponent > -99)
+               tmp *= 10;
+       while (tmp >= 10.0 && ++exponent < 99)
+               tmp /= 10;
+
+       return exponent;
+}
+
+static int
+convert(UINTMAX_T value, char *buf, size_t size, int base, int caps)
+{
+       const char *digits = caps ? "0123456789ABCDEF" : "0123456789abcdef";
+       size_t pos = 0;
+
+       /* We return an unterminated buffer with the digits in reverse order. */
+       do {
+               buf[pos++] = digits[value % base];
+               value /= base;
+       } while (value != 0 && pos < size);
+
+       return (int)pos;
+}
+
+static UINTMAX_T
+cast(LDOUBLE value)
+{
+       UINTMAX_T result;
+
+       /*
+        * We check for ">=" and not for ">" because if UINTMAX_MAX cannot be
+        * represented exactly as an LDOUBLE value (but is less than LDBL_MAX),
+        * it may be increased to the nearest higher representable value for the
+        * comparison (cf. C99: 6.3.1.4, 2).  It might then equal the LDOUBLE
+        * value although converting the latter to UINTMAX_T would overflow.
+        */
+       if (value >= UINTMAX_MAX)
+               return UINTMAX_MAX;
+
+       result = value;
+       /*
+        * At least on NetBSD/sparc64 3.0.2 and 4.99.30, casting long double to
+        * an integer type converts e.g. 1.9 to 2 instead of 1 (which violates
+        * the standard).  Sigh.
+        */
+       return (result <= value) ? result : result - 1;
+}
+
+static UINTMAX_T
+myround(LDOUBLE value)
+{
+       UINTMAX_T intpart = cast(value);
+
+       return ((value -= intpart) < 0.5) ? intpart : intpart + 1;
+}
+
+static LDOUBLE
+mypow10(int exponent)
+{
+       LDOUBLE result = 1;
+
+       while (exponent > 0) {
+               result *= 10;
+               exponent--;
+       }
+       while (exponent < 0) {
+               result /= 10;
+               exponent++;
+       }
+       return result;
+}
+#endif /* !HAVE_VSNPRINTF */
+
+#if !HAVE_SNPRINTF
+#if HAVE_STDARG_H
+int
+rpl_snprintf(char *str, size_t size, const char *format, ...)
+#else
+int
+rpl_snprintf(va_alist) va_dcl
+#endif /* HAVE_STDARG_H */
+{
+#if !HAVE_STDARG_H
+       char *str;
+       size_t size;
+       char *format;
+#endif /* HAVE_STDARG_H */
+       va_list ap;
+       int len;
+
+       VA_START(ap, format);
+       VA_SHIFT(ap, str, char *);
+       VA_SHIFT(ap, size, size_t);
+       VA_SHIFT(ap, format, const char *);
+       len = vsnprintf(str, size, format, ap);
+       va_end(ap);
+       return len;
+}
+#endif /* !HAVE_SNPRINTF */
+
+#else  /* Dummy declaration to avoid empty translation unit warnings. */
+int main(void);
+#endif /* !HAVE_SNPRINTF || !HAVE_VSNPRINTF*/
+
+#if TEST_SNPRINTF
+int
+main(void)
+{
+       const char *float_fmt[] = {
+               /* "%E" and "%e" formats. */
+#if HAVE_LONG_LONG_INT && !OS_BSD && !OS_IRIX
+               "%.16e",
+               "%22.16e",
+               "%022.16e",
+               "%-22.16e",
+               "%#+'022.16e",
+#endif /* HAVE_LONG_LONG_INT && !OS_BSD && !OS_IRIX */
+               "foo|%#+0123.9E|bar",
+               "%-123.9e",
+               "%123.9e",
+               "%+23.9e",
+               "%+05.8e",
+               "%-05.8e",
+               "%05.8e",
+               "%+5.8e",
+               "%-5.8e",
+               "% 5.8e",
+               "%5.8e",
+               "%+4.9e",
+#if !OS_LINUX  /* glibc sometimes gets these wrong. */
+               "%+#010.0e",
+               "%#10.1e",
+               "%10.5e",
+               "% 10.5e",
+               "%5.0e",
+               "%5.e",
+               "%#5.0e",
+               "%#5.e",
+               "%3.2e",
+               "%3.1e",
+               "%-1.5e",
+               "%1.5e",
+               "%01.3e",
+               "%1.e",
+               "%.1e",
+               "%#.0e",
+               "%+.0e",
+               "% .0e",
+               "%.0e",
+               "%#.e",
+               "%+.e",
+               "% .e",
+               "%.e",
+               "%4e",
+               "%e",
+               "%E",
+#endif /* !OS_LINUX */
+               /* "%F" and "%f" formats. */
+#if !OS_BSD && !OS_IRIX
+               "% '022f",
+               "%+'022f",
+               "%-'22f",
+               "%'22f",
+#if HAVE_LONG_LONG_INT
+               "%.16f",
+               "%22.16f",
+               "%022.16f",
+               "%-22.16f",
+               "%#+'022.16f",
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !OS_BSD && !OS_IRIX */
+               "foo|%#+0123.9F|bar",
+               "%-123.9f",
+               "%123.9f",
+               "%+23.9f",
+               "%+#010.0f",
+               "%#10.1f",
+               "%10.5f",
+               "% 10.5f",
+               "%+05.8f",
+               "%-05.8f",
+               "%05.8f",
+               "%+5.8f",
+               "%-5.8f",
+               "% 5.8f",
+               "%5.8f",
+               "%5.0f",
+               "%5.f",
+               "%#5.0f",
+               "%#5.f",
+               "%+4.9f",
+               "%3.2f",
+               "%3.1f",
+               "%-1.5f",
+               "%1.5f",
+               "%01.3f",
+               "%1.f",
+               "%.1f",
+               "%#.0f",
+               "%+.0f",
+               "% .0f",
+               "%.0f",
+               "%#.f",
+               "%+.f",
+               "% .f",
+               "%.f",
+               "%4f",
+               "%f",
+               "%F",
+               /* "%G" and "%g" formats. */
+#if !OS_BSD && !OS_IRIX && !OS_LINUX
+               "% '022g",
+               "%+'022g",
+               "%-'22g",
+               "%'22g",
+#if HAVE_LONG_LONG_INT
+               "%.16g",
+               "%22.16g",
+               "%022.16g",
+               "%-22.16g",
+               "%#+'022.16g",
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !OS_BSD && !OS_IRIX && !OS_LINUX */
+               "foo|%#+0123.9G|bar",
+               "%-123.9g",
+               "%123.9g",
+               "%+23.9g",
+               "%+05.8g",
+               "%-05.8g",
+               "%05.8g",
+               "%+5.8g",
+               "%-5.8g",
+               "% 5.8g",
+               "%5.8g",
+               "%+4.9g",
+#if !OS_LINUX  /* glibc sometimes gets these wrong. */
+               "%+#010.0g",
+               "%#10.1g",
+               "%10.5g",
+               "% 10.5g",
+               "%5.0g",
+               "%5.g",
+               "%#5.0g",
+               "%#5.g",
+               "%3.2g",
+               "%3.1g",
+               "%-1.5g",
+               "%1.5g",
+               "%01.3g",
+               "%1.g",
+               "%.1g",
+               "%#.0g",
+               "%+.0g",
+               "% .0g",
+               "%.0g",
+               "%#.g",
+               "%+.g",
+               "% .g",
+               "%.g",
+               "%4g",
+               "%g",
+               "%G",
+#endif /* !OS_LINUX */
+               NULL
+       };
+       double float_val[] = {
+               -4.136,
+               -134.52,
+               -5.04030201,
+               -3410.01234,
+               -999999.999999,
+               -913450.29876,
+               -913450.2,
+               -91345.2,
+               -9134.2,
+               -913.2,
+               -91.2,
+               -9.2,
+               -9.9,
+               4.136,
+               134.52,
+               5.04030201,
+               3410.01234,
+               999999.999999,
+               913450.29876,
+               913450.2,
+               91345.2,
+               9134.2,
+               913.2,
+               91.2,
+               9.2,
+               9.9,
+               9.96,
+               9.996,
+               9.9996,
+               9.99996,
+               9.999996,
+               9.9999996,
+               9.99999996,
+               0.99999996,
+               0.99999999,
+               0.09999999,
+               0.00999999,
+               0.00099999,
+               0.00009999,
+               0.00000999,
+               0.00000099,
+               0.00000009,
+               0.00000001,
+               0.0000001,
+               0.000001,
+               0.00001,
+               0.0001,
+               0.001,
+               0.01,
+               0.1,
+               1.0,
+               1.5,
+               -1.5,
+               -1.0,
+               -0.1,
+#if !OS_BSD    /* BSD sometimes gets these wrong. */
+#ifdef INFINITY
+               INFINITY,
+               -INFINITY,
+#endif /* defined(INFINITY) */
+#ifdef NAN
+               NAN,
+#endif /* defined(NAN) */
+#endif /* !OS_BSD */
+               0
+       };
+       const char *long_fmt[] = {
+               "foo|%0123ld|bar",
+#if !OS_IRIX
+               "% '0123ld",
+               "%+'0123ld",
+               "%-'123ld",
+               "%'123ld",
+#endif /* !OS_IRiX */
+               "%123.9ld",
+               "% 123.9ld",
+               "%+123.9ld",
+               "%-123.9ld",
+               "%0123ld",
+               "% 0123ld",
+               "%+0123ld",
+               "%-0123ld",
+               "%10.5ld",
+               "% 10.5ld",
+               "%+10.5ld",
+               "%-10.5ld",
+               "%010ld",
+               "% 010ld",
+               "%+010ld",
+               "%-010ld",
+               "%4.2ld",
+               "% 4.2ld",
+               "%+4.2ld",
+               "%-4.2ld",
+               "%04ld",
+               "% 04ld",
+               "%+04ld",
+               "%-04ld",
+               "%5.5ld",
+               "%+22.33ld",
+               "%01.3ld",
+               "%1.5ld",
+               "%-1.5ld",
+               "%44ld",
+               "%4ld",
+               "%4.0ld",
+               "%4.ld",
+               "%.44ld",
+               "%.4ld",
+               "%.0ld",
+               "%.ld",
+               "%ld",
+               NULL
+       };
+       long int long_val[] = {
+#ifdef LONG_MAX
+               LONG_MAX,
+#endif /* LONG_MAX */
+#ifdef LONG_MIN
+               LONG_MIN,
+#endif /* LONG_MIN */
+               -91340,
+               91340,
+               341,
+               134,
+               0203,
+               -1,
+               1,
+               0
+       };
+       const char *ulong_fmt[] = {
+               /* "%u" formats. */
+               "foo|%0123lu|bar",
+#if !OS_IRIX
+               "% '0123lu",
+               "%+'0123lu",
+               "%-'123lu",
+               "%'123lu",
+#endif /* !OS_IRiX */
+               "%123.9lu",
+               "% 123.9lu",
+               "%+123.9lu",
+               "%-123.9lu",
+               "%0123lu",
+               "% 0123lu",
+               "%+0123lu",
+               "%-0123lu",
+               "%5.5lu",
+               "%+22.33lu",
+               "%01.3lu",
+               "%1.5lu",
+               "%-1.5lu",
+               "%44lu",
+               "%lu",
+               /* "%o" formats. */
+               "foo|%#0123lo|bar",
+               "%#123.9lo",
+               "%# 123.9lo",
+               "%#+123.9lo",
+               "%#-123.9lo",
+               "%#0123lo",
+               "%# 0123lo",
+               "%#+0123lo",
+               "%#-0123lo",
+               "%#5.5lo",
+               "%#+22.33lo",
+               "%#01.3lo",
+               "%#1.5lo",
+               "%#-1.5lo",
+               "%#44lo",
+               "%#lo",
+               "%123.9lo",
+               "% 123.9lo",
+               "%+123.9lo",
+               "%-123.9lo",
+               "%0123lo",
+               "% 0123lo",
+               "%+0123lo",
+               "%-0123lo",
+               "%5.5lo",
+               "%+22.33lo",
+               "%01.3lo",
+               "%1.5lo",
+               "%-1.5lo",
+               "%44lo",
+               "%lo",
+               /* "%X" and "%x" formats. */
+               "foo|%#0123lX|bar",
+               "%#123.9lx",
+               "%# 123.9lx",
+               "%#+123.9lx",
+               "%#-123.9lx",
+               "%#0123lx",
+               "%# 0123lx",
+               "%#+0123lx",
+               "%#-0123lx",
+               "%#5.5lx",
+               "%#+22.33lx",
+               "%#01.3lx",
+               "%#1.5lx",
+               "%#-1.5lx",
+               "%#44lx",
+               "%#lx",
+               "%#lX",
+               "%123.9lx",
+               "% 123.9lx",
+               "%+123.9lx",
+               "%-123.9lx",
+               "%0123lx",
+               "% 0123lx",
+               "%+0123lx",
+               "%-0123lx",
+               "%5.5lx",
+               "%+22.33lx",
+               "%01.3lx",
+               "%1.5lx",
+               "%-1.5lx",
+               "%44lx",
+               "%lx",
+               "%lX",
+               NULL
+       };
+       unsigned long int ulong_val[] = {
+#ifdef ULONG_MAX
+               ULONG_MAX,
+#endif /* ULONG_MAX */
+               91340,
+               341,
+               134,
+               0203,
+               1,
+               0
+       };
+       const char *llong_fmt[] = {
+               "foo|%0123lld|bar",
+               "%123.9lld",
+               "% 123.9lld",
+               "%+123.9lld",
+               "%-123.9lld",
+               "%0123lld",
+               "% 0123lld",
+               "%+0123lld",
+               "%-0123lld",
+               "%5.5lld",
+               "%+22.33lld",
+               "%01.3lld",
+               "%1.5lld",
+               "%-1.5lld",
+               "%44lld",
+               "%lld",
+               NULL
+       };
+       LLONG llong_val[] = {
+#ifdef LLONG_MAX
+               LLONG_MAX,
+#endif /* LLONG_MAX */
+#ifdef LLONG_MIN
+               LLONG_MIN,
+#endif /* LLONG_MIN */
+               -91340,
+               91340,
+               341,
+               134,
+               0203,
+               -1,
+               1,
+               0
+       };
+       const char *string_fmt[] = {
+               "foo|%10.10s|bar",
+               "%-10.10s",
+               "%10.10s",
+               "%10.5s",
+               "%5.10s",
+               "%10.1s",
+               "%1.10s",
+               "%10.0s",
+               "%0.10s",
+               "%-42.5s",
+               "%2.s",
+               "%.10s",
+               "%.1s",
+               "%.0s",
+               "%.s",
+               "%4s",
+               "%s",
+               NULL
+       };
+       const char *string_val[] = {
+               "Hello",
+               "Hello, world!",
+               "Sound check: One, two, three.",
+               "This string is a little longer than the other strings.",
+               "1",
+               "",
+               NULL
+       };
+#if !OS_SYSV   /* SysV uses a different format than we do. */
+       const char *pointer_fmt[] = {
+               "foo|%p|bar",
+               "%42p",
+               "%p",
+               NULL
+       };
+       const char *pointer_val[] = {
+               *pointer_fmt,
+               *string_fmt,
+               *string_val,
+               NULL
+       };
+#endif /* !OS_SYSV */
+       char buf1[1024], buf2[1024];
+       double value, digits = 9.123456789012345678901234567890123456789;
+       int i, j, r1, r2, failed = 0, num = 0;
+
+/*
+ * Use -DTEST_NILS in order to also test the conversion of nil values.  Might
+ * segfault on systems which don't support converting a NULL pointer with "%s"
+ * and lets some test cases fail against BSD and glibc due to bugs in their
+ * implementations.
+ */
+#ifndef TEST_NILS
+#define TEST_NILS 0
+#elif TEST_NILS
+#undef TEST_NILS
+#define TEST_NILS 1
+#endif /* !defined(TEST_NILS) */
+#ifdef TEST
+#undef TEST
+#endif /* defined(TEST) */
+#define TEST(fmt, val)                                                         \
+do {                                                                           \
+       for (i = 0; fmt[i] != NULL; i++)                                       \
+               for (j = 0; j == 0 || val[j - TEST_NILS] != 0; j++) {          \
+                       r1 = sprintf(buf1, fmt[i], val[j]);                    \
+                       r2 = snprintf(buf2, sizeof(buf2), fmt[i], val[j]);     \
+                       if (strcmp(buf1, buf2) != 0 || r1 != r2) {             \
+                               (void)printf("Results don't match, "           \
+                                   "format string: %s\n"                      \
+                                   "\t sprintf(3): [%s] (%d)\n"               \
+                                   "\tsnprintf(3): [%s] (%d)\n",              \
+                                   fmt[i], buf1, r1, buf2, r2);               \
+                               failed++;                                      \
+                       }                                                      \
+                       num++;                                                 \
+               }                                                              \
+} while (/* CONSTCOND */ 0)
+
+#if HAVE_LOCALE_H
+       (void)setlocale(LC_ALL, "");
+#endif /* HAVE_LOCALE_H */
+
+       (void)puts("Testing our snprintf(3) against your system's sprintf(3).");
+       TEST(float_fmt, float_val);
+       TEST(long_fmt, long_val);
+       TEST(ulong_fmt, ulong_val);
+       TEST(llong_fmt, llong_val);
+       TEST(string_fmt, string_val);
+#if !OS_SYSV   /* SysV uses a different format than we do. */
+       TEST(pointer_fmt, pointer_val);
+#endif /* !OS_SYSV */
+       (void)printf("Result: %d out of %d tests failed.\n", failed, num);
+
+       (void)fputs("Checking how many digits we support: ", stdout);
+       for (i = 0; i < 100; i++) {
+               value = pow(10, i) * digits;
+               (void)sprintf(buf1, "%.1f", value);
+               (void)snprintf(buf2, sizeof(buf2), "%.1f", value);
+               if (strcmp(buf1, buf2) != 0) {
+                       (void)printf("apparently %d.\n", i);
+                       break;
+               }
+       }
+       return (failed == 0) ? 0 : 1;
+}
+#endif /* TEST_SNPRINTF */
+
+/* vim: set joinspaces textwidth=80: */
index 33b9ae7..d26a99f 100644 (file)
@@ -1,8 +1,27 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "libcompat.h"
 
-char *
-strdup (const char *str CK_ATTRIBUTE_UNUSED)
+char *strdup(const char *str CK_ATTRIBUTE_UNUSED)
 {
-  assert (0);
-  return NULL;
+    assert(0);
+    return NULL;
 }
index 62dd140..012e64d 100644 (file)
@@ -1,9 +1,29 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "libcompat.h"
 
-const char *
-strsignal (int sig)
+char *strsignal(int sig)
 {
-  static char signame[40];
-  sprintf(signame, "SIG #%d", sig);
-  return signame;
+    static char signame[40];
+
+    sprintf(signame, "SIG #%d", sig);
+    return signame;
 }
diff --git a/lib/timer_create.c b/lib/timer_create.c
new file mode 100644 (file)
index 0000000..7058961
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+
+int timer_create(clockid_t clockid CK_ATTRIBUTE_UNUSED,
+                 struct sigevent *sevp CK_ATTRIBUTE_UNUSED,
+                 timer_t * timerid CK_ATTRIBUTE_UNUSED)
+{
+    /* 
+     * The create function does nothing. timer_settime will use
+     * alarm to set the timer, and timer_delete will stop the
+     * alarm
+     */
+
+    return 0;
+}
diff --git a/lib/timer_delete.c b/lib/timer_delete.c
new file mode 100644 (file)
index 0000000..f4235d7
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+
+int timer_delete(timer_t timerid CK_ATTRIBUTE_UNUSED)
+{
+#ifdef HAVE_SETITIMER
+    /*
+     * If the system does not have timer_settime() but does have
+     * setitimer() use that instead of alarm().
+     */
+    struct itimerval interval;
+
+    /*
+     * Setting values to '0' results in disabling the running timer.
+     */
+    interval.it_value.tv_sec = 0;
+    interval.it_value.tv_usec = 0;
+    interval.it_interval.tv_sec = 0;
+    interval.it_interval.tv_usec = 0;
+
+    return setitimer(ITIMER_REAL, &interval, NULL);
+#else
+    /*
+     * There is only one timer, that used by alarm.
+     * Setting alarm(0) will not set a new alarm, and
+     * will kill the previous timer.
+     */
+
+    alarm(0);
+
+    return 0;
+#endif
+}
diff --git a/lib/timer_settime.c b/lib/timer_settime.c
new file mode 100644 (file)
index 0000000..e1bab0e
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "libcompat.h"
+
+int timer_settime(timer_t timerid CK_ATTRIBUTE_UNUSED,
+                  int flags CK_ATTRIBUTE_UNUSED,
+                  const struct itimerspec *new_value,
+                  struct itimerspec *old_value CK_ATTRIBUTE_UNUSED)
+{
+#ifdef HAVE_SETITIMER
+    /*
+     * If the system does not have timer_settime() but does have
+     * setitimer() use that instead of alarm().
+     */
+    struct itimerval interval;
+
+    interval.it_value.tv_sec = new_value->it_value.tv_sec;
+    interval.it_value.tv_usec = new_value->it_value.tv_nsec / 1000;
+    interval.it_interval.tv_sec = new_value->it_interval.tv_sec;
+    interval.it_interval.tv_usec = new_value->it_interval.tv_nsec / 1000;
+
+    return setitimer(ITIMER_REAL, &interval, NULL);
+#else
+    int seconds = new_value->it_value.tv_sec;
+
+    /* 
+     * As the alarm() call has only second precision, if the caller
+     * specifies partial seconds, we round up to the nearest second.
+     */
+    if(new_value->it_value.tv_nsec > 0)
+    {
+        seconds += 1;
+    }
+
+    alarm(seconds);
+
+    return 0;
+#endif
+}
diff --git a/lib/unsetenv.c b/lib/unsetenv.c
deleted file mode 100644 (file)
index af068c2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "libcompat.h"
-
-void
-unsetenv (const char *name CK_ATTRIBUTE_UNUSED)
-{
-  assert (0);
-}
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644 (file)
index 0000000..147d758
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,11156 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+##               by inline-source v2014-01-03.01
+
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.6 Debian-2.4.6-0.1"
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test set = \"\${$_G_var+set}\"; then
+          save_$_G_var=\$$_G_var
+          $_G_var=C
+         export $_G_var
+         _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+         _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+       fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp       $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+    test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+    _G_progs_list=$1
+    _G_check_func=$2
+    _G_PATH=${3-"$PATH"}
+
+    _G_path_prog_max=0
+    _G_path_prog_found=false
+    _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+    for _G_dir in $_G_PATH; do
+      IFS=$_G_save_IFS
+      test -z "$_G_dir" && _G_dir=.
+      for _G_prog_name in $_G_progs_list; do
+        for _exeext in '' .EXE; do
+          _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+          func_executable_p "$_G_path_prog" || continue
+          case `"$_G_path_prog" --version 2>&1` in
+            *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+            *)     $_G_check_func $_G_path_prog
+                  func_path_progs_result=$func_check_prog_result
+                  ;;
+          esac
+          $_G_path_prog_found && break 3
+        done
+      done
+    done
+    IFS=$_G_save_IFS
+    test -z "$func_path_progs_result" && {
+      echo "no acceptable sed could be found in \$PATH" >&2
+      exit 1
+    }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+  _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+  for _G_i in 1 2 3 4 5 6 7; do
+    _G_sed_script=$_G_sed_script$nl$_G_sed_script
+  done
+  echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+  _G_sed_script=
+
+  func_check_prog_sed ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo '' >> conftest.nl
+      "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+  rm -f conftest.sed
+  SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+  func_check_prog_grep ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    _G_path_prog_max=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo 'GREP' >> conftest.nl
+      "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+  GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables.  These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same.  If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion.  Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'.  '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+  s/$_G_bs4/&\\
+/g
+  s/^$_G_bs2$_G_dollar/$_G_bs&/
+  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+  s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+#    exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# 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 "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+     progdir=`cd "$progdir" && pwd`
+     progpath=$progdir/$progname
+     ;;
+  *)
+     _G_IFS=$IFS
+     IFS=${PATH_SEPARATOR-:}
+     for progdir in $PATH; do
+       IFS=$_G_IFS
+       test -x "$progdir/$progname" && break
+     done
+     IFS=$_G_IFS
+     test -n "$progdir" || progdir=`pwd`
+     progpath=$progdir/$progname
+     ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available.  Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'.  Set
+# 'warning_func'  to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+    $debug_cmd
+
+    test -t 1 && {
+      # COLORTERM and USE_ANSI_COLORS environment variables take
+      # precedence, because most terminfo databases neglect to describe
+      # whether color sequences are supported.
+      test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+      if test 1 = "$USE_ANSI_COLORS"; then
+        # Standard ANSI escape sequences
+        tc_reset='\e[0m'
+        tc_bold='\e[1m';   tc_standout='\e[7m'
+        tc_red='\e[31m';   tc_green='\e[32m'
+        tc_blue='\e[34m';  tc_cyan='\e[36m'
+      else
+        # Otherwise trust the terminfo database after all.
+        test -n "`tput sgr0 2>/dev/null`" && {
+          tc_reset=`tput sgr0`
+          test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+          tc_standout=$tc_bold
+          test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+          test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+          test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+          test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+          test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+        }
+      fi
+    }
+
+    require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+  # We should try to minimise forks, especially on Windows where they are
+  # unreasonably slow, so skip the feature probes when bash or zsh are
+  # being used:
+  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+    : ${_G_HAVE_ARITH_OP="yes"}
+    : ${_G_HAVE_XSI_OPS="yes"}
+    # The += operator was introduced in bash 3.1
+    case $BASH_VERSION in
+      [12].* | 3.0 | 3.0*) ;;
+      *)
+        : ${_G_HAVE_PLUSEQ_OP="yes"}
+        ;;
+    esac
+  fi
+
+  # _G_HAVE_PLUSEQ_OP
+  # Can be empty, in which case the shell is probed, "yes" if += is
+  # useable or anything else if it does not work.
+  test -z "$_G_HAVE_PLUSEQ_OP" \
+    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+    && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_append ()
+  {
+    $debug_cmd
+
+    eval "$1+=\$2"
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_append ()
+  {
+    $debug_cmd
+
+    eval "$1=\$$1\$2"
+  }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+  eval 'func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1+=\\ \$func_quote_for_eval_result"
+  }'
+else
+  func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1=\$$1\\ \$func_quote_for_eval_result"
+  }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE.  For example:
+#
+#   func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+    $debug_cmd
+
+    eval _G_current_value='`$ECHO $'$1'`'
+    _G_delim=`expr "$2" : '\(.\)'`
+
+    case $_G_delim$_G_current_value$_G_delim in
+      *"$2$_G_delim"*) ;;
+      *) func_append "$@" ;;
+    esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+  test -z "$_G_HAVE_ARITH_OP" \
+    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+    && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+  eval 'func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=$(( $* ))
+  }'
+else
+  func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=`expr "$@"`
+  }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  # If this shell supports suffix pattern removal, then use it to avoid
+  # forking. Hide the definitions single quotes in case the shell chokes
+  # on unsupported syntax...
+  _b='func_basename_result=${1##*/}'
+  _d='case $1 in
+        */*) func_dirname_result=${1%/*}$2 ;;
+        *  ) func_dirname_result=$3        ;;
+      esac'
+
+else
+  # ...otherwise fall back to using sed.
+  _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+  _d='func_dirname_result=`$ECHO "$1"  |$SED "$sed_dirname"`
+      if test "X$func_dirname_result" = "X$1"; then
+        func_dirname_result=$3
+      else
+        func_append func_dirname_result "$2"
+      fi'
+fi
+
+eval 'func_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+    $debug_cmd
+
+    '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+    '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname: $_G_line"
+    done
+    IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    _G_infix=$1; shift
+    _G_indent=$_G_infix
+    _G_prefix="$progname: $_G_infix: "
+    _G_message=$*
+
+    # Strip color escape sequences before counting printable length
+    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+    do
+      test -n "$_G_tc" && {
+        _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+      }
+    done
+    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes
+
+    func_echo_infix_1_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_infix_1_IFS
+      $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+      _G_prefix=$_G_indent
+    done
+    IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "  $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    $debug_cmd
+
+    func_error "$*"
+    exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $debug_cmd
+
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+  test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=${#1}
+  }'
+else
+  func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+  }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    $debug_cmd
+
+    _G_directory_path=$1
+    _G_dir_list=
+
+    if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+      # Protect directory names starting with '-'
+      case $_G_directory_path in
+        -*) _G_directory_path=./$_G_directory_path ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$_G_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+       # list incase some portion of path contains whitespace.
+        _G_dir_list=$_G_directory_path:$_G_dir_list
+
+        # If the last portion added has no slash in it, the list is done
+        case $_G_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+      done
+      _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+      func_mkdir_p_IFS=$IFS; IFS=:
+      for _G_dir in $_G_dir_list; do
+       IFS=$func_mkdir_p_IFS
+        # mkdir can fail with a 'File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$_G_dir" 2>/dev/null || :
+      done
+      IFS=$func_mkdir_p_IFS
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$_G_directory_path" || \
+        func_fatal_error "Failed to create '$1'"
+    fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+    $debug_cmd
+
+    _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+    if test : = "$opt_dry_run"; then
+      # Return a directory name, but don't create it in dry-run mode
+      _G_tmpdir=$_G_template-$$
+    else
+
+      # If mktemp works, use that first and foremost
+      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$_G_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+        func_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$_G_tmpdir"
+        umask $func_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$_G_tmpdir" || \
+        func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+    fi
+
+    $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+    $debug_cmd
+
+    # These SED scripts presuppose an absolute path with a trailing slash.
+    _G_pathcar='s|^/\([^/]*\).*$|\1|'
+    _G_pathcdr='s|^/[^/]*||'
+    _G_removedotparts=':dotsl
+               s|/\./|/|g
+               t dotsl
+               s|/\.$|/|'
+    _G_collapseslashes='s|/\{1,\}|/|g'
+    _G_finalslash='s|/*$|/|'
+
+    # Start from root dir and reassemble the path.
+    func_normal_abspath_result=
+    func_normal_abspath_tpath=$1
+    func_normal_abspath_altnamespace=
+    case $func_normal_abspath_tpath in
+      "")
+        # Empty path, that just means $cwd.
+        func_stripname '' '/' "`pwd`"
+        func_normal_abspath_result=$func_stripname_result
+        return
+        ;;
+      # The next three entries are used to spot a run of precisely
+      # two leading slashes without using negated character classes;
+      # we take advantage of case's first-match behaviour.
+      ///*)
+        # Unusual form of absolute path, do nothing.
+        ;;
+      //*)
+        # Not necessarily an ordinary path; POSIX reserves leading '//'
+        # and for example Cygwin uses it to access remote file shares
+        # over CIFS/SMB, so we conserve a leading double slash if found.
+        func_normal_abspath_altnamespace=/
+        ;;
+      /*)
+        # Absolute path, do nothing.
+        ;;
+      *)
+        # Relative path, prepend $cwd.
+        func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+        ;;
+    esac
+
+    # Cancel out all the simple stuff to save iterations.  We also want
+    # the path to end with a slash for ease of parsing, so make sure
+    # there is one (and only one) here.
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+    while :; do
+      # Processed it all yet?
+      if test / = "$func_normal_abspath_tpath"; then
+        # If we ascended to the root using ".." the result may be empty now.
+        if test -z "$func_normal_abspath_result"; then
+          func_normal_abspath_result=/
+        fi
+        break
+      fi
+      func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_pathcar"`
+      func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_pathcdr"`
+      # Figure out what to do with it
+      case $func_normal_abspath_tcomponent in
+        "")
+          # Trailing empty path component, ignore it.
+          ;;
+        ..)
+          # Parent dir; strip last assembled component from result.
+          func_dirname "$func_normal_abspath_result"
+          func_normal_abspath_result=$func_dirname_result
+          ;;
+        *)
+          # Actual path component, append it.
+          func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+          ;;
+      esac
+    done
+    # Restore leading double-slash if one was found on entry.
+    func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+    $debug_cmd
+
+    $opt_quiet || func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+    $debug_cmd
+
+    func_relative_path_result=
+    func_normal_abspath "$1"
+    func_relative_path_tlibdir=$func_normal_abspath_result
+    func_normal_abspath "$2"
+    func_relative_path_tbindir=$func_normal_abspath_result
+
+    # Ascend the tree starting from libdir
+    while :; do
+      # check if we have found a prefix of bindir
+      case $func_relative_path_tbindir in
+        $func_relative_path_tlibdir)
+          # found an exact match
+          func_relative_path_tcancelled=
+          break
+          ;;
+        $func_relative_path_tlibdir*)
+          # found a matching prefix
+          func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+          func_relative_path_tcancelled=$func_stripname_result
+          if test -z "$func_relative_path_result"; then
+            func_relative_path_result=.
+          fi
+          break
+          ;;
+        *)
+          func_dirname $func_relative_path_tlibdir
+          func_relative_path_tlibdir=$func_dirname_result
+          if test -z "$func_relative_path_tlibdir"; then
+            # Have to descend all the way to the root!
+            func_relative_path_result=../$func_relative_path_result
+            func_relative_path_tcancelled=$func_relative_path_tbindir
+            break
+          fi
+          func_relative_path_result=../$func_relative_path_result
+          ;;
+      esac
+    done
+
+    # Now calculate path; take care to avoid doubling-up slashes.
+    func_stripname '' '/' "$func_relative_path_result"
+    func_relative_path_result=$func_stripname_result
+    func_stripname '/' '/' "$func_relative_path_tcancelled"
+    if test -n "$func_stripname_result"; then
+      func_append func_relative_path_result "/$func_stripname_result"
+    fi
+
+    # Normalisation. If bindir is libdir, return '.' else relative path.
+    if test -n "$func_relative_path_result"; then
+      func_stripname './' '' "$func_relative_path_result"
+      func_relative_path_result=$func_stripname_result
+    fi
+
+    test -n "$func_relative_path_result" || func_relative_path_result=.
+
+    :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+#   i) func_quote_for_eval_result
+#      double-quoted, suitable for a subsequent eval
+#  ii) func_quote_for_eval_unquoted_result
+#      has all characters that are still active within double
+#      quotes backslashified.
+func_quote_for_eval ()
+{
+    $debug_cmd
+
+    func_quote_for_eval_unquoted_result=
+    func_quote_for_eval_result=
+    while test 0 -lt $#; do
+      case $1 in
+        *[\\\`\"\$]*)
+         _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+        *)
+          _G_unquoted_arg=$1 ;;
+      esac
+      if test -n "$func_quote_for_eval_unquoted_result"; then
+       func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+      else
+        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+      fi
+
+      case $_G_unquoted_arg in
+        # Double-quote args containing shell metacharacters to delay
+        # word splitting, command substitution and variable expansion
+        # for a subsequent eval.
+        # Many Bourne shells cannot handle close brackets correctly
+        # in scan sets, so we specify it separately.
+        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \  ]*|*]*|"")
+          _G_quoted_arg=\"$_G_unquoted_arg\"
+          ;;
+        *)
+          _G_quoted_arg=$_G_unquoted_arg
+         ;;
+      esac
+
+      if test -n "$func_quote_for_eval_result"; then
+       func_append func_quote_for_eval_result " $_G_quoted_arg"
+      else
+        func_append func_quote_for_eval_result "$_G_quoted_arg"
+      fi
+      shift
+    done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    $debug_cmd
+
+    case $1 in
+      *[\\\`\"]*)
+       _G_arg=`$ECHO "$1" | $SED \
+           -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        _G_arg=$1 ;;
+    esac
+
+    case $_G_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        _G_arg=\"$_G_arg\"
+        ;;
+    esac
+
+    func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_stripname ()
+  {
+    $debug_cmd
+
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary variable first.
+    func_stripname_result=$3
+    func_stripname_result=${func_stripname_result#"$1"}
+    func_stripname_result=${func_stripname_result%"$2"}
+  }'
+else
+  func_stripname ()
+  {
+    $debug_cmd
+
+    case $2 in
+      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+    esac
+  }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    func_quote_for_expand "$_G_cmd"
+    eval "func_notquiet $func_quote_for_expand_result"
+
+    $opt_dry_run || {
+      eval "$_G_cmd"
+      _G_status=$?
+      if test 0 -ne "$_G_status"; then
+       eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    $opt_quiet || {
+      func_quote_for_expand "$_G_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    $opt_dry_run || {
+      eval "$_G_user_locale
+           $_G_cmd"
+      _G_status=$?
+      eval "$_G_safe_locale"
+      if test 0 -ne "$_G_status"; then
+       eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+    $debug_cmd
+
+    case $1 in
+    [0-9]* | *[!a-zA-Z0-9_]*)
+      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+      ;;
+    * )
+      func_tr_sh_result=$1
+      ;;
+    esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $debug_cmd
+
+    $opt_verbose && func_echo "$*"
+
+    :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+    $debug_cmd
+
+    # CATEGORY must be in the warning_categories list!
+    case " $warning_categories " in
+      *" $1 "*) ;;
+      *) func_internal_error "invalid warning category '$1'" ;;
+    esac
+
+    _G_category=$1
+    shift
+
+    case " $opt_warning_types " in
+      *" $_G_category "*) $warning_func ${1+"$@"} ;;
+    esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+    $debug_cmd
+
+    printf '%s\n%s\n' "$1" "$2" \
+      | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false.  Use it like this:
+#
+#  func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+    $debug_cmd
+
+    test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+#   #!/bin/sh
+#   . relative/path/to/funclib.sh
+#   . relative/path/to/options-parser
+#   scriptversion=1.0
+#   func_options ${1+"$@"}
+#   eval set dummy "$func_options_result"; shift
+#   ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'.  Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+       --debug        enable verbose shell tracing
+   -W, --warnings=CATEGORY
+                      report the warnings falling in CATEGORY [all]
+   -v, --verbose      verbosely report processing
+       --version      print version information and exit
+   -h, --help         print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+       'all'          show all warnings
+       'none'         turn off all the warnings
+       'error'        warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code.  A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+    $debug_cmd
+
+    func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns.  FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not accept hook functions." ;;
+    esac
+
+    eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+    $debug_cmd
+
+    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+    esac
+
+    eval _G_hook_fns=\$$1_hooks; shift
+
+    for _G_hook in $_G_hook_fns; do
+      eval $_G_hook '"$@"'
+
+      # store returned options list back into positional
+      # parameters for next 'cmd' execution.
+      eval _G_hook_result=\$${_G_hook}_result
+      eval set dummy "$_G_hook_result"; shift
+    done
+
+    func_quote_for_eval ${1+"$@"}
+    func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'.  Like this:
+#
+#    my_options_prep ()
+#    {
+#        $debug_cmd
+#
+#        # Extend the existing usage message.
+#        usage_message=$usage_message'
+#      -s, --silent       don'\''t print informational messages
+#    '
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_options_prep_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_options_prep my_options_prep
+#
+#
+#    my_silent_option ()
+#    {
+#        $debug_cmd
+#
+#        # Note that for efficiency, we parse as many options as we can
+#        # recognise in a loop before passing the remainder back to the
+#        # caller on the first unrecognised argument we encounter.
+#        while test $# -gt 0; do
+#          opt=$1; shift
+#          case $opt in
+#            --silent|-s) opt_silent=: ;;
+#            # Separate non-argument short options:
+#            -s*)         func_split_short_opt "$_G_opt"
+#                         set dummy "$func_split_short_opt_name" \
+#                             "-$func_split_short_opt_arg" ${1+"$@"}
+#                         shift
+#                         ;;
+#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#          esac
+#        done
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_silent_option_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_parse_options my_silent_option
+#
+#
+#    my_option_validation ()
+#    {
+#        $debug_cmd
+#
+#        $opt_silent && $opt_verbose && func_fatal_help "\
+#    '--silent' and '--verbose' options are mutually exclusive."
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_option_validation_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse.  It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+    $debug_cmd
+
+    func_options_prep ${1+"$@"}
+    eval func_parse_options \
+        ${func_options_prep_result+"$func_options_prep_result"}
+    eval func_validate_options \
+        ${func_parse_options_result+"$func_parse_options_result"}
+
+    eval func_run_hooks func_options \
+        ${func_validate_options_result+"$func_validate_options_result"}
+
+    # save modified positional parameters for caller
+    func_options_result=$func_run_hooks_result
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters.  If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+    $debug_cmd
+
+    # Option defaults:
+    opt_verbose=false
+    opt_warning_types=
+
+    func_run_hooks func_options_prep ${1+"$@"}
+
+    # save modified positional parameters for caller
+    func_options_prep_result=$func_run_hooks_result
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+    $debug_cmd
+
+    func_parse_options_result=
+
+    # this just eases exit handling
+    while test $# -gt 0; do
+      # Defer to hook functions for initial option parsing, so they
+      # get priority in the event of reusing an option name.
+      func_run_hooks func_parse_options ${1+"$@"}
+
+      # Adjust func_parse_options positional parameters to match
+      eval set dummy "$func_run_hooks_result"; shift
+
+      # Break out of the loop if we already parsed every option.
+      test $# -gt 0 || break
+
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --debug|-x)   debug_cmd='set -x'
+                      func_echo "enabling shell trace mode"
+                      $debug_cmd
+                      ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                      set dummy --warnings none ${1+"$@"}
+                      shift
+                     ;;
+
+        --warnings|--warning|-W)
+                      test $# = 0 && func_missing_arg $_G_opt && break
+                      case " $warning_categories $1" in
+                        *" $1 "*)
+                          # trailing space prevents matching last $1 above
+                          func_append_uniq opt_warning_types " $1"
+                          ;;
+                        *all)
+                          opt_warning_types=$warning_categories
+                          ;;
+                        *none)
+                          opt_warning_types=none
+                          warning_func=:
+                          ;;
+                        *error)
+                          opt_warning_types=$warning_categories
+                          warning_func=func_fatal_error
+                          ;;
+                        *)
+                          func_fatal_error \
+                             "unsupported warning category: '$1'"
+                          ;;
+                      esac
+                      shift
+                      ;;
+
+        --verbose|-v) opt_verbose=: ;;
+        --version)    func_version ;;
+        -\?|-h)       func_usage ;;
+        --help)       func_help ;;
+
+       # Separate optargs to long options (plugins may need this):
+       --*=*)        func_split_equals "$_G_opt"
+                     set dummy "$func_split_equals_lhs" \
+                          "$func_split_equals_rhs" ${1+"$@"}
+                      shift
+                      ;;
+
+       # Separate optargs to short options:
+        -W*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        # Separate non-argument short options:
+        -\?*|-h*|-v*|-x*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "-$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        --)           break ;;
+        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+      esac
+    done
+
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    func_parse_options_result=$func_quote_for_eval_result
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+    $debug_cmd
+
+    # Display all warnings if -W was not given.
+    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+    func_run_hooks func_validate_options ${1+"$@"}
+
+    # Bail if the options were screwed!
+    $exit_cmd $EXIT_FAILURE
+
+    # save modified positional parameters for caller
+    func_validate_options_result=$func_run_hooks_result
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    $debug_cmd
+
+    eval \$ECHO \""Usage: $usage"\"
+    eval \$ECHO \""$fatal_help"\"
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$long_help_message"
+    exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    $debug_cmd
+
+    func_error "Missing argument for '$1'."
+    exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_equals ()
+  {
+      $debug_cmd
+
+      func_split_equals_lhs=${1%%=*}
+      func_split_equals_rhs=${1#*=}
+      test "x$func_split_equals_lhs" = "x$1" \
+        && func_split_equals_rhs=
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_equals ()
+  {
+      $debug_cmd
+
+      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+      func_split_equals_rhs=
+      test "x$func_split_equals_lhs" = "x$1" \
+        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+  }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_arg=${1#??}
+      func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+  }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+    exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+    $debug_cmd
+
+    eval \$ECHO \""Usage: $usage"\"
+    echo
+    $SED -n 's|^# ||
+        /^Written by/{
+          x;p;x
+        }
+       h
+       /^Written by/q' < "$progpath"
+    echo
+    eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $debug_cmd
+
+    printf '%s\n' "$progname $scriptversion"
+    $SED -n '
+        /(C)/!b go
+        :more
+        /\./!{
+          N
+          s|\n# | |
+          b more
+        }
+        :go
+        /^# Written by /,/# warranty; / {
+          s|^# ||
+          s|^# *$||
+          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+          p
+        }
+        /^# Written by / {
+          s|^# ||
+          p
+        }
+        /^warranty; /q' < "$progpath"
+
+    exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+    done
+    IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+    $debug_cmd
+
+    $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+       --config             show all configuration variables
+       --debug              enable verbose shell tracing
+   -n, --dry-run            display commands without modifying any files
+       --features           display basic configuration information and exit
+       --mode=MODE          use operation mode MODE
+       --no-warnings        equivalent to '-Wnone'
+       --preserve-dup-deps  don't remove duplicate dependency libraries
+       --quiet, --silent    don't print informational messages
+       --tag=TAG            use configuration variables from tag TAG
+   -v, --verbose            print more informational messages than default
+       --version            print version information
+   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [all]
+   -h, --help, --help-all   print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+       clean           remove files from the build directory
+       compile         compile a source file into a libtool object
+       execute         automatically set library path, then run a program
+       finish          complete the installation of libtool libraries
+       install         install libraries or executables
+       link            create a library or an executable
+       uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+       host-triplet:   $host
+       shell:          $SHELL
+       compiler:       $LTCC
+       compiler flags: $LTCFLAGS
+       linker:         $LD (gnu? $with_gnu_ld)
+       version:        $progname (GNU libtool) 2.4.6
+       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+    exit 0
+}
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_lo2o ()
+  {
+    case $1 in
+      *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+      *   ) func_lo2o_result=$1               ;;
+    esac
+  }'
+
+  # func_xform LIBOBJ-OR-SOURCE
+  # ---------------------------
+  # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+  # suffix to a '.lo' libtool-object suffix.
+  eval 'func_xform ()
+  {
+    func_xform_result=${1%.*}.lo
+  }'
+else
+  # ...otherwise fall back to using sed.
+  func_lo2o ()
+  {
+    func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+  }
+
+  func_xform ()
+  {
+    func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+  }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func__fatal_error ${1+"$@"} \
+      "See the $PACKAGE documentation for more information." \
+      "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+    echo "host: $host"
+    if test yes = "$build_libtool_libs"; then
+      echo "enable shared libraries"
+    else
+      echo "disable shared libraries"
+    fi
+    if test yes = "$build_old_libs"; then
+      echo "enable static libraries"
+    else
+      echo "disable static libraries"
+    fi
+
+    exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+    # Global variable:
+    tagname=$1
+
+    re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+    re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+    sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+    # Validate tagname.
+    case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+        func_fatal_error "invalid tag name: $tagname"
+        ;;
+    esac
+
+    # Don't test for the "default" C tag, as we know it's
+    # there but not specially marked.
+    case $tagname in
+        CC) ;;
+    *)
+        if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+         taglist="$taglist $tagname"
+
+         # Evaluate the configuration.  Be careful to quote the path
+         # and the sed script, to avoid splitting on whitespace, but
+         # also don't use non-portable quotes within backquotes within
+         # quotes we have to do it in 2 steps:
+         extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+         eval "$extractedcf"
+        else
+         func_error "ignoring unknown tag $tagname"
+        fi
+        ;;
+    esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+    if test "$package_revision" != "$macro_revision"; then
+      if test "$VERSION" != "$macro_version"; then
+        if test -z "$macro_version"; then
+          cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+        else
+          cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+        fi
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+      fi
+
+      exit $EXIT_MISMATCH
+    fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+    $debug_mode
+
+    # Option defaults:
+    opt_config=false
+    opt_dlopen=
+    opt_dry_run=false
+    opt_help=false
+    opt_mode=
+    opt_preserve_dup_deps=false
+    opt_quiet=false
+
+    nonopt=
+    preserve_args=
+
+    # Shorthand for --mode=foo, only valid as the first argument
+    case $1 in
+    clean|clea|cle|cl)
+      shift; set dummy --mode clean ${1+"$@"}; shift
+      ;;
+    compile|compil|compi|comp|com|co|c)
+      shift; set dummy --mode compile ${1+"$@"}; shift
+      ;;
+    execute|execut|execu|exec|exe|ex|e)
+      shift; set dummy --mode execute ${1+"$@"}; shift
+      ;;
+    finish|finis|fini|fin|fi|f)
+      shift; set dummy --mode finish ${1+"$@"}; shift
+      ;;
+    install|instal|insta|inst|ins|in|i)
+      shift; set dummy --mode install ${1+"$@"}; shift
+      ;;
+    link|lin|li|l)
+      shift; set dummy --mode link ${1+"$@"}; shift
+      ;;
+    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+      shift; set dummy --mode uninstall ${1+"$@"}; shift
+      ;;
+    esac
+
+    # Pass back the list of options.
+    func_quote_for_eval ${1+"$@"}
+    libtool_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+    $debug_cmd
+
+    # Perform our own loop to consume as many options as possible in
+    # each iteration.
+    while test $# -gt 0; do
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --dry-run|--dryrun|-n)
+                        opt_dry_run=:
+                        ;;
+
+        --config)       func_config ;;
+
+        --dlopen|-dlopen)
+                        opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+                        shift
+                        ;;
+
+        --preserve-dup-deps)
+                        opt_preserve_dup_deps=: ;;
+
+        --features)     func_features ;;
+
+        --finish)       set dummy --mode finish ${1+"$@"}; shift ;;
+
+        --help)         opt_help=: ;;
+
+        --help-all)     opt_help=': help-all' ;;
+
+        --mode)         test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_mode=$1
+                        case $1 in
+                          # Valid mode arguments:
+                          clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+                          # Catch anything else as an error
+                          *) func_error "invalid argument for $_G_opt"
+                             exit_cmd=exit
+                             break
+                             ;;
+                        esac
+                        shift
+                        ;;
+
+        --no-silent|--no-quiet)
+                        opt_quiet=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                        opt_warning=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-verbose)
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --silent|--quiet)
+                        opt_quiet=:
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --tag)          test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_tag=$1
+                        func_append preserve_args " $_G_opt $1"
+                        func_enable_tag "$1"
+                        shift
+                        ;;
+
+        --verbose|-v)   opt_quiet=false
+                        opt_verbose=:
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+       # An option not handled by this hook function:
+        *)             set dummy "$_G_opt" ${1+"$@"};  shift; break  ;;
+      esac
+    done
+
+
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+    # save first non-option argument
+    if test 0 -lt $#; then
+      nonopt=$1
+      shift
+    fi
+
+    # preserve --debug
+    test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+    case $host in
+      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+        # don't eliminate duplications in $postdeps and $predeps
+        opt_duplicate_compiler_generated_deps=:
+        ;;
+      *)
+        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+        ;;
+    esac
+
+    $opt_help || {
+      # Sanity checks first:
+      func_check_version_match
+
+      test yes != "$build_libtool_libs" \
+        && test yes != "$build_old_libs" \
+        && func_fatal_configuration "not configured to build any kind of library"
+
+      # Darwin sucks
+      eval std_shrext=\"$shrext_cmds\"
+
+      # Only execute mode is allowed to have -dlopen flags.
+      if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+        func_error "unrecognized option '-dlopen'"
+        $ECHO "$help" 1>&2
+        exit $EXIT_FAILURE
+      fi
+
+      # Change the help message to a mode-specific one.
+      generic_help=$help
+      help="Try '$progname --help --mode=$opt_mode' for more information."
+    }
+
+    # Pass back the unparsed argument list
+    func_quote_for_eval ${1+"$@"}
+    libtool_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# 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=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+  $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+       for lalib_p_l in 1 2 3 4
+       do
+           read lalib_p_line
+           case $lalib_p_line in
+               \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+           esac
+       done
+       exec 0<&5 5<&-
+    fi
+    test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    test -f "$1" &&
+      $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $debug_cmd
+
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$sp$nl
+      eval cmd=\"$cmd\"
+      IFS=$save_ifs
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $debug_cmd
+
+    case $1 in
+    */* | *\\*)        . "$1" ;;
+    *)         . "./$1" ;;
+    esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case $lt_sysroot:$1 in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result='='$func_stripname_result
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# 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 ()
+{
+    $debug_cmd
+
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+       func_append_quoted CC_quoted "$arg"
+      done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+       for z in $available_tags; do
+         if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+           # Evaluate the configuration.
+           eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           CC_quoted=
+           for arg in $CC; do
+             # Double-quote args containing other shell metacharacters.
+             func_append_quoted CC_quoted "$arg"
+           done
+           CC_expanded=`func_echo_all $CC`
+           CC_quoted_expanded=`func_echo_all $CC_quoted`
+           case "$@ " in
+           " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+           " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+             # The compiler in the base compile command matches
+             # the one in the tagged configuration.
+             # Assume this is the tagged configuration we want.
+             tagname=$z
+             break
+             ;;
+           esac
+         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
+         func_echo "unable to infer tagged configuration"
+         func_fatal_error "specify a tag with '--tag'"
+#      else
+#        func_verbose "using $tagname tagged configuration"
+       fi
+       ;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=$1
+    if test yes = "$build_libtool_libs"; then
+      write_lobj=\'$2\'
+    else
+      write_lobj=none
+    fi
+
+    if test yes = "$build_old_libs"; then
+      write_oldobj=\'$3\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "$write_libobj"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $debug_cmd
+
+  func_convert_core_file_wine_to_w32_result=$1
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $debug_cmd
+
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result"; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $debug_cmd
+
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $debug_cmd
+
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $debug_cmd
+
+  if test -z "$2" && test -n "$1"; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  '$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result=$1
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $debug_cmd
+
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  '$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result=$3
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $debug_cmd
+
+  case $4 in
+  $1 ) func_to_host_path_result=$3$func_to_host_path_result
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $debug_cmd
+
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $debug_cmd
+
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result=$func_convert_core_msys_to_w32_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result=$func_cygpath_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result=$func_cygpath_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $debug_cmd
+
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd=func_convert_path_$func_stripname_result
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $debug_cmd
+
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result=$func_convert_core_msys_to_w32_result
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result=$func_cygpath_result
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result=$func_cygpath_result
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+  $debug_cmd
+
+  func_dll_def_p_tmp=`$SED -n \
+    -e 's/^[    ]*//' \
+    -e '/^\(;.*\)*$/d' \
+    -e 's/^\(EXPORTS\|LIBRARY\)\([      ].*\)*$/DEF/p' \
+    -e q \
+    "$1"`
+  test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $debug_cmd
+
+    # 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=
+    pie_flag=
+
+    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)
+         test -n "$libobj" && \
+           func_fatal_error "you cannot specify '-o' more than once"
+         arg_mode=target
+         continue
+         ;;
+
+       -pie | -fpie | -fPIE)
+          func_append pie_flag " $arg"
+         continue
+         ;;
+
+       -shared | -static | -prefer-pic | -prefer-non-pic)
+         func_append 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,*)
+         func_stripname '-Wc,' '' "$arg"
+         args=$func_stripname_result
+         lastarg=
+         save_ifs=$IFS; IFS=,
+         for arg in $args; do
+           IFS=$save_ifs
+           func_append_quoted lastarg "$arg"
+         done
+         IFS=$save_ifs
+         func_stripname ' ' '' "$lastarg"
+         lastarg=$func_stripname_result
+
+         # Add the arguments to base_compile.
+         func_append 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.
+      func_append_quoted base_compile "$lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with '-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+       func_basename "$srcfile"
+       libobj=$func_basename_result
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from '$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+       test yes = "$build_libtool_libs" \
+         || func_fatal_configuration "cannot build a shared library"
+       build_old_libs=no
+       continue
+       ;;
+
+      -static)
+       build_libtool_libs=no
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
+      && func_warning "libobj name '$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname=$func_basename_result
+    xdir=$func_dirname_result
+    lobj=$xdir$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # Delete any leftover library objects.
+    if test yes = "$build_old_libs"; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test no = "$compiler_c_o"; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+      lockfile=$output_obj.lock
+    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 yes = "$need_locks"; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    elif test warn = "$need_locks"; 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."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+      func_append removelist " $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    func_append removelist " $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test yes = "$build_libtool_libs"; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test no != "$pic_mode"; then
+       command="$base_compile $qsrcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       func_append command " -o $lobj"
+      fi
+
+      func_show_eval_locale "$command" \
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test warn = "$need_locks" &&
+        test "X`cat $lockfile 2>/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."
+
+       $opt_dry_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
+       func_show_eval '$MV "$output_obj" "$lobj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test yes = "$suppress_opt"; then
+       suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test yes = "$build_old_libs"; then
+      if test yes != "$pic_mode"; then
+       # Don't build PIC code
+       command="$base_compile $qsrcfile$pie_flag"
+      else
+       command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test yes = "$compiler_c_o"; then
+       func_append command " -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      func_append command "$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test warn = "$need_locks" &&
+        test "X`cat $lockfile 2>/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."
+
+       $opt_dry_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
+       func_show_eval '$MV "$output_obj" "$obj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test no != "$need_locks"; then
+       removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+  test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $opt_mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [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: $progname [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
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
+  -shared           do not build a '.o' file suitable for static linking
+  -static           only build a '.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [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
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
+  -dlopen FILE      '-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    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
+  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -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]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+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: $progname [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."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode '$opt_mode'"
+        ;;
+    esac
+
+    echo
+    $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test : = "$opt_help"; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+       func_mode_help
+      done
+    } | $SED -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+       echo
+       func_mode_help
+      done
+    } |
+    $SED '1d
+      /^When reporting/,/^Report/{
+       H
+       d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $debug_cmd
+
+    # The first argument is the command name.
+    cmd=$nonopt
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $opt_dlopen; do
+      test -f "$file" \
+       || func_fatal_help "'$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+       func_resolve_sysroot "$file"
+       file=$func_resolve_sysroot_result
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "'$lib' is not a valid libtool archive"
+
+       # Read the libtool library.
+       dlname=
+       library_names=
+       func_source "$file"
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && \
+           func_warning "'$file' was not linked with '-export-dynamic'"
+         continue
+       fi
+
+       func_dirname "$file" "" "."
+       dir=$func_dirname_result
+
+       if test -f "$dir/$objdir/$dlname"; then
+         func_append dir "/$objdir"
+       else
+         if test ! -f "$dir/$dlname"; then
+           func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+         fi
+       fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       func_dirname "$file" "" "."
+       dir=$func_dirname_result
+       ;;
+
+      *)
+       func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+       continue
+       ;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir=$absdir
+
+      # 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
+      -* | *.la | *.lo ) ;;
+      *)
+       # Do a test to see if this is really a libtool program.
+       if func_ltwrapper_script_p "$file"; then
+         func_source "$file"
+         # Transform arg to wrapped name.
+         file=$progdir/$program
+       elif func_ltwrapper_executable_p "$file"; then
+         func_ltwrapper_scriptname "$file"
+         func_source "$func_ltwrapper_scriptname_result"
+         # Transform arg to wrapped name.
+         file=$progdir/$program
+       fi
+       ;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_append_quoted args "$file"
+    done
+
+    if $opt_dry_run; then
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+       echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    else
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE 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
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd=\$cmd$args
+    fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $debug_cmd
+
+    libs=
+    libdirs=
+    admincmds=
+
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+       func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+       if func_lalib_unsafe_p "$opt"; then
+         func_append libs " $opt"
+       else
+         func_warning "'$opt' is not a valid libtool archive"
+       fi
+
+      else
+       func_fatal_error "invalid argument '$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+         $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+           > $tmpdir/tmp-la
+         mv -f $tmpdir/tmp-la $lib
+       done
+        ${RM}r "$tmpdir"
+      fi
+    fi
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $opt_dry_run || eval "$cmds" || func_append admincmds "
+       $cmds"
+       fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_quiet && exit $EXIT_SUCCESS
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+       $ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+      echo "flag during linking and do at least one of the following:"
+      if test -n "$shlibpath_var"; then
+       echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
+       echo "     during execution"
+      fi
+      if test -n "$runpath_var"; then
+       echo "   - add LIBDIR to the '$runpath_var' environment variable"
+       echo "     during linking"
+      fi
+      if test -n "$hardcode_libdir_flag_spec"; then
+       libdir=LIBDIR
+       eval flag=\"$hardcode_libdir_flag_spec\"
+
+       $ECHO "   - use the '$flag' linker flag"
+      fi
+      if test -n "$admincmds"; then
+       $ECHO "   - have your system administrator run these commands:$admincmds"
+      fi
+      if test -f /etc/ld.so.conf; then
+       echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+      fi
+      echo
+
+      echo "See any operating system documentation about shared libraries for"
+      case $host in
+       solaris2.[6789]|solaris2.1[0-9])
+         echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+         echo "pages."
+         ;;
+       *)
+         echo "more information, such as the ld(1) and ld.so(8) manual pages."
+         ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
+    exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $debug_cmd
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+       # Allow the use of GNU shtool's install command.
+       case $nonopt in *shtool*) :;; *) false;; esac
+    then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=false
+    stripme=
+    no_mode=:
+    for arg
+    do
+      arg2=
+      if test -n "$dest"; then
+       func_append files " $dest"
+       dest=$arg
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=: ;;
+      -f)
+       if $install_cp; then :; else
+         prev=$arg
+       fi
+       ;;
+      -g | -m | -o)
+       prev=$arg
+       ;;
+      -s)
+       stripme=" -s"
+       continue
+       ;;
+      -*)
+       ;;
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         if test X-m = "X$prev" && test -n "$install_override_mode"; then
+           arg2=$install_override_mode
+           no_mode=false
+         fi
+         prev=
+       else
+         dest=$arg
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+       func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the '$prev' option requires an argument"
+
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+       func_quote_for_eval "$install_override_mode"
+       func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       func_fatal_help "no file or destination specified"
+      else
+       func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=:
+    if $isdir; then
+      destdir=$dest
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir=$func_dirname_result
+      destname=$func_basename_result
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+       func_fatal_help "'$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         func_fatal_help "'$destdir' must be an absolute directory name"
+         ;;
+       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.
+       func_append staticlibs " $file"
+       ;;
+
+      *.la)
+       func_resolve_sysroot "$file"
+       file=$func_resolve_sysroot_result
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "'$file' is not a valid libtool archive"
+
+       library_names=
+       old_library=
+       relink_command=
+       func_source "$file"
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) func_append current_libdirs " $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) func_append future_libdirs " $libdir" ;;
+         esac
+       fi
+
+       func_dirname "$file" "/" ""
+       dir=$func_dirname_result
+       func_append dir "$objdir"
+
+       if test -n "$relink_command"; then
+         # Determine the prefix the user has applied to our future dir.
+         inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that
+         # 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.
+         test "$inst_prefix_dir" = "$destdir" && \
+           func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+         else
+           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+         fi
+
+         func_warning "relinking '$file'"
+         func_show_eval "$relink_command" \
+           'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names; shift
+       if test -n "$1"; then
+         realname=$1
+         shift
+
+         srcname=$realname
+         test -n "$relink_command" && srcname=${realname}T
+
+         # Install the shared library and build the symlinks.
+         func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+             'exit $?'
+         tstripme=$stripme
+         case $host_os in
+         cygwin* | mingw* | pw32* | cegcc*)
+           case $realname in
+           *.dll.a)
+             tstripme=
+             ;;
+           esac
+           ;;
+         os2*)
+           case $realname in
+           *_dll.a)
+             tstripme=
+             ;;
+           esac
+           ;;
+         esac
+         if test -n "$tstripme" && test -n "$striplib"; then
+           func_show_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
+             test "$linkname" != "$realname" \
+               && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+           done
+         fi
+
+         # Do each command in the postinstall commands.
+         lib=$destdir/$realname
+         func_execute_cmds "$postinstall_cmds" 'exit $?'
+       fi
+
+       # Install the pseudo-library for information purposes.
+       func_basename "$file"
+       name=$func_basename_result
+       instname=$dir/${name}i
+       func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && func_append 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
+         func_basename "$file"
+         destfile=$func_basename_result
+         destfile=$destdir/$destfile
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         func_lo2o "$destfile"
+         staticdest=$func_lo2o_result
+         ;;
+       *.$objext)
+         staticdest=$destfile
+         destfile=
+         ;;
+       *)
+         func_fatal_help "cannot copy a libtool object to '$destfile'"
+         ;;
+       esac
+
+       # Install the libtool object if requested.
+       test -n "$destfile" && \
+         func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+       # Install the old object if enabled.
+       if test yes = "$build_old_libs"; then
+         # Deduce the name of the old-style object file.
+         func_lo2o "$file"
+         staticobj=$func_lo2o_result
+         func_show_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
+         func_basename "$file"
+         destfile=$func_basename_result
+         destfile=$destdir/$destfile
+       fi
+
+       # If the file is missing, and there is a .exe on the end, strip it
+       # because it is most likely a libtool script we actually want to
+       # install
+       stripped_ext=
+       case $file in
+         *.exe)
+           if test ! -f "$file"; then
+             func_stripname '' '.exe' "$file"
+             file=$func_stripname_result
+             stripped_ext=.exe
+           fi
+           ;;
+       esac
+
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin* | *mingw*)
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             wrapper=$func_ltwrapper_scriptname_result
+           else
+             func_stripname '' '.exe' "$file"
+             wrapper=$func_stripname_result
+           fi
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if func_ltwrapper_script_p "$wrapper"; then
+         notinst_deplibs=
+         relink_command=
+
+         func_source "$wrapper"
+
+         # Check the variables that should have been set.
+         test -z "$generated_by_libtool_version" && \
+           func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+         finalize=:
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             func_source "$lib"
+           fi
+           libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             func_warning "'$lib' has not been installed in '$libdir'"
+             finalize=false
+           fi
+         done
+
+         relink_command=
+         func_source "$wrapper"
+
+         outputname=
+         if test no = "$fast_install" && test -n "$relink_command"; then
+           $opt_dry_run || {
+             if $finalize; then
+               tmpdir=`func_mktempdir`
+               func_basename "$file$stripped_ext"
+               file=$func_basename_result
+               outputname=$tmpdir/$file
+               # Replace the output file specification.
+               relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+               $opt_quiet || {
+                 func_quote_for_expand "$relink_command"
+                 eval "func_echo $func_quote_for_expand_result"
+               }
+               if eval "$relink_command"; then :
+                 else
+                 func_error "error: relink '$file' with the above command before installing it"
+                 $opt_dry_run || ${RM}r "$tmpdir"
+                 continue
+               fi
+               file=$outputname
+             else
+               func_warning "cannot relink '$file'"
+             fi
+           }
+         else
+           # Install the binary that we compiled earlier.
+           file=`$ECHO "$file$stripped_ext" | $SED "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)
+           func_stripname '' '.exe' "$destfile"
+           destfile=$func_stripname_result
+           ;;
+         esac
+         ;;
+       esac
+       func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+       $opt_dry_run || if test -n "$outputname"; then
+         ${RM}r "$tmpdir"
+       fi
+       ;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name=$func_basename_result
+
+      # Set up the ranlib parameters.
+      oldlib=$destdir/$name
+      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+      tool_oldlib=$func_to_tool_file_result
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run '$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $debug_cmd
+
+    my_outputname=$1
+    my_originator=$2
+    my_pic_p=${3-false}
+    my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+       my_dlsyms=${my_outputname}S.c
+      else
+       func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+       # Discover the nlist of each of the dlfiles.
+       nlist=$output_objdir/$my_outputname.nm
+
+       func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+       # Parse the name list into a source file.
+       func_verbose "creating $output_objdir/$my_dlsyms"
+
+       $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+       if test yes = "$dlself"; then
+         func_verbose "generating symbol list for '$output'"
+
+         $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+         # Add our own program objects to the symbol list.
+         progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+         for progfile in $progfiles; do
+           func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+           func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+           $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -n "$exclude_expsyms"; then
+           $opt_dry_run || {
+             eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
+         fi
+
+         if test -n "$export_symbols_regex"; then
+           $opt_dry_run || {
+             eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
+         fi
+
+         # Prepare the list of exported symbols
+         if test -z "$export_symbols"; then
+           export_symbols=$output_objdir/$outputname.exp
+           $opt_dry_run || {
+             $RM $export_symbols
+             eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+             case $host in
+             *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+               ;;
+             esac
+           }
+         else
+           $opt_dry_run || {
+             eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+             case $host in
+               *cygwin* | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                 ;;
+             esac
+           }
+         fi
+       fi
+
+       for dlprefile in $dlprefiles; do
+         func_verbose "extracting global C symbols from '$dlprefile'"
+         func_basename "$dlprefile"
+         name=$func_basename_result
+          case $host in
+           *cygwin* | *mingw* | *cegcc* )
+             # if an import library, we need to obtain dlname
+             if func_win32_import_lib_p "$dlprefile"; then
+               func_tr_sh "$dlprefile"
+               eval "curr_lafile=\$libfile_$func_tr_sh_result"
+               dlprefile_dlbasename=
+               if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+                 # Use subshell, to avoid clobbering current variable values
+                 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+                 if test -n "$dlprefile_dlname"; then
+                   func_basename "$dlprefile_dlname"
+                   dlprefile_dlbasename=$func_basename_result
+                 else
+                   # no lafile. user explicitly requested -dlpreopen <import library>.
+                   $sharedlib_from_linklib_cmd "$dlprefile"
+                   dlprefile_dlbasename=$sharedlib_from_linklib_result
+                 fi
+               fi
+               $opt_dry_run || {
+                 if test -n "$dlprefile_dlbasename"; then
+                   eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+                 else
+                   func_warning "Could not compute DLL name from $name"
+                   eval '$ECHO ": $name " >> "$nlist"'
+                 fi
+                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+                   $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+               }
+             else # not an import lib
+               $opt_dry_run || {
+                 eval '$ECHO ": $name " >> "$nlist"'
+                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+               }
+             fi
+           ;;
+           *)
+             $opt_dry_run || {
+               eval '$ECHO ": $name " >> "$nlist"'
+               func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+               eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+             }
+           ;;
+          esac
+       done
+
+       $opt_dry_run || {
+         # 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 >/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/$my_dlsyms"'
+         else
+           echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+         fi
+
+         func_show_eval '$RM "${nlist}I"'
+         if test -n "$global_symbol_to_import"; then
+           eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+         fi
+
+         echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+         if test -s "$nlist"I; then
+           echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+  LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+  for (; symbol->name; ++symbol)
+    {"
+           $SED 's/.*/      if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+           echo >> "$output_objdir/$my_dlsyms" "\
+    }
+}"
+         fi
+         echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+         if test -s "$nlist"I; then
+           echo >> "$output_objdir/$my_dlsyms" "\
+  {\"@INIT@\", (void *) &lt_syminit},"
+         fi
+
+         case $need_lib_prefix in
+         no)
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         *)
+           eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         esac
+         echo >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+       } # !$opt_dry_run
+
+       pic_flag_for_symtable=
+       case "$compile_command " in
+       *" -static "*) ;;
+       *)
+         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*)
+           pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+         *-*-hpux*)
+           pic_flag_for_symtable=" $pic_flag"  ;;
+         *)
+           $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+           ;;
+         esac
+         ;;
+       esac
+       symtab_cflags=
+       for arg in $LTCFLAGS; do
+         case $arg in
+         -pie | -fpie | -fPIE) ;;
+         *) func_append symtab_cflags " $arg" ;;
+         esac
+       done
+
+       # Now compile the dynamic symbol file.
+       func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+       # Clean up the generated files.
+       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+       # Transform the symbol file into the correct name.
+       symfileobj=$output_objdir/${my_outputname}S.$objext
+       case $host in
+       *cygwin* | *mingw* | *cegcc* )
+         if test -f "$output_objdir/$my_outputname.def"; then
+           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+         else
+           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         fi
+         ;;
+       *)
+         compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+         ;;
+       esac
+       ;;
+      *)
+       func_fatal_error "unknown suffix for '$my_dlsyms'"
+       ;;
+      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 "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+    fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+  $debug_cmd
+
+  win32_libid_type=unknown
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      case $nm_interface in
+      "MS dumpbin")
+       if func_cygming_ms_implib_p "$1" ||
+          func_cygming_gnu_implib_p "$1"
+       then
+         win32_nmres=import
+       else
+         win32_nmres=
+       fi
+       ;;
+      *)
+       func_to_tool_file "$1" func_convert_file_msys_to_w32
+       win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+         $SED -n -e '
+           1,100{
+               / I /{
+                   s|.*|import|
+                   p
+                   q
+               }
+           }'`
+       ;;
+      esac
+      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_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $debug_cmd
+
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $debug_cmd
+
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[         ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive that possess that section. Heuristic: eliminate
+    # all those that have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $debug_cmd
+
+  if func_cygming_gnu_implib_p "$1"; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1"; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=
+  fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $debug_cmd
+
+    f_ex_an_ar_dir=$1; shift
+    f_ex_an_ar_oldlib=$1
+    if test yes = "$lock_old_archive_extraction"; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+                  'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test yes = "$lock_old_archive_extraction"; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $debug_cmd
+
+    my_gentop=$1; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=
+    my_xlib=
+    my_xabs=
+    my_xdir=
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib=$func_basename_result
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         func_arith $extracted_serial + 1
+         extracted_serial=$func_arith_result
+         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
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+       func_verbose "Extracting $my_xabs"
+       # Do not bother doing anything if just a dry run
+       $opt_dry_run || {
+         darwin_orig_dir=`pwd`
+         cd $my_xdir || exit $?
+         darwin_archive=$my_xabs
+         darwin_curdir=`pwd`
+         func_basename "$darwin_archive"
+         darwin_base_archive=$func_basename_result
+         darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+         if test -n "$darwin_arches"; then
+           darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+           darwin_arch=
+           func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+           for darwin_arch in  $darwin_arches; do
+             func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+             $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+             cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+             func_extract_an_archive "`pwd`" "$darwin_base_archive"
+             cd "$darwin_curdir"
+             $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+           done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+           darwin_file=
+           darwin_files=
+           for darwin_file in $darwin_filelist; do
+             darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+             $LIPO -create -output "$darwin_file" $darwin_files
+           done # $darwin_filelist
+           $RM -rf unfat-$$
+           cd "$darwin_orig_dir"
+         else
+           cd $darwin_orig_dir
+           func_extract_an_archive "$my_xdir" "$my_xabs"
+         fi # $darwin_arches
+       } # !$opt_dry_run
+       ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+       ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+    done
+
+    func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+       func_emit_wrapper_arg1=${1-no}
+
+       $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# 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.
+sed_quote_subst='$sed_quote_subst'
+
+# Be 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 variables:
+  generated_by_libtool_version='$macro_version'
+  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
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  case \" \$* \" in
+  *\\ --lt-*)
+    for lt_wr_arg
+    do
+      case \$lt_wr_arg in
+      --lt-*) ;;
+      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+      esac
+      shift
+    done ;;
+  esac
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+  done
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+       if test yes = "$fast_install"; then
+         $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+         $ECHO "\
+
+    # 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 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+       else
+         $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
+
+       $ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+       # fixup the dll searchpath if we need to.
+       #
+       # Fix the DLL searchpath if we need to.  Do this before prepending
+       # to shlibpath, because on Windows, both are PATH and uninstalled
+       # libraries must come first.
+       if test -n "$dllsearchpath"; then
+         $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
+       # Export our shlibpath_var if we have one.
+       if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+       fi
+
+       $ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+      func_exec_program \${1+\"\$@\"}
+    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 1
+  fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+       cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+*/
+EOF
+           cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#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
+# define FOPEN_WB "wb"
+# 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 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+           cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+           if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_path "$temp_rpath"
+             cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+           else
+             cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test -n "$dllsearchpath"; then
+              func_to_host_path "$dllsearchpath:"
+             cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+           else
+             cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test yes = "$fast_install"; then
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+           else
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+           fi
+
+
+           cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  int rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, (size_t) argc + 1);
+
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (STREQ (argv[i], dumpscript_opt))
+       {
+EOF
+           case $host in
+             *mingw* | *cygwin* )
+               # make stdout use "unix" line endings
+               echo "          setmode(1,_O_BINARY);"
+               ;;
+             esac
+
+           cat <<"EOF"
+         lt_dump_script (stdout);
+         return 0;
+       }
+      if (STREQ (argv[i], debug_opt))
+       {
+          lt_debug = 1;
+          continue;
+       }
+      if (STREQ (argv[i], ltwrapper_option_prefix))
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+                   "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+EOF
+           cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+           cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+                 tmp_pathspec);
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+                 actual_cwrapper_path);
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(main) libtool target name: %s\n",
+                 target_name);
+EOF
+
+           cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+                   strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+           cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+           case $host_os in
+             mingw*)
+           cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+       *p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+       *p = '/';
+      }
+  }
+EOF
+           ;;
+           esac
+
+           cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+                 nonnull (lt_argv_zero));
+  for (i = 0; i < newargc; i++)
+    {
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+                     i, nonnull (newargz[i]));
+    }
+
+EOF
+
+           case $host_os in
+             mingw*)
+               cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
+  rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      lt_debugprintf (__FILE__, __LINE__,
+                     "(main) failed to launch target \"%s\": %s\n",
+                     lt_argv_zero, nonnull (strerror (errno)));
+      return 127;
+    }
+  return rval;
+EOF
+               ;;
+             *)
+               cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+               ;;
+           esac
+
+           cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal (__FILE__, __LINE__, "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;
+
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+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];
+  size_t tmp_len;
+  char *concat_name;
+
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+  if (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 = (size_t) (q - p);
+             p_next = (*q == '\0' ? q : q + 1);
+             if (p_len == 0)
+               {
+                 /* empty path: current directory */
+                 if (getcwd (tmp, LT_PATHMAX) == NULL)
+                   lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
+                 tmp_len = strlen (tmp);
+                 concat_name =
+                   XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, tmp, tmp_len);
+                 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 (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  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 *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      lt_debugprintf (__FILE__, __LINE__,
+                     "checking path component for symlinks: %s\n",
+                     tmp_pathspec);
+      if (lstat (tmp_pathspec, &s) == 0)
+       {
+         if (S_ISLNK (s.st_mode) != 0)
+           {
+             has_symlinks = 1;
+             break;
+           }
+
+         /* search backwards for last DIR_SEPARATOR */
+         p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+         while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           p--;
+         if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           {
+             /* no more DIR_SEPARATORS left */
+             break;
+           }
+         *p = '\0';
+       }
+      else
+       {
+         lt_fatal (__FILE__, __LINE__,
+                   "error accessing file \"%s\": %s",
+                   tmp_pathspec, nonnull (strerror (errno)));
+       }
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal (__FILE__, __LINE__,
+               "could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+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 (STREQ (str, pat))
+       *str = '\0';
+    }
+  return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+              int line, const char *mode,
+              const char *message, va_list ap)
+{
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+  va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    size_t len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      size_t orig_value_len = strlen (orig_value);
+      size_t add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      size_t len = strlen (new_value);
+      while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[--len] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+                 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+EOF
+           case $host_os in
+             mingw*)
+               cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+       new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+       {
+         int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+         size_t length;
+         unsigned int backslashes;
+         const char *s;
+         char *quoted_string;
+         char *p;
+
+         length = 0;
+         backslashes = 0;
+         if (quote_around)
+           length++;
+         for (s = string; *s != '\0'; s++)
+           {
+             char c = *s;
+             if (c == '"')
+               length += backslashes + 1;
+             length++;
+             if (c == '\\')
+               backslashes++;
+             else
+               backslashes = 0;
+           }
+         if (quote_around)
+           length += backslashes + 1;
+
+         quoted_string = XMALLOC (char, length + 1);
+
+         p = quoted_string;
+         backslashes = 0;
+         if (quote_around)
+           *p++ = '"';
+         for (s = string; *s != '\0'; s++)
+           {
+             char c = *s;
+             if (c == '"')
+               {
+                 unsigned int j;
+                 for (j = backslashes + 1; j > 0; j--)
+                   *p++ = '\\';
+               }
+             *p++ = c;
+             if (c == '\\')
+               backslashes++;
+             else
+               backslashes = 0;
+           }
+         if (quote_around)
+           {
+             unsigned int j;
+             for (j = backslashes; j > 0; j--)
+               *p++ = '\\';
+             *p++ = '"';
+           }
+         *p = '\0';
+
+         new_argv[i] = quoted_string;
+       }
+      else
+       new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
+
+  return new_argv;
+}
+EOF
+               ;;
+           esac
+
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+           func_emit_wrapper yes |
+             $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
+            cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $debug_cmd
+
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+    $debug_cmd
+
+    case " $compile_command " in
+    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+      suncc_use_cstd_abi=no
+      ;;
+    *)
+      suncc_use_cstd_abi=yes
+      ;;
+    esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $debug_cmd
+
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # what system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll that has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    bindir=
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    os2dllname=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=false
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module=$wl-single_module
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+       test yes != "$build_libtool_libs" \
+         && func_fatal_configuration "cannot build a shared library"
+       build_old_libs=no
+       break
+       ;;
+      -all-static | -static | -static-libtool-libs)
+       case $arg in
+       -all-static)
+         if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+           func_warning "complete static linking is impossible in this configuration"
+         fi
+         if test -n "$link_static_flag"; then
+           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
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         func_append compile_command " @OUTPUT@"
+         func_append finalize_command " @OUTPUT@"
+         ;;
+       esac
+
+       case $prev in
+       bindir)
+         bindir=$arg
+         prev=
+         continue
+         ;;
+       dlfiles|dlprefiles)
+         $preload || {
+           # Add the symbol object into the linking commands.
+           func_append compile_command " @SYMFILE@"
+           func_append finalize_command " @SYMFILE@"
+           preload=:
+         }
+         case $arg in
+         *.la | *.lo) ;;  # We handle these cases below.
+         force)
+           if test no = "$dlself"; then
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         self)
+           if test dlprefiles = "$prev"; then
+             dlself=yes
+           elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+             dlself=yes
+           else
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         *)
+           if test dlfiles = "$prev"; then
+             func_append dlfiles " $arg"
+           else
+             func_append dlprefiles " $arg"
+           fi
+           prev=
+           continue
+           ;;
+         esac
+         ;;
+       expsyms)
+         export_symbols=$arg
+         test -f "$arg" \
+           || func_fatal_error "symbol file '$arg' does not exist"
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex=$arg
+         prev=
+         continue
+         ;;
+       framework)
+         case $host in
+           *-*-darwin*)
+             case "$deplibs " in
+               *" $qarg.ltframework "*) ;;
+               *) func_append deplibs " $qarg.ltframework" # this is fixed later
+                  ;;
+             esac
+             ;;
+         esac
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir=$arg
+         prev=
+         continue
+         ;;
+       mllvm)
+         # Clang does not use LLVM to link, so we can simply discard any
+         # '-mllvm $arg' options when doing the link step.
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat "$save_arg"`
+           do
+#            func_append moreargs " $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if func_lalib_unsafe_p "$arg"; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               func_source "$arg"
+
+               if test -z "$pic_object" ||
+                  test -z "$non_pic_object" ||
+                  test none = "$pic_object" &&
+                  test none = "$non_pic_object"; then
+                 func_fatal_error "cannot find name of object for '$arg'"
+               fi
+
+               # Extract subdirectory from the argument.
+               func_dirname "$arg" "/" ""
+               xdir=$func_dirname_result
+
+               if test none != "$pic_object"; then
+                 # Prepend the subdirectory the object is found in.
+                 pic_object=$xdir$pic_object
+
+                 if test dlfiles = "$prev"; then
+                   if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+                     func_append dlfiles " $pic_object"
+                     prev=
+                     continue
+                   else
+                     # If libtool objects are unsupported, then we need to preload.
+                     prev=dlprefiles
+                   fi
+                 fi
+
+                 # CHECK ME:  I think I busted this.  -Ossama
+                 if test dlprefiles = "$prev"; then
+                   # Preload the old-style object.
+                   func_append dlprefiles " $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 func_append libobjs " $pic_object"
+                 arg=$pic_object
+               fi
+
+               # Non-PIC object.
+               if test none != "$non_pic_object"; then
+                 # Prepend the subdirectory the object is found in.
+                 non_pic_object=$xdir$non_pic_object
+
+                 # A standard non-PIC object
+                 func_append non_pic_objects " $non_pic_object"
+                 if test -z "$pic_object" || test none = "$pic_object"; then
+                   arg=$non_pic_object
+                 fi
+               else
+                 # If the PIC object exists, use it instead.
+                 # $xdir was prepended to $pic_object above.
+                 non_pic_object=$pic_object
+                 func_append non_pic_objects " $non_pic_object"
+               fi
+             else
+               # Only an error if not doing a dry-run.
+               if $opt_dry_run; then
+                 # Extract subdirectory from the argument.
+                 func_dirname "$arg" "/" ""
+                 xdir=$func_dirname_result
+
+                 func_lo2o "$arg"
+                 pic_object=$xdir$objdir/$func_lo2o_result
+                 non_pic_object=$xdir$func_lo2o_result
+                 func_append libobjs " $pic_object"
+                 func_append non_pic_objects " $non_pic_object"
+               else
+                 func_fatal_error "'$arg' is not a valid libtool object"
+               fi
+             fi
+           done
+         else
+           func_fatal_error "link input file '$arg' does not exist"
+         fi
+         arg=$save_arg
+         prev=
+         continue
+         ;;
+       os2dllname)
+         os2dllname=$arg
+         prev=
+         continue
+         ;;
+       precious_regex)
+         precious_files_regex=$arg
+         prev=
+         continue
+         ;;
+       release)
+         release=-$arg
+         prev=
+         continue
+         ;;
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           func_fatal_error "only absolute run-paths are allowed"
+           ;;
+         esac
+         if test rpath = "$prev"; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) func_append rpath " $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) func_append xrpath " $arg" ;;
+           esac
+         fi
+         prev=
+         continue
+         ;;
+       shrext)
+         shrext_cmds=$arg
+         prev=
+         continue
+         ;;
+       weak)
+         func_append weak_libs " $arg"
+         prev=
+         continue
+         ;;
+       xcclinker)
+         func_append linker_flags " $qarg"
+         func_append compiler_flags " $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xcompiler)
+         func_append compiler_flags " $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xlinker)
+         func_append linker_flags " $qarg"
+         func_append compiler_flags " $wl$qarg"
+         prev=
+         func_append compile_command " $wl$qarg"
+         func_append finalize_command " $wl$qarg"
+         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
+         # See comment for -static flag below, for more details.
+         func_append compile_command " $link_static_flag"
+         func_append finalize_command " $link_static_flag"
+       fi
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       func_fatal_error "'-allow-undefined' must not be used because it is the default"
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       continue
+       ;;
+
+      -bindir)
+       prev=bindir
+       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
+         func_fatal_error "more than one -exported-symbols argument is not allowed"
+       fi
+       if test X-export-symbols = "X$arg"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       continue
+       ;;
+
+      -framework)
+       prev=framework
+       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*)
+         func_append compile_command " $arg"
+         func_append finalize_command " $arg"
+         ;;
+       esac
+       continue
+       ;;
+
+      -L*)
+       func_stripname "-L" '' "$arg"
+       if test -z "$func_stripname_result"; then
+         if test "$#" -gt 0; then
+           func_fatal_error "require no space between '-L' and '$1'"
+         else
+           func_fatal_error "need path for '-L' option"
+         fi
+       fi
+       func_resolve_sysroot "$func_stripname_result"
+       dir=$func_resolve_sysroot_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         test -z "$absdir" && \
+           func_fatal_error "cannot determine absolute directory name of '$dir'"
+         dir=$absdir
+         ;;
+       esac
+       case "$deplibs " in
+       *" -L$dir "* | *" $arg "*)
+         # Will only happen for absolute or sysroot arguments
+         ;;
+       *)
+         # Preserve sysroot, but never include relative directories
+         case $dir in
+           [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+           *) func_append deplibs " -L$dir" ;;
+         esac
+         func_append lib_search_path " $dir"
+         ;;
+       esac
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         ::) dllsearchpath=$dir;;
+         *) func_append dllsearchpath ":$dir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         ::) dllsearchpath=$testbindir;;
+         *) func_append dllsearchpath ":$testbindir";;
+         esac
+         ;;
+       esac
+       continue
+       ;;
+
+      -l*)
+       if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test X-lc = "X$arg" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+           # Do not include libc due to us having libc/libc_r.
+           test X-lc = "X$arg" && continue
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C and math libraries are in the System framework
+           func_append deplibs " System.ltframework"
+           continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           test X-lc = "X$arg" && continue
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           test X-lc = "X$arg" && continue
+           ;;
+         esac
+       elif test X-lc_r = "X$arg"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
+       fi
+       func_append deplibs " $arg"
+       continue
+       ;;
+
+      -mllvm)
+       prev=mllvm
+       continue
+       ;;
+
+      -module)
+       module=yes
+       continue
+       ;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot|--sysroot)
+       func_append compiler_flags " $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       prev=xcompiler
+       continue
+       ;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+       func_append compiler_flags " $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       case "$new_inherited_linker_flags " in
+           *" $arg "*) ;;
+           * ) func_append new_inherited_linker_flags " $arg" ;;
+       esac
+       continue
+       ;;
+
+      -multi_module)
+       single_module=$wl-multi_module
+       continue
+       ;;
+
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
+
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # and Darwin in order for the loader to find any dlls it needs.
+         func_warning "'-no-install' is ignored for $host"
+         func_warning "assuming '-no-fast-install' instead"
+         fast_install=no
+         ;;
+       *) no_install=yes ;;
+       esac
+       continue
+       ;;
+
+      -no-undefined)
+       allow_undefined=no
+       continue
+       ;;
+
+      -objectlist)
+       prev=objectlist
+       continue
+       ;;
+
+      -os2dllname)
+       prev=os2dllname
+       continue
+       ;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
+
+      -release)
+       prev=release
+       continue
+       ;;
+
+      -rpath)
+       prev=rpath
+       continue
+       ;;
+
+      -R)
+       prev=xrpath
+       continue
+       ;;
+
+      -R*)
+       func_stripname '-R' '' "$arg"
+       dir=$func_stripname_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       =*)
+         func_stripname '=' '' "$dir"
+         dir=$lt_sysroot$func_stripname_result
+         ;;
+       *)
+         func_fatal_error "only absolute run-paths are allowed"
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) func_append xrpath " $dir" ;;
+       esac
+       continue
+       ;;
+
+      -shared)
+       # The effects of -shared are defined in a previous loop.
+       continue
+       ;;
+
+      -shrext)
+       prev=shrext
+       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
+       ;;
+
+      -weak)
+        prev=weak
+       continue
+       ;;
+
+      -Wc,*)
+       func_stripname '-Wc,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs=$IFS; IFS=,
+       for flag in $args; do
+         IFS=$save_ifs
+          func_quote_for_eval "$flag"
+         func_append arg " $func_quote_for_eval_result"
+         func_append compiler_flags " $func_quote_for_eval_result"
+       done
+       IFS=$save_ifs
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
+
+      -Wl,*)
+       func_stripname '-Wl,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs=$IFS; IFS=,
+       for flag in $args; do
+         IFS=$save_ifs
+          func_quote_for_eval "$flag"
+         func_append arg " $wl$func_quote_for_eval_result"
+         func_append compiler_flags " $wl$func_quote_for_eval_result"
+         func_append linker_flags " $func_quote_for_eval_result"
+       done
+       IFS=$save_ifs
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
+
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
+
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
+
+      # -msg_* for osf cc
+      -msg_*)
+       func_quote_for_eval "$arg"
+       arg=$func_quote_for_eval_result
+       ;;
+
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # -fstack-protector*   stack protector flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -specs=*             GCC specs files
+      # -stdlib=*            select c++ std lib with clang
+      # -fsanitize=*         Clang/GCC memory and address sanitizer
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+      -specs=*|-fsanitize=*)
+        func_quote_for_eval "$arg"
+       arg=$func_quote_for_eval_result
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        func_append compiler_flags " $arg"
+        continue
+        ;;
+
+      -Z*)
+        if test os2 = "`expr $host : '.*\(os2\)'`"; then
+          # OS/2 uses -Zxxx to specify OS/2-specific options
+         compiler_flags="$compiler_flags $arg"
+         func_append compile_command " $arg"
+         func_append finalize_command " $arg"
+         case $arg in
+         -Zlinker | -Zstack)
+           prev=xcompiler
+           ;;
+         esac
+         continue
+        else
+         # Otherwise treat like 'Some other compiler flag' below
+         func_quote_for_eval "$arg"
+         arg=$func_quote_for_eval_result
+        fi
+       ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+       arg=$func_quote_for_eval_result
+       ;;
+
+      *.$objext)
+       # A standard object.
+       func_append objs " $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if func_lalib_unsafe_p "$arg"; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         func_source "$arg"
+
+         if test -z "$pic_object" ||
+            test -z "$non_pic_object" ||
+            test none = "$pic_object" &&
+            test none = "$non_pic_object"; then
+           func_fatal_error "cannot find name of object for '$arg'"
+         fi
+
+         # Extract subdirectory from the argument.
+         func_dirname "$arg" "/" ""
+         xdir=$func_dirname_result
+
+         test none = "$pic_object" || {
+           # Prepend the subdirectory the object is found in.
+           pic_object=$xdir$pic_object
+
+           if test dlfiles = "$prev"; then
+             if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+               func_append dlfiles " $pic_object"
+               prev=
+               continue
+             else
+               # If libtool objects are unsupported, then we need to preload.
+               prev=dlprefiles
+             fi
+           fi
+
+           # CHECK ME:  I think I busted this.  -Ossama
+           if test dlprefiles = "$prev"; then
+             # Preload the old-style object.
+             func_append dlprefiles " $pic_object"
+             prev=
+           fi
+
+           # A PIC object.
+           func_append libobjs " $pic_object"
+           arg=$pic_object
+         }
+
+         # Non-PIC object.
+         if test none != "$non_pic_object"; then
+           # Prepend the subdirectory the object is found in.
+           non_pic_object=$xdir$non_pic_object
+
+           # A standard non-PIC object
+           func_append non_pic_objects " $non_pic_object"
+           if test -z "$pic_object" || test none = "$pic_object"; then
+             arg=$non_pic_object
+           fi
+         else
+           # If the PIC object exists, use it instead.
+           # $xdir was prepended to $pic_object above.
+           non_pic_object=$pic_object
+           func_append non_pic_objects " $non_pic_object"
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if $opt_dry_run; then
+           # Extract subdirectory from the argument.
+           func_dirname "$arg" "/" ""
+           xdir=$func_dirname_result
+
+           func_lo2o "$arg"
+           pic_object=$xdir$objdir/$func_lo2o_result
+           non_pic_object=$xdir$func_lo2o_result
+           func_append libobjs " $pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         else
+           func_fatal_error "'$arg' is not a valid libtool object"
+         fi
+       fi
+       ;;
+
+      *.$libext)
+       # An archive.
+       func_append deplibs " $arg"
+       func_append old_deplibs " $arg"
+       continue
+       ;;
+
+      *.la)
+       # A libtool-controlled library.
+
+       func_resolve_sysroot "$arg"
+       if test dlfiles = "$prev"; then
+         # This library was specified with -dlopen.
+         func_append dlfiles " $func_resolve_sysroot_result"
+         prev=
+       elif test dlprefiles = "$prev"; then
+         # The library was specified with -dlpreopen.
+         func_append dlprefiles " $func_resolve_sysroot_result"
+         prev=
+       else
+         func_append deplibs " $func_resolve_sysroot_result"
+       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.
+       func_quote_for_eval "$arg"
+       arg=$func_quote_for_eval_result
+       ;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the '$prevarg' option requires an argument"
+
+    if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname=$func_basename_result
+    libobjs_save=$libobjs
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    # Definition is injected by LT_CONFIG during libtool generation.
+    func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+    func_dirname "$output" "/" ""
+    output_objdir=$func_dirname_result$objdir
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    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 $opt_preserve_dup_deps; then
+       case "$libs " in
+       *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+       esac
+      fi
+      func_append libs " $deplib"
+    done
+
+    if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+         esac
+         func_append 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
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+       passes="conv dlpreopen link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+           ;;
+         esac
+       done
+       ;;
+    prog)
+       compile_deplibs=
+       finalize_deplibs=
+       alldeplibs=false
+       newdlfiles=
+       newdlprefiles=
+       passes="conv scan dlopen dlpreopen link"
+       ;;
+    *)  passes="conv"
+       ;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test lib,link = "$linkmode,$pass"; then
+       ## FIXME: Find the place where the list is rebuilt in the wrong
+       ##        order, and fix it there properly
+        tmp_deplibs=
+       for deplib in $deplibs; do
+         tmp_deplibs="$deplib $tmp_deplibs"
+       done
+       deplibs=$tmp_deplibs
+      fi
+
+      if test lib,link = "$linkmode,$pass" ||
+        test prog,scan = "$linkmode,$pass"; then
+       libs=$deplibs
+       deplibs=
+      fi
+      if test prog = "$linkmode"; then
+       case $pass in
+       dlopen) libs=$dlfiles ;;
+       dlpreopen) libs=$dlprefiles ;;
+       link)
+         libs="$deplibs %DEPLIBS%"
+         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+         ;;
+       esac
+      fi
+      if test lib,dlpreopen = "$linkmode,$pass"; then
+       # Collect and forward deplibs of preopened libtool libs
+       for lib in $dlprefiles; do
+         # Ignore non-libtool-libs
+         dependency_libs=
+         func_resolve_sysroot "$lib"
+         case $lib in
+         *.la) func_source "$func_resolve_sysroot_result" ;;
+         esac
+
+         # Collect preopened libtool deplibs, except any this library
+         # has declared as weak libs
+         for deplib in $dependency_libs; do
+           func_basename "$deplib"
+            deplib_base=$func_basename_result
+           case " $weak_libs " in
+           *" $deplib_base "*) ;;
+           *) func_append deplibs " $deplib" ;;
+           esac
+         done
+       done
+       libs=$dlprefiles
+      fi
+      if test dlopen = "$pass"; then
+       # Collect dlpreopened libraries
+       save_deplibs=$deplibs
+       deplibs=
+      fi
+
+      for deplib in $libs; do
+       lib=
+       found=false
+       case $deplib in
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+         if test prog,link = "$linkmode,$pass"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           func_append compiler_flags " $deplib"
+           if test lib = "$linkmode"; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) func_append new_inherited_linker_flags " $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -l*)
+         if test lib != "$linkmode" && test prog != "$linkmode"; then
+           func_warning "'-l' is ignored for archives/objects"
+           continue
+         fi
+         func_stripname '-l' '' "$deplib"
+         name=$func_stripname_result
+         if test lib = "$linkmode"; then
+           searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+         else
+           searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+         fi
+         for searchdir in $searchdirs; do
+           for search_ext in .la $std_shrext .so .a; do
+             # Search the libtool library
+             lib=$searchdir/lib$name$search_ext
+             if test -f "$lib"; then
+               if test .la = "$search_ext"; then
+                 found=:
+               else
+                 found=false
+               fi
+               break 2
+             fi
+           done
+         done
+         if $found; then
+           # deplib is a libtool library
+           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+           # We need to do some special things here, and not later.
+           if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+             case " $predeps $postdeps " in
+             *" $deplib "*)
+               if func_lalib_p "$lib"; then
+                 library_names=
+                 old_library=
+                 func_source "$lib"
+                 for l in $old_library $library_names; do
+                   ll=$l
+                 done
+                 if test "X$ll" = "X$old_library"; then # only static version available
+                   found=false
+                   func_dirname "$lib" "" "."
+                   ladir=$func_dirname_result
+                   lib=$ladir/$old_library
+                   if test prog,link = "$linkmode,$pass"; then
+                     compile_deplibs="$deplib $compile_deplibs"
+                     finalize_deplibs="$deplib $finalize_deplibs"
+                   else
+                     deplibs="$deplib $deplibs"
+                     test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+                   fi
+                   continue
+                 fi
+               fi
+               ;;
+             *) ;;
+             esac
+           fi
+         else
+           # deplib doesn't seem to be a libtool library
+           if test prog,link = "$linkmode,$pass"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             deplibs="$deplib $deplibs"
+             test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
+         fi
+         ;; # -l
+       *.ltframework)
+         if test prog,link = "$linkmode,$pass"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           deplibs="$deplib $deplibs"
+           if test lib = "$linkmode"; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) func_append new_inherited_linker_flags " $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test conv = "$pass" && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           func_stripname '-L' '' "$deplib"
+           func_resolve_sysroot "$func_stripname_result"
+           func_append newlib_search_path " $func_resolve_sysroot_result"
+           ;;
+         prog)
+           if test conv = "$pass"; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test scan = "$pass"; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           func_stripname '-L' '' "$deplib"
+           func_resolve_sysroot "$func_stripname_result"
+           func_append newlib_search_path " $func_resolve_sysroot_result"
+           ;;
+         *)
+           func_warning "'-L' is ignored for archives/objects"
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test link = "$pass"; then
+           func_stripname '-R' '' "$deplib"
+           func_resolve_sysroot "$func_stripname_result"
+           dir=$func_resolve_sysroot_result
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) func_append xrpath " $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la)
+         func_resolve_sysroot "$deplib"
+         lib=$func_resolve_sysroot_result
+         ;;
+       *.$libext)
+         if test conv = "$pass"; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           # Linking convenience modules into shared libraries is allowed,
+           # but linking other static libraries is non-portable.
+           case " $dlpreconveniencelibs " in
+           *" $deplib "*) ;;
+           *)
+             valid_a_lib=false
+             case $deplibs_check_method in
+               match_pattern*)
+                 set dummy $deplibs_check_method; shift
+                 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+                 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+                   | $EGREP "$match_pattern_regex" > /dev/null; then
+                   valid_a_lib=:
+                 fi
+               ;;
+               pass_all)
+                 valid_a_lib=:
+               ;;
+             esac
+             if $valid_a_lib; then
+               echo
+               $ECHO "*** Warning: Linking the shared library $output against the"
+               $ECHO "*** static library $deplib is not portable!"
+               deplibs="$deplib $deplibs"
+             else
+               echo
+               $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+               echo "*** I have the capability to make that library automatically link in when"
+               echo "*** you link to this library.  But I can only do this if you have a"
+               echo "*** shared version of the library, which you do not appear to have"
+               echo "*** because the file extensions .$libext of this argument makes me believe"
+               echo "*** that it is just a static archive that I should not use here."
+             fi
+             ;;
+           esac
+           continue
+           ;;
+         prog)
+           if test link != "$pass"; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           continue
+           ;;
+         esac # linkmode
+         ;; # *.$libext
+       *.lo | *.$objext)
+         if test conv = "$pass"; then
+           deplibs="$deplib $deplibs"
+         elif test prog = "$linkmode"; then
+           if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             func_append newdlprefiles " $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             func_append newdlfiles " $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=:
+         continue
+         ;;
+       esac # case $deplib
+
+       $found || test -f "$lib" \
+         || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$lib" \
+         || func_fatal_error "'$lib' is not a valid libtool archive"
+
+       func_dirname "$lib" "" "."
+       ladir=$func_dirname_result
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       inherited_linker_flags=
+       # 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
+       func_source "$lib"
+
+       # Convert "-framework foo" to "foo.ltframework"
+       if test -n "$inherited_linker_flags"; then
+         tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+           case " $new_inherited_linker_flags " in
+             *" $tmp_inherited_linker_flag "*) ;;
+             *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+           esac
+         done
+       fi
+       dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       if test lib,link = "$linkmode,$pass" ||
+          test prog,scan = "$linkmode,$pass" ||
+          { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+         test -n "$dlopen" && func_append dlfiles " $dlopen"
+         test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+       fi
+
+       if test conv = "$pass"; then
+         # Only check for convenience libraries
+         deplibs="$lib $deplibs"
+         if test -z "$libdir"; then
+           if test -z "$old_library"; then
+             func_fatal_error "cannot find name of link library for '$lib'"
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           func_append convenience " $ladir/$objdir/$old_library"
+           func_append old_convenience " $ladir/$objdir/$old_library"
+           tmp_libs=
+           for deplib in $dependency_libs; do
+             deplibs="$deplib $deplibs"
+             if $opt_preserve_dup_deps; then
+               case "$tmp_libs " in
+               *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+               esac
+             fi
+             func_append tmp_libs " $deplib"
+           done
+         elif test prog != "$linkmode" && test lib != "$linkmode"; then
+           func_fatal_error "'$lib' is not a convenience library"
+         fi
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       if test -n "$old_library" &&
+          { test yes = "$prefer_static_libs" ||
+            test built,no = "$prefer_static_libs,$installed"; }; then
+         linklib=$old_library
+       else
+         for l in $old_library $library_names; do
+           linklib=$l
+         done
+       fi
+       if test -z "$linklib"; then
+         func_fatal_error "cannot find name of link library for '$lib'"
+       fi
+
+       # This library was specified with -dlopen.
+       if test dlopen = "$pass"; then
+         test -z "$libdir" \
+           && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+         if test -z "$dlname" ||
+            test yes != "$dlopen_support" ||
+            test no = "$build_libtool_libs"
+         then
+           # If there is no dlname, no dlopen support or we're linking
+           # statically, we need to preload.  We also need to preload any
+           # dependent libraries so libltdl's deplib preloader doesn't
+           # bomb out in the load deplibs phase.
+           func_append dlprefiles " $lib $dependency_libs"
+         else
+           func_append 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
+           func_warning "cannot determine absolute directory name of '$ladir'"
+           func_warning "passing it literally to the linker, although it might fail"
+           abs_ladir=$ladir
+         fi
+         ;;
+       esac
+       func_basename "$lib"
+       laname=$func_basename_result
+
+       # Find the relevant object directory and library name.
+       if test yes = "$installed"; then
+         if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           func_warning "library '$lib' was moved."
+           dir=$ladir
+           absdir=$abs_ladir
+           libdir=$abs_ladir
+         else
+           dir=$lt_sysroot$libdir
+           absdir=$lt_sysroot$libdir
+         fi
+         test yes = "$hardcode_automatic" && 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
+           func_append notinst_path " $abs_ladir"
+         else
+           dir=$ladir/$objdir
+           absdir=$abs_ladir/$objdir
+           # Remove this search path later
+           func_append notinst_path " $abs_ladir"
+         fi
+       fi # $installed = yes
+       func_stripname 'lib' '.la' "$laname"
+       name=$func_stripname_result
+
+       # This library was specified with -dlpreopen.
+       if test dlpreopen = "$pass"; then
+         if test -z "$libdir" && test prog = "$linkmode"; then
+           func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+         fi
+         case $host in
+           # special handling for platforms with PE-DLLs.
+           *cygwin* | *mingw* | *cegcc* )
+             # Linker will automatically link against shared library if both
+             # static and shared are present.  Therefore, ensure we extract
+             # symbols from the import library if a shared library is present
+             # (otherwise, the dlopen module name will be incorrect).  We do
+             # this by putting the import library name into $newdlprefiles.
+             # We recover the dlopen module name by 'saving' the la file
+             # name in a special purpose variable, and (later) extracting the
+             # dlname from the la file.
+             if test -n "$dlname"; then
+               func_tr_sh "$dir/$linklib"
+               eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+               func_append newdlprefiles " $dir/$linklib"
+             else
+               func_append newdlprefiles " $dir/$old_library"
+               # Keep a list of preopened convenience libraries to check
+               # that they are being used correctly in the link pass.
+               test -z "$libdir" && \
+                 func_append dlpreconveniencelibs " $dir/$old_library"
+             fi
+           ;;
+           * )
+             # Prefer using a static library (so that no silly _DYNAMIC symbols
+             # are required to link).
+             if test -n "$old_library"; then
+               func_append newdlprefiles " $dir/$old_library"
+               # Keep a list of preopened convenience libraries to check
+               # that they are being used correctly in the link pass.
+               test -z "$libdir" && \
+                 func_append dlpreconveniencelibs " $dir/$old_library"
+             # Otherwise, use the dlname, so that lt_dlopen finds it.
+             elif test -n "$dlname"; then
+               func_append newdlprefiles " $dir/$dlname"
+             else
+               func_append newdlprefiles " $dir/$linklib"
+             fi
+           ;;
+         esac
+       fi # $pass = dlpreopen
+
+       if test -z "$libdir"; then
+         # Link the convenience library
+         if test lib = "$linkmode"; then
+           deplibs="$dir/$old_library $deplibs"
+         elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then
+         func_append newlib_search_path " $ladir"
+         deplibs="$lib $deplibs"
+
+         linkalldeplibs=false
+         if test no != "$link_all_deplibs" || test -z "$library_names" ||
+            test no = "$build_libtool_libs"; then
+           linkalldeplibs=:
+         fi
+
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           case $deplib in
+           -L*) func_stripname '-L' '' "$deplib"
+                func_resolve_sysroot "$func_stripname_result"
+                func_append newlib_search_path " $func_resolve_sysroot_result"
+                ;;
+           esac
+           # Need to link against all dependency_libs?
+           if $linkalldeplibs; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           if $opt_preserve_dup_deps; then
+             case "$tmp_libs " in
+             *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+             esac
+           fi
+           func_append tmp_libs " $deplib"
+         done # for deplib
+         continue
+       fi # $linkmode = prog...
+
+       if test prog,link = "$linkmode,$pass"; then
+         if test -n "$library_names" &&
+            { { test no = "$prefer_static_libs" ||
+                test built,yes = "$prefer_static_libs,$installed"; } ||
+              test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+             # Make sure the rpath contains only unique directories.
+             case $temp_rpath: in
+             *"$absdir:"*) ;;
+             *) func_append 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 "*) ;;
+             *) func_append compile_rpath " $absdir" ;;
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) func_append finalize_rpath " $libdir" ;;
+             esac
+             ;;
+           esac
+         fi # $linkmode,$pass = prog,link...
+
+         if $alldeplibs &&
+            { test pass_all = "$deplibs_check_method" ||
+              { test yes = "$build_libtool_libs" &&
+                test -n "$library_names"; }; }; then
+           # We only need to search for static libraries
+           continue
+         fi
+       fi
+
+       link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test built = "$use_static_libs" && test yes = "$installed"; then
+         use_static_libs=no
+       fi
+       if test -n "$library_names" &&
+          { test no = "$use_static_libs" || test -z "$old_library"; }; then
+         case $host in
+         *cygwin* | *mingw* | *cegcc* | *os2*)
+             # No point in relinking DLLs because paths are not encoded
+             func_append notinst_deplibs " $lib"
+             need_relink=no
+           ;;
+         *)
+           if test no = "$installed"; then
+             func_append notinst_deplibs " $lib"
+             need_relink=yes
+           fi
+           ;;
+         esac
+         # This is a shared library
+
+         # Warn about portability, can't link against -module's on some
+         # systems (darwin).  Don't bleat about dlopened modules though!
+         dlopenmodule=
+         for dlpremoduletest in $dlprefiles; do
+           if test "X$dlpremoduletest" = "X$lib"; then
+             dlopenmodule=$dlpremoduletest
+             break
+           fi
+         done
+         if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+           echo
+           if test prog = "$linkmode"; then
+             $ECHO "*** Warning: Linking the executable $output against the loadable module"
+           else
+             $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+           fi
+           $ECHO "*** $linklib is not portable!"
+         fi
+         if test lib = "$linkmode" &&
+            test yes = "$hardcode_into_libs"; 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 "*) ;;
+             *) func_append compile_rpath " $absdir" ;;
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) func_append finalize_rpath " $libdir" ;;
+             esac
+             ;;
+           esac
+         fi
+
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           shift
+           realname=$1
+           shift
+           libname=`eval "\\$ECHO \"$libname_spec\""`
+           # use dlname if we got it. it's perfectly good, no?
+           if test -n "$dlname"; then
+             soname=$dlname
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+             *cygwin* | mingw* | *cegcc* | *os2*)
+               func_arith $current - $age
+               major=$func_arith_result
+               versuffix=-$major
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
+           else
+             soname=$realname
+           fi
+
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot=$soname
+           func_basename "$soroot"
+           soname=$func_basename_result
+           func_stripname 'lib' '.dll' "$soname"
+           newlib=libimp-$func_stripname_result.a
+
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
+           else
+             func_verbose "extracting exported symbol list from '$soname'"
+             func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+           fi
+
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             func_verbose "generating import library for '$soname'"
+             func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+           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 prog = "$linkmode" || test relink != "$opt_mode"; then
+           add_shlibpath=
+           add_dir=
+           add=
+           lib_linked=yes
+           case $hardcode_action in
+           immediate | unsupported)
+             if test no = "$hardcode_direct"; then
+               add=$dir/$linklib
+               case $host in
+                 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+                 *-*-sysv4*uw2*) add_dir=-L$dir ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) add_dir=-L$dir ;;
+                 *-*-darwin* )
+                   # if the lib is a (non-dlopened) module then we cannot
+                   # link against it, someone is ignoring the earlier warnings
+                   if /usr/bin/file -L $add 2> /dev/null |
+                        $GREP ": [^:]* bundle" >/dev/null; then
+                     if test "X$dlopenmodule" != "X$lib"; then
+                       $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+                       if test -z "$old_library"; then
+                         echo
+                         echo "*** And there doesn't seem to be a static archive available"
+                         echo "*** The link will probably fail, sorry"
+                       else
+                         add=$dir/$old_library
+                       fi
+                     elif test -n "$old_library"; then
+                       add=$dir/$old_library
+                     fi
+                   fi
+               esac
+             elif test no = "$hardcode_minus_L"; then
+               case $host in
+               *-*-sunos*) add_shlibpath=$dir ;;
+               esac
+               add_dir=-L$dir
+               add=-l$name
+             elif test no = "$hardcode_shlibpath_var"; then
+               add_shlibpath=$dir
+               add=-l$name
+             else
+               lib_linked=no
+             fi
+             ;;
+           relink)
+             if test yes = "$hardcode_direct" &&
+                test no = "$hardcode_direct_absolute"; then
+               add=$dir/$linklib
+             elif test yes = "$hardcode_minus_L"; then
+               add_dir=-L$absdir
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case $libdir in
+                   [\\/]*)
+                     func_append add_dir " -L$inst_prefix_dir$libdir"
+                     ;;
+                 esac
+               fi
+               add=-l$name
+             elif test yes = "$hardcode_shlibpath_var"; then
+               add_shlibpath=$dir
+               add=-l$name
+             else
+               lib_linked=no
+             fi
+             ;;
+           *) lib_linked=no ;;
+           esac
+
+           if test yes != "$lib_linked"; then
+             func_fatal_configuration "unsupported hardcode properties"
+           fi
+
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) func_append compile_shlibpath "$add_shlibpath:" ;;
+             esac
+           fi
+           if test prog = "$linkmode"; then
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+             if test yes != "$hardcode_direct" &&
+                test yes != "$hardcode_minus_L" &&
+                test yes = "$hardcode_shlibpath_var"; then
+               case :$finalize_shlibpath: in
+               *":$libdir:"*) ;;
+               *) func_append finalize_shlibpath "$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
+
+         if test prog = "$linkmode" || test relink = "$opt_mode"; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test yes = "$hardcode_direct" &&
+              test no = "$hardcode_direct_absolute"; then
+             add=$libdir/$linklib
+           elif test yes = "$hardcode_minus_L"; then
+             add_dir=-L$libdir
+             add=-l$name
+           elif test yes = "$hardcode_shlibpath_var"; then
+             case :$finalize_shlibpath: in
+             *":$libdir:"*) ;;
+             *) func_append finalize_shlibpath "$libdir:" ;;
+             esac
+             add=-l$name
+           elif test yes = "$hardcode_automatic"; then
+             if test -n "$inst_prefix_dir" &&
+                test -f "$inst_prefix_dir$libdir/$linklib"; then
+               add=$inst_prefix_dir$libdir/$linklib
+             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
+                 [\\/]*)
+                   func_append add_dir " -L$inst_prefix_dir$libdir"
+                   ;;
+               esac
+             fi
+             add=-l$name
+           fi
+
+           if test prog = "$linkmode"; 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 prog = "$linkmode"; then
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
+         if test unsupported != "$hardcode_direct"; then
+           test -n "$old_library" && linklib=$old_library
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
+         else
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+         fi
+       elif test yes = "$build_libtool_libs"; then
+         # Not a shared library
+         if test pass_all != "$deplibs_check_method"; then
+           # We're trying link a shared library against a static one
+           # but the system doesn't support it.
+
+           # Just print a warning and add the library to dependency_libs so
+           # that the program can be linked against the static library.
+           echo
+           $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+           echo "*** I have the capability to make that library automatically link in when"
+           echo "*** you link to this library.  But I can only do this if you have a"
+           echo "*** shared version of the library, which you do not appear to have."
+           if test yes = "$module"; then
+             echo "*** But as you try to build a module library, libtool will still create "
+             echo "*** a static module, that should work as long as the dlopening application"
+             echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             if test -z "$global_symbol_pipe"; then
+               echo
+               echo "*** However, this would only work if libtool was able to extract symbol"
+               echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+               echo "*** not find such a program.  So, this module is probably useless."
+               echo "*** 'nm' from GNU binutils and a full rebuild may help."
+             fi
+             if test no = "$build_old_libs"; 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 lib = "$linkmode"; then
+         if test -n "$dependency_libs" &&
+            { test yes != "$hardcode_into_libs" ||
+              test yes = "$build_old_libs" ||
+              test yes = "$link_static"; }; then
+           # Extract -R from dependency_libs
+           temp_deplibs=
+           for libdir in $dependency_libs; do
+             case $libdir in
+             -R*) func_stripname '-R' '' "$libdir"
+                  temp_xrpath=$func_stripname_result
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) func_append xrpath " $temp_xrpath";;
+                  esac;;
+             *) func_append temp_deplibs " $libdir";;
+             esac
+           done
+           dependency_libs=$temp_deplibs
+         fi
+
+         func_append newlib_search_path " $absdir"
+         # Link against this library
+         test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         # ... and its dependency_libs
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+           if $opt_preserve_dup_deps; then
+             case "$tmp_libs " in
+             *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+             esac
+           fi
+           func_append tmp_libs " $func_resolve_sysroot_result"
+         done
+
+         if test no != "$link_all_deplibs"; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             path=
+             case $deplib in
+             -L*) path=$deplib ;;
+             *.la)
+               func_resolve_sysroot "$deplib"
+               deplib=$func_resolve_sysroot_result
+               func_dirname "$deplib" "" "."
+               dir=$func_dirname_result
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   func_warning "cannot determine absolute directory name of '$dir'"
+                   absdir=$dir
+                 fi
+                 ;;
+               esac
+               if $GREP "^installed=no" $deplib > /dev/null; then
+               case $host in
+               *-*-darwin*)
+                 depdepl=
+                 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names"; then
+                   for tmp in $deplibrary_names; do
+                     depdepl=$tmp
+                   done
+                   if test -f "$absdir/$objdir/$depdepl"; then
+                     depdepl=$absdir/$objdir/$depdepl
+                     darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`$OTOOL64 -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+                     func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+                     func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+                     path=
+                   fi
+                 fi
+                 ;;
+               *)
+                 path=-L$absdir/$objdir
+                 ;;
+               esac
+               else
+                 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 test -z "$libdir" && \
+                   func_fatal_error "'$deplib' is not a valid libtool archive"
+                 test "$absdir" != "$libdir" && \
+                   func_warning "'$deplib' seems to be moved"
+
+                 path=-L$absdir
+               fi
+               ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$path $deplibs" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      if test link = "$pass"; then
+       if test prog = "$linkmode"; then
+         compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+         finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+       else
+         compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       fi
+      fi
+      dependency_libs=$newdependency_libs
+      if test dlpreopen = "$pass"; then
+       # Link the dlpreopened libraries before other libraries
+       for deplib in $save_deplibs; do
+         deplibs="$deplib $deplibs"
+       done
+      fi
+      if test dlopen != "$pass"; then
+       test conv = "$pass" || {
+         # Make sure lib_search_path contains only unique directories.
+         lib_search_path=
+         for dir in $newlib_search_path; do
+           case "$lib_search_path " in
+           *" $dir "*) ;;
+           *) func_append lib_search_path " $dir" ;;
+           esac
+         done
+         newlib_search_path=
+       }
+
+       if test prog,link = "$linkmode,$pass"; then
+         vars="compile_deplibs finalize_deplibs"
+       else
+         vars=deplibs
+       fi
+       for var in $vars dependency_libs; do
+         # Add libraries to $var in reverse order
+         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 "*) ;;
+             *) func_append tmp_libs " $deplib" ;;
+             esac
+             ;;
+           *) func_append tmp_libs " $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done # for var
+      fi
+
+      # Add Sun CC postdeps if required:
+      test CXX = "$tagname" && {
+        case $host_os in
+        linux*)
+          case `$CC -V 2>&1 | sed 5q` in
+          *Sun\ C*) # Sun C++ 5.9
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+
+        solaris*)
+          func_cc_basename "$CC"
+          case $func_cc_basename_result in
+          CC* | sunCC*)
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+        esac
+      }
+
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs; do
+       case " $predeps $postdeps $compiler_lib_search_path " in
+       *" $i "*)
+         i=
+         ;;
+       esac
+       if test -n "$i"; then
+         func_append tmp_libs " $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test prog = "$linkmode"; then
+      dlfiles=$newdlfiles
+    fi
+    if test prog = "$linkmode" || test lib = "$linkmode"; then
+      dlprefiles=$newdlprefiles
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+       func_warning "'-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "'-l' and '-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+       func_warning "'-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+       func_warning "'-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+       func_warning "'-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+       func_warning "'-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+       func_warning "'-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs=$output
+      func_append objs "$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form 'libNAME.la'.
+      case $outputname in
+      lib*)
+       func_stripname 'lib' '.la' "$outputname"
+       name=$func_stripname_result
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       test no = "$module" \
+         && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+       if test no != "$need_lib_prefix"; then
+         # Add the "lib" prefix for modules if required
+         func_stripname '' '.la' "$outputname"
+         name=$func_stripname_result
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         func_stripname '' '.la' "$outputname"
+         libname=$func_stripname_result
+       fi
+       ;;
+      esac
+
+      if test -n "$objs"; then
+       if test pass_all != "$deplibs_check_method"; then
+         func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+       else
+         echo
+         $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+         $ECHO "*** objects $objs is not portable!"
+         func_append libobjs " $objs"
+       fi
+      fi
+
+      test no = "$dlself" \
+       || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test 1 -lt "$#" \
+       && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+      install_libdir=$1
+
+      oldlibs=
+      if test -z "$rpath"; then
+       if test yes = "$build_libtool_libs"; 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
+
+       test -n "$vinfo" && \
+         func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+       test -n "$release" && \
+         func_warning "'-release' is ignored for convenience libraries"
+      else
+
+       # Parse the version information argument.
+       save_ifs=$IFS; IFS=:
+       set dummy $vinfo 0 0 0
+       shift
+       IFS=$save_ifs
+
+       test -n "$7" && \
+         func_fatal_help "too many parameters to '-version-info'"
+
+       # 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=$1
+         number_minor=$2
+         number_revision=$3
+         #
+         # There are really only two kinds -- those that
+         # use the current revision as the major version
+         # and those that subtract age and use age as
+         # a minor version.  But, then there is irix
+         # that has an extra 1 added just for fun
+         #
+         case $version_type in
+         # correct linux to gnu/linux during the next big refactor
+         darwin|freebsd-elf|linux|osf|windows|none)
+           func_arith $number_major + $number_minor
+           current=$func_arith_result
+           age=$number_minor
+           revision=$number_revision
+           ;;
+         freebsd-aout|qnx|sunos)
+           current=$number_major
+           revision=$number_minor
+           age=0
+           ;;
+         irix|nonstopux)
+           func_arith $number_major + $number_minor
+           current=$func_arith_result
+           age=$number_minor
+           revision=$number_minor
+           lt_irix_increment=no
+           ;;
+         *)
+           func_fatal_configuration "$modename: unknown library version type '$version_type'"
+           ;;
+         esac
+         ;;
+       no)
+         current=$1
+         revision=$2
+         age=$3
+         ;;
+       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]) ;;
+       *)
+         func_error "CURRENT '$current' must be a nonnegative integer"
+         func_fatal_error "'$vinfo' is not valid version information"
+         ;;
+       esac
+
+       case $revision in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "REVISION '$revision' must be a nonnegative integer"
+         func_fatal_error "'$vinfo' is not valid version information"
+         ;;
+       esac
+
+       case $age in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "AGE '$age' must be a nonnegative integer"
+         func_fatal_error "'$vinfo' is not valid version information"
+         ;;
+       esac
+
+       if test "$age" -gt "$current"; then
+         func_error "AGE '$age' is greater than the current interface number '$current'"
+         func_fatal_error "'$vinfo' is not valid version information"
+       fi
+
+       # Calculate the version variables.
+       major=
+       versuffix=
+       verstring=
+       case $version_type in
+       none) ;;
+
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=$major.$age.$revision
+         # Darwin ld doesn't like 0 for these options...
+         func_arith $current + 1
+         minor_current=$func_arith_result
+         xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+          # On Darwin other compilers
+          case $CC in
+              nagfor*)
+                  verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+                  ;;
+              *)
+                  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+                  ;;
+          esac
+         ;;
+
+       freebsd-aout)
+         major=.$current
+         versuffix=.$current.$revision
+         ;;
+
+       freebsd-elf)
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=$major.$age.$revision
+         ;;
+
+       irix | nonstopux)
+         if test no = "$lt_irix_increment"; then
+           func_arith $current - $age
+         else
+           func_arith $current - $age + 1
+         fi
+         major=$func_arith_result
+
+         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 0 -ne "$loop"; do
+           func_arith $revision - $loop
+           iface=$func_arith_result
+           func_arith $loop - 1
+           loop=$func_arith_result
+           verstring=$verstring_prefix$major.$iface:$verstring
+         done
+
+         # Before this point, $major must not contain '.'.
+         major=.$major
+         versuffix=$major.$revision
+         ;;
+
+       linux) # correct to gnu/linux during the next big refactor
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=$major.$age.$revision
+         ;;
+
+       osf)
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=.$current.$age.$revision
+         verstring=$current.$age.$revision
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$age
+         while test 0 -ne "$loop"; do
+           func_arith $current - $loop
+           iface=$func_arith_result
+           func_arith $loop - 1
+           loop=$func_arith_result
+           verstring=$verstring:$iface.0
+         done
+
+         # Make executables depend on our current version.
+         func_append verstring ":$current.0"
+         ;;
+
+       qnx)
+         major=.$current
+         versuffix=.$current
+         ;;
+
+       sco)
+         major=.$current
+         versuffix=.$current
+         ;;
+
+       sunos)
+         major=.$current
+         versuffix=.$current.$revision
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 file systems.
+         func_arith $current - $age
+         major=$func_arith_result
+         versuffix=-$major
+         ;;
+
+       *)
+         func_fatal_configuration "unknown library version type '$version_type'"
+         ;;
+       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 no = "$need_version"; then
+           versuffix=
+         else
+           versuffix=.0.0
+         fi
+       fi
+
+       # Remove version info from name if versioning should be avoided
+       if test yes,no = "$avoid_version,$need_version"; then
+         major=
+         versuffix=
+         verstring=
+       fi
+
+       # Check to see if the archive will have undefined symbols.
+       if test yes = "$allow_undefined"; then
+         if test unsupported = "$allow_undefined_flag"; then
+           if test yes = "$build_old_libs"; then
+             func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+             build_libtool_libs=no
+           else
+             func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+           fi
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag=$no_undefined_flag
+       fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" :
+      func_append libobjs " $symfileobj"
+      test " " = "$libobjs" && libobjs=
+
+      if test relink != "$opt_mode"; then
+       # Remove our outputs, but don't remove object files since they
+       # may have been created when compiling PIC objects.
+       removelist=
+       tempremovelist=`$ECHO "$output_objdir/*"`
+       for p in $tempremovelist; do
+         case $p in
+           *.$objext | *.gcno)
+              ;;
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+              if test -n "$precious_files_regex"; then
+                if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+                then
+                  continue
+                fi
+              fi
+              func_append removelist " $p"
+              ;;
+           *) ;;
+         esac
+       done
+       test -n "$removelist" && \
+         func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+       func_append oldlibs " $output_objdir/$libname.$libext"
+
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #        lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #        deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #        dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       temp_xrpath=
+       for libdir in $xrpath; do
+         func_replace_sysroot "$libdir"
+         func_append temp_xrpath " -R$func_replace_sysroot_result"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) func_append finalize_rpath " $libdir" ;;
+         esac
+       done
+       if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles=$dlfiles
+      dlfiles=
+      for lib in $old_dlfiles; do
+       case " $dlprefiles $dlfiles " in
+       *" $lib "*) ;;
+       *) func_append 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 "*) ;;
+       *) func_append dlprefiles " $lib" ;;
+       esac
+      done
+
+      if test yes = "$build_libtool_libs"; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           func_append deplibs " System.ltframework"
+           ;;
+         *-*-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 yes = "$build_libtool_need_lc"; then
+             func_append 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.
+         $opt_dry_run || $RM conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $opt_dry_run || $RM conftest
+         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   func_append newdeplibs " $i"
+                   i=
+                   ;;
+                 esac
+               fi
+               if test -n "$i"; then
+                 libname=`eval "\\$ECHO \"$libname_spec\""`
+                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                 set dummy $deplib_matches; shift
+                 deplib_match=$1
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+                   func_append newdeplibs " $i"
+                 else
+                   droppeddeps=yes
+                   echo
+                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                   echo "*** I have the capability to make that library automatically link in when"
+                   echo "*** you link to this library.  But I can only do this if you have a"
+                   echo "*** shared version of the library, which I believe you do not have"
+                   echo "*** because a test_compile did reveal that the linker did not use it for"
+                   echo "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+               ;;
+             *)
+               func_append newdeplibs " $i"
+               ;;
+             esac
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               $opt_dry_run || $RM conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     func_append newdeplibs " $i"
+                     i=
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i"; then
+                   libname=`eval "\\$ECHO \"$libname_spec\""`
+                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                   set dummy $deplib_matches; shift
+                   deplib_match=$1
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+                     func_append newdeplibs " $i"
+                   else
+                     droppeddeps=yes
+                     echo
+                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                     echo "*** I have the capability to make that library automatically link in when"
+                     echo "*** you link to this library.  But I can only do this if you have a"
+                     echo "*** shared version of the library, which you do not appear to have"
+                     echo "*** because a test_compile did reveal that the linker did not use this one"
+                     echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 echo
+                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+                 echo "*** make it link in!  You will probably need to install it or some"
+                 echo "*** library that it depends on before this library will be fully"
+                 echo "*** functional.  Installing it before continuing would be even better."
+               fi
+               ;;
+             *)
+               func_append newdeplibs " $i"
+               ;;
+             esac
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method; shift
+         file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           case $a_deplib in
+           -l*)
+             func_stripname -l '' "$a_deplib"
+             name=$func_stripname_result
+             if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 func_append newdeplibs " $a_deplib"
+                 a_deplib=
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib"; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               if test -n "$file_magic_glob"; then
+                 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+               else
+                 libnameglob=$libname
+               fi
+               test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 if test yes = "$want_nocaseglob"; then
+                   shopt -s nocaseglob
+                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+                   $nocaseglob
+                 else
+                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+                 fi
+                 for potent_lib in $potential_libs; do
+                     # Follow soft links.
+                     if ls -lLd "$potent_lib" 2>/dev/null |
+                        $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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+                        $SED -e 10q |
+                        $EGREP "$file_magic_regex" > /dev/null; then
+                       func_append 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
+             ;;
+           *)
+             # Add a -L argument.
+             func_append newdeplibs " $a_deplib"
+             ;;
+           esac
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method; shift
+         match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           case $a_deplib in
+           -l*)
+             func_stripname -l '' "$a_deplib"
+             name=$func_stripname_result
+             if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 func_append 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
+                     func_append 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
+             ;;
+           *)
+             # Add a -L argument.
+             func_append newdeplibs " $a_deplib"
+             ;;
+           esac
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=
+         tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+         if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+           for i in $predeps $postdeps; do
+             # can't use Xsed below, because $i might contain '/'
+             tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+           done
+         fi
+         case $tmp_deplibs in
+         *[!\  \ ]*)
+           echo
+           if test none = "$deplibs_check_method"; then
+             echo "*** Warning: inter-library dependencies are not supported in this platform."
+           else
+             echo "*** Warning: inter-library dependencies are not known to be supported."
+           fi
+           echo "*** All declared inter-library dependencies are being dropped."
+           droppeddeps=yes
+           ;;
+         esac
+         ;;
+       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 with the System framework
+         newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+         ;;
+       esac
+
+       if test yes = "$droppeddeps"; then
+         if test yes = "$module"; then
+           echo
+           echo "*** Warning: libtool could not satisfy all declared inter-library"
+           $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+           echo "*** a static module, that should work as long as the dlopening"
+           echo "*** application is linked with the -dlopen flag."
+           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 no = "$build_old_libs"; then
+             oldlibs=$output_objdir/$libname.$libext
+             build_libtool_libs=module
+             build_old_libs=yes
+           else
+             build_libtool_libs=no
+           fi
+         else
+           echo "*** The inter-library dependencies that have been dropped here will be"
+           echo "*** automatically added whenever a program is linked with this library"
+           echo "*** or is declared to -dlopen it."
+
+           if test no = "$allow_undefined"; then
+             echo
+             echo "*** Since this library must not contain undefined symbols,"
+             echo "*** because either the platform does not support them or"
+             echo "*** it was explicitly requested with -no-undefined,"
+             echo "*** libtool will only create a static version of it."
+             if test no = "$build_old_libs"; then
+               oldlibs=$output_objdir/$libname.$libext
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         fi
+       fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+       *-*-darwin*)
+         newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+         ;;
+      esac
+
+      # 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 "*)
+           func_append new_libs " -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) func_append new_libs " $deplib" ;;
+         esac
+         ;;
+       *) func_append 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 yes = "$build_libtool_libs"; then
+       # Remove $wl instances when linking with ld.
+       # FIXME: should test the right _cmds variable.
+       case $archive_cmds in
+         *\$LD\ *) wl= ;;
+        esac
+       if test yes = "$hardcode_into_libs"; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath=$finalize_rpath
+         test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+         for libdir in $rpath; do
+           if test -n "$hardcode_libdir_flag_spec"; then
+             if test -n "$hardcode_libdir_separator"; then
+               func_replace_sysroot "$libdir"
+               libdir=$func_replace_sysroot_result
+               if test -z "$hardcode_libdirs"; then
+                 hardcode_libdirs=$libdir
+               else
+                 # Just accumulate the unique libdirs.
+                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                   ;;
+                 *)
+                   func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               func_append dep_rpath " $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) func_append perm_rpath " $libdir" ;;
+             esac
+           fi
+         done
+         # Substitute the hardcoded libdirs into the rpath.
+         if test -n "$hardcode_libdir_separator" &&
+            test -n "$hardcode_libdirs"; then
+           libdir=$hardcode_libdirs
+           eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             func_append rpath "$dir:"
+           done
+           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+         fi
+         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+       fi
+
+       shlibpath=$finalize_shlibpath
+       test relink = "$opt_mode" || 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
+       shift
+       realname=$1
+       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
+         func_append linknames " $link"
+       done
+
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+       test "X$libobjs" = "X " && libobjs=
+
+       delfiles=
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+         export_symbols=$output_objdir/$libname.uexp
+         func_append delfiles " $export_symbols"
+       fi
+
+       orig_export_symbols=
+       case $host_os in
+       cygwin* | mingw* | cegcc*)
+         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+           # exporting using user supplied symfile
+           func_dll_def_p "$export_symbols" || {
+             # and it's NOT already a .def file. Must figure out
+             # which of the given symbols are data symbols and tag
+             # them as such. So, trigger use of export_symbols_cmds.
+             # export_symbols gets reassigned inside the "prepare
+             # the list of exported symbols" if statement, so the
+             # include_expsyms logic still works.
+             orig_export_symbols=$export_symbols
+             export_symbols=
+             always_export_symbols=yes
+           }
+         fi
+         ;;
+       esac
+
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+           func_verbose "generating symbol list for '$libname.la'"
+           export_symbols=$output_objdir/$libname.exp
+           $opt_dry_run || $RM $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs=$IFS; IFS='~'
+           for cmd1 in $cmds; do
+             IFS=$save_ifs
+             # Take the normal branch if the nm_file_list_spec branch
+             # doesn't work or if tool conversion is not needed.
+             case $nm_file_list_spec~$to_tool_file_cmd in
+               *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+                 try_normal_branch=yes
+                 eval cmd=\"$cmd1\"
+                 func_len " $cmd"
+                 len=$func_len_result
+                 ;;
+               *)
+                 try_normal_branch=no
+                 ;;
+             esac
+             if test yes = "$try_normal_branch" \
+                && { test "$len" -lt "$max_cmd_len" \
+                     || test "$max_cmd_len" -le -1; }
+             then
+               func_show_eval "$cmd" 'exit $?'
+               skipped_export=false
+             elif test -n "$nm_file_list_spec"; then
+               func_basename "$output"
+               output_la=$func_basename_result
+               save_libobjs=$libobjs
+               save_output=$output
+               output=$output_objdir/$output_la.nm
+               func_to_tool_file "$output"
+               libobjs=$nm_file_list_spec$func_to_tool_file_result
+               func_append delfiles " $output"
+               func_verbose "creating $NM input file list: $output"
+               for obj in $save_libobjs; do
+                 func_to_tool_file "$obj"
+                 $ECHO "$func_to_tool_file_result"
+               done > "$output"
+               eval cmd=\"$cmd1\"
+               func_show_eval "$cmd" 'exit $?'
+               output=$save_output
+               libobjs=$save_libobjs
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               func_verbose "using reloadable object file for export list..."
+               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" && test : != "$skipped_export"; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
+
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         tmp_export_symbols=$export_symbols
+         test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+         $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+       fi
+
+       if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+         # The given exports_symbols file has to be filtered, so filter it.
+         func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+         # FIXME: $output_objdir/$libname.filter potentially contains lots of
+         # 's' commands, which not all seds can handle. GNU sed should be fine
+         # though. Also, the filter scales superlinearly with the number of
+         # global variables. join(1) would be nice here, but unfortunately
+         # isn't a blessed tool.
+         $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+         func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+         export_symbols=$output_objdir/$libname.def
+         $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+       fi
+
+       tmp_deplibs=
+       for test_deplib in $deplibs; do
+         case " $convenience " in
+         *" $test_deplib "*) ;;
+         *)
+           func_append tmp_deplibs " $test_deplib"
+           ;;
+         esac
+       done
+       deplibs=$tmp_deplibs
+
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec" &&
+           test yes = "$compiler_needs_object" &&
+           test -z "$libobjs"; then
+           # extract the archives, so we have objects to list.
+           # TODO: could optimize this to just extract one archive.
+           whole_archive_flag_spec=
+         fi
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         else
+           gentop=$output_objdir/${outputname}x
+           func_append generated " $gentop"
+
+           func_extract_archives $gentop $convenience
+           func_append libobjs " $func_extract_archives_result"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+       fi
+
+       if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         func_append linker_flags " $flag"
+       fi
+
+       # Make a backup of the uninstalled library when relinking
+       if test relink = "$opt_mode"; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+       fi
+
+       # Do each of the archive commands.
+       if test yes = "$module" && test -n "$module_cmds"; then
+         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+           eval test_cmds=\"$module_expsym_cmds\"
+           cmds=$module_expsym_cmds
+         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 : != "$skipped_export" &&
+          func_len " $test_cmds" &&
+          len=$func_len_result &&
+          test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise
+         # or, if using GNU ld and skipped_export is not :, use a linker
+         # script.
+
+         # 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
+         func_basename "$output"
+         output_la=$func_basename_result
+
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         last_robj=
+         k=1
+
+         if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+           output=$output_objdir/$output_la.lnkscript
+           func_verbose "creating GNU ld script: $output"
+           echo 'INPUT (' > $output
+           for obj in $save_libobjs
+           do
+             func_to_tool_file "$obj"
+             $ECHO "$func_to_tool_file_result" >> $output
+           done
+           echo ')' >> $output
+           func_append delfiles " $output"
+           func_to_tool_file "$output"
+           output=$func_to_tool_file_result
+         elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+           output=$output_objdir/$output_la.lnk
+           func_verbose "creating linker input file list: $output"
+           : > $output
+           set x $save_libobjs
+           shift
+           firstobj=
+           if test yes = "$compiler_needs_object"; then
+             firstobj="$1 "
+             shift
+           fi
+           for obj
+           do
+             func_to_tool_file "$obj"
+             $ECHO "$func_to_tool_file_result" >> $output
+           done
+           func_append delfiles " $output"
+           func_to_tool_file "$output"
+           output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+         else
+           if test -n "$save_libobjs"; then
+             func_verbose "creating reloadable object files..."
+             output=$output_objdir/$output_la-$k.$objext
+             eval test_cmds=\"$reload_cmds\"
+             func_len " $test_cmds"
+             len0=$func_len_result
+             len=$len0
+
+             # Loop over the list of objects to be linked.
+             for obj in $save_libobjs
+             do
+               func_len " $obj"
+               func_arith $len + $func_len_result
+               len=$func_arith_result
+               if test -z "$objlist" ||
+                  test "$len" -lt "$max_cmd_len"; then
+                 func_append objlist " $obj"
+               else
+                 # The command $test_cmds is almost too long, add a
+                 # command to the queue.
+                 if test 1 -eq "$k"; then
+                   # The first file doesn't have a previous command to add.
+                   reload_objs=$objlist
+                   eval concat_cmds=\"$reload_cmds\"
+                 else
+                   # All subsequent reloadable object files will link in
+                   # the last one created.
+                   reload_objs="$objlist $last_robj"
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+                 fi
+                 last_robj=$output_objdir/$output_la-$k.$objext
+                 func_arith $k + 1
+                 k=$func_arith_result
+                 output=$output_objdir/$output_la-$k.$objext
+                 objlist=" $obj"
+                 func_len " $last_robj"
+                 func_arith $len0 + $func_len_result
+                 len=$func_arith_result
+               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~
+             reload_objs="$objlist $last_robj"
+             eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+             fi
+             func_append delfiles " $output"
+
+           else
+             output=
+           fi
+
+           ${skipped_export-false} && {
+             func_verbose "generating symbol list for '$libname.la'"
+             export_symbols=$output_objdir/$libname.exp
+             $opt_dry_run || $RM $export_symbols
+             libobjs=$output
+             # Append the command to create the export file.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+             fi
+           }
+
+           test -n "$save_libobjs" &&
+             func_verbose "creating a temporary reloadable object file: $output"
+
+           # Loop through the commands generated above and execute them.
+           save_ifs=$IFS; IFS='~'
+           for cmd in $concat_cmds; do
+             IFS=$save_ifs
+             $opt_quiet || {
+                 func_quote_for_expand "$cmd"
+                 eval "func_echo $func_quote_for_expand_result"
+             }
+             $opt_dry_run || eval "$cmd" || {
+               lt_exit=$?
+
+               # Restore the uninstalled library and exit
+               if test relink = "$opt_mode"; then
+                 ( cd "$output_objdir" && \
+                   $RM "${realname}T" && \
+                   $MV "${realname}U" "$realname" )
+               fi
+
+               exit $lt_exit
+             }
+           done
+           IFS=$save_ifs
+
+           if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+
+          ${skipped_export-false} && {
+           if test -n "$export_symbols" && test -n "$include_expsyms"; then
+             tmp_export_symbols=$export_symbols
+             test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+             $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+           fi
+
+           if test -n "$orig_export_symbols"; then
+             # The given exports_symbols file has to be filtered, so filter it.
+             func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+             # FIXME: $output_objdir/$libname.filter potentially contains lots of
+             # 's' commands, which not all seds can handle. GNU sed should be fine
+             # though. Also, the filter scales superlinearly with the number of
+             # global variables. join(1) would be nice here, but unfortunately
+             # isn't a blessed tool.
+             $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+             func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+             export_symbols=$output_objdir/$libname.def
+             $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+           fi
+         }
+
+         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\"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+         # Expand the library linking commands again to reset the
+         # value of $libobjs for piecewise linking.
+
+         # Do each of the archive commands.
+         if test yes = "$module" && test -n "$module_cmds"; then
+           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+             cmds=$module_expsym_cmds
+           else
+             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
+       fi
+
+       if test -n "$delfiles"; then
+         # Append the command to remove temporary files to $cmds.
+         eval cmds=\"\$cmds~\$RM $delfiles\"
+       fi
+
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop=$output_objdir/${outputname}x
+         func_append generated " $gentop"
+
+         func_extract_archives $gentop $dlprefiles
+         func_append libobjs " $func_extract_archives_result"
+         test "X$libobjs" = "X " && libobjs=
+       fi
+
+       save_ifs=$IFS; IFS='~'
+       for cmd in $cmds; do
+         IFS=$sp$nl
+         eval cmd=\"$cmd\"
+         IFS=$save_ifs
+         $opt_quiet || {
+           func_quote_for_expand "$cmd"
+           eval "func_echo $func_quote_for_expand_result"
+         }
+         $opt_dry_run || eval "$cmd" || {
+           lt_exit=$?
+
+           # Restore the uninstalled library and exit
+           if test relink = "$opt_mode"; then
+             ( 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 relink = "$opt_mode"; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             func_show_eval '${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
+           func_show_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 yes = "$module" || test yes = "$export_dynamic"; then
+         # On all known operating systems, these are identical.
+         dlname=$soname
+       fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+       func_warning "'-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "'-l' and '-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+       func_warning "'-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+       func_warning "'-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+       func_warning "'-version-info' is ignored for objects"
+
+      test -n "$release" && \
+       func_warning "'-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+       test -n "$objs$old_deplibs" && \
+         func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+       libobj=$output
+       func_lo2o "$libobj"
+       obj=$func_lo2o_result
+       ;;
+      *)
+       libobj=
+       obj=$output
+       ;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_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=
+      # if reload_cmds runs $LD directly, get rid of -Wl from
+      # whole_archive_flag_spec and hope we can get by with turning comma
+      # into space.
+      case $reload_cmds in
+        *\$LD[\ \$]*) wl= ;;
+      esac
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+         test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+         reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+       else
+         gentop=$output_objdir/${obj}x
+         func_append generated " $gentop"
+
+         func_extract_archives $gentop $convenience
+         reload_conv_objs="$reload_objs $func_extract_archives_result"
+       fi
+      fi
+
+      # If we're not building shared, we need to use non_pic_objs
+      test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+      # Create the old-style object.
+      reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+      output=$obj
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      test yes = "$build_libtool_libs" || {
+       if test -n "$gentop"; then
+         func_show_eval '${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"
+       # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+       exit $EXIT_SUCCESS
+      }
+
+      if test -n "$pic_flag" || test default != "$pic_mode"; then
+       # Only do commands if we really have different PIC objects.
+       reload_objs="$libobjs $reload_conv_objs"
+       output=$libobj
+       func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+       func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+       *cygwin*) func_stripname '' '.exe' "$output"
+                 output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+       func_warning "'-version-info' is ignored for programs"
+
+      test -n "$release" && \
+       func_warning "'-release' is ignored for programs"
+
+      $preload \
+       && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+       && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+       ;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+       # Don't allow lazy linking, it breaks C++ global constructors
+       # But is supposedly fixed on 10.4 or later (yay!).
+       if test CXX = "$tagname"; then
+         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+           10.[0123])
+             func_append compile_command " $wl-bind_at_load"
+             func_append finalize_command " $wl-bind_at_load"
+           ;;
+         esac
+       fi
+       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+       ;;
+      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 "*)
+           func_append new_libs " -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $compile_deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) func_append new_libs " $deplib" ;;
+         esac
+         ;;
+       *) func_append new_libs " $deplib" ;;
+       esac
+      done
+      compile_deplibs=$new_libs
+
+
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       for libdir in $rpath $xrpath; do
+         # This is the magic to use -rpath.
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) func_append 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"*)
+               ;;
+             *)
+               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           func_append rpath " $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) func_append perm_rpath " $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         ::) dllsearchpath=$libdir;;
+         *) func_append dllsearchpath ":$libdir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         ::) dllsearchpath=$testbindir;;
+         *) func_append 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"*)
+               ;;
+             *)
+               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           func_append rpath " $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) func_append finalize_perm_rpath " $libdir" ;;
+         esac
+       fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir=$hardcode_libdirs
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath=$rpath
+
+      if test -n "$libobjs" && test yes = "$build_old_libs"; then
+       # Transform all the library objects into standard objects.
+       compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+       finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+       func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=:
+      case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=false
+        ;;
+      *cygwin* | *mingw* )
+        test yes = "$build_libtool_libs" || wrappers_required=false
+        ;;
+      *)
+        if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+          wrappers_required=false
+        fi
+        ;;
+      esac
+      $wrappers_required || {
+       # Replace the output file specification.
+       compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+       link_command=$compile_command$compile_rpath
+
+       # We have no uninstalled library dependencies, so finalize right now.
+       exit_status=0
+       func_show_eval "$link_command" 'exit_status=$?'
+
+       if test -n "$postlink_cmds"; then
+         func_to_tool_file "$output"
+         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+         func_execute_cmds "$postlink_cmds" 'exit $?'
+       fi
+
+       # Delete the generated files.
+       if test -f "$output_objdir/${outputname}S.$objext"; then
+         func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+       fi
+
+       exit $exit_status
+      }
+
+      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
+           func_append 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
+           func_append rpath "$dir:"
+         done
+         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+      fi
+
+      if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $opt_dry_run || $RM $output
+       # Link the executable and exit
+       func_show_eval "$link_command" 'exit $?'
+
+       if test -n "$postlink_cmds"; then
+         func_to_tool_file "$output"
+         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+         func_execute_cmds "$postlink_cmds" 'exit $?'
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      case $hardcode_action,$fast_install in
+        relink,*)
+         # Fast installation is not supported
+         link_command=$compile_var$compile_command$compile_rpath
+         relink_command=$finalize_var$finalize_command$finalize_rpath
+
+         func_warning "this platform does not like uninstalled shared libraries"
+         func_warning "'$output' will be relinked during installation"
+         ;;
+        *,yes)
+         link_command=$finalize_var$compile_command$finalize_rpath
+         relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+          ;;
+       *,no)
+         link_command=$compile_var$compile_command$compile_rpath
+         relink_command=$finalize_var$finalize_command$finalize_rpath
+          ;;
+       *,needless)
+         link_command=$finalize_var$compile_command$finalize_rpath
+         relink_command=
+          ;;
+      esac
+
+      # Replace the output file specification.
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      if test -n "$postlink_cmds"; then
+       func_to_tool_file "$output_objdir/$outputname"
+       postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+       func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # 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}\" || $lt_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
+           func_quote_for_eval "$var_value"
+           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) func_stripname '' '.exe' "$output"
+                output=$func_stripname_result ;;
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           func_stripname '' '.exe' "$outputname"
+           outputname=$func_stripname_result ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+           func_dirname_and_basename "$output" "" "."
+           output_name=$func_basename_result
+           output_path=$func_dirname_result
+           cwrappersource=$output_path/$objdir/lt-$output_name.c
+           cwrapper=$output_path/$output_name.exe
+           $RM $cwrappersource $cwrapper
+           trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_cwrapperexe_src > $cwrappersource
+
+           # The wrapper executable is built using the $host compiler,
+           # because it contains $host paths and files. If cross-
+           # compiling, it, like the target executable, must be
+           # executed on the $host or under an emulation environment.
+           $opt_dry_run || {
+             $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+             $STRIP $cwrapper
+           }
+
+           # Now, create the wrapper script for func_source use:
+           func_ltwrapper_scriptname $cwrapper
+           $RM $func_ltwrapper_scriptname_result
+           trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+           $opt_dry_run || {
+             # note: this script will not be executed, so do not chmod.
+             if test "x$build" = "x$host"; then
+               $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+             else
+               func_emit_wrapper no > $func_ltwrapper_scriptname_result
+             fi
+           }
+         ;;
+         * )
+           $RM $output
+           trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_wrapper no > $output
+           chmod +x $output
+         ;;
+       esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      case $build_libtool_libs in
+        convenience)
+         oldobjs="$libobjs_save $symfileobj"
+         addlibs=$convenience
+         build_libtool_libs=no
+         ;;
+       module)
+         oldobjs=$libobjs_save
+         addlibs=$old_convenience
+         build_libtool_libs=no
+          ;;
+       *)
+         oldobjs="$old_deplibs $non_pic_objects"
+         $preload && test -f "$symfileobj" \
+           && func_append oldobjs " $symfileobj"
+         addlibs=$old_convenience
+         ;;
+      esac
+
+      if test -n "$addlibs"; then
+       gentop=$output_objdir/${outputname}x
+       func_append generated " $gentop"
+
+       func_extract_archives $gentop $addlibs
+       func_append oldobjs " $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+       cmds=$old_archive_from_new_cmds
+      else
+
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop=$output_objdir/${outputname}x
+         func_append generated " $gentop"
+
+         func_extract_archives $gentop $dlprefiles
+         func_append oldobjs " $func_extract_archives_result"
+       fi
+
+       # 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
+             func_basename "$obj"
+             $ECHO "$func_basename_result"
+           done | sort | sort -uc >/dev/null 2>&1); then
+         :
+       else
+         echo "copying selected object files to avoid basename conflicts..."
+         gentop=$output_objdir/${outputname}x
+         func_append generated " $gentop"
+         func_mkdir_p "$gentop"
+         save_oldobjs=$oldobjs
+         oldobjs=
+         counter=1
+         for obj in $save_oldobjs
+         do
+           func_basename "$obj"
+           objbase=$func_basename_result
+           case " $oldobjs " in
+           " ") oldobjs=$obj ;;
+           *[\ /]"$objbase "*)
+             while :; do
+               # Make sure we don't pick an alternate name that also
+               # overlaps.
+               newobj=lt$counter-$objbase
+               func_arith $counter + 1
+               counter=$func_arith_result
+               case " $oldobjs " in
+               *[\ /]"$newobj "*) ;;
+               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+               esac
+             done
+             func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+             func_append oldobjs " $gentop/$newobj"
+             ;;
+           *) func_append oldobjs " $obj" ;;
+           esac
+         done
+       fi
+       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+       tool_oldlib=$func_to_tool_file_result
+       eval cmds=\"$old_archive_cmds\"
+
+       func_len " $cmds"
+       len=$func_len_result
+       if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       elif test -n "$archiver_list_spec"; then
+         func_verbose "using command file archive linking..."
+         for obj in $oldobjs
+         do
+           func_to_tool_file "$obj"
+           $ECHO "$func_to_tool_file_result"
+         done > $output_objdir/$libname.libcmd
+         func_to_tool_file "$output_objdir/$libname.libcmd"
+         oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         func_verbose "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$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
+         eval test_cmds=\"$old_archive_cmds\"
+         func_len " $test_cmds"
+         len0=$func_len_result
+         len=$len0
+         for obj in $save_oldobjs
+         do
+           func_len " $obj"
+           func_arith $len + $func_len_result
+           len=$func_arith_result
+           func_append objlist " $obj"
+           if test "$len" -lt "$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=
+             len=$len0
+           fi
+         done
+         RANLIB=$save_RANLIB
+         oldobjs=$objlist
+         if test -z "$oldobjs"; then
+           eval cmds=\"\$concat_cmds\"
+         else
+           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+         fi
+       fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test yes = "$build_old_libs" && old_library=$libname.$libext
+      func_verbose "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}\" || $lt_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
+         func_quote_for_eval "$var_value"
+         relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"`
+      if test yes = "$hardcode_automatic"; then
+       relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+       for installed in no yes; do
+         if test yes = "$installed"; 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)
+               func_basename "$deplib"
+               name=$func_basename_result
+               func_resolve_sysroot "$deplib"
+               eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+               test -z "$libdir" && \
+                 func_fatal_error "'$deplib' is not a valid libtool archive"
+               func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             -L*)
+               func_stripname -L '' "$deplib"
+               func_replace_sysroot "$func_stripname_result"
+               func_append newdependency_libs " -L$func_replace_sysroot_result"
+               ;;
+             -R*)
+               func_stripname -R '' "$deplib"
+               func_replace_sysroot "$func_stripname_result"
+               func_append newdependency_libs " -R$func_replace_sysroot_result"
+               ;;
+             *) func_append newdependency_libs " $deplib" ;;
+             esac
+           done
+           dependency_libs=$newdependency_libs
+           newdlfiles=
+
+           for lib in $dlfiles; do
+             case $lib in
+             *.la)
+               func_basename "$lib"
+               name=$func_basename_result
+               eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "'$lib' is not a valid libtool archive"
+               func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             *) func_append newdlfiles " $lib" ;;
+             esac
+           done
+           dlfiles=$newdlfiles
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+             *.la)
+               # Only pass preopened files to the pseudo-archive (for
+               # eventual linking with the app. that links it) if we
+               # didn't already link the preopened objects directly into
+               # the library:
+               func_basename "$lib"
+               name=$func_basename_result
+               eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "'$lib' is not a valid libtool archive"
+               func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+               ;;
+             esac
+           done
+           dlprefiles=$newdlprefiles
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             func_append newdlfiles " $abs"
+           done
+           dlfiles=$newdlfiles
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             func_append newdlprefiles " $abs"
+           done
+           dlprefiles=$newdlprefiles
+         fi
+         $RM $output
+         # place dlname in correct position for cygwin
+         # In fact, it would be nice if we could use this code for all target
+         # systems that can't hard-code library paths into their executables
+         # and that have no shared library path variable independent of PATH,
+         # but it turns out we can't easily determine that from inspecting
+         # libtool variables, so we have to hard-code the OSs to which it
+         # applies here; at the moment, that means platforms that use the PE
+         # object format with DLL files.  See the long comment at the top of
+         # tests/bindir.at for full details.
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+             # If a -bindir argument was supplied, place the dll there.
+             if test -n "$bindir"; then
+               func_relative_path "$install_libdir" "$bindir"
+               tdlname=$func_relative_path_result/$dlname
+             else
+               # Otherwise fall back on heuristic.
+               tdlname=../bin/$dlname
+             fi
+             ;;
+         esac
+         $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# 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'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then
+           $ECHO >> $output "\
+relink_command=\"$relink_command\""
+         fi
+       done
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+  func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $debug_cmd
+
+    RM=$nonopt
+    files=
+    rmforce=false
+    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) func_append RM " $arg"; rmforce=: ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir=$func_dirname_result
+      if test . = "$dir"; then
+       odir=$objdir
+      else
+       odir=$dir/$objdir
+      fi
+      func_basename "$file"
+      name=$func_basename_result
+      test uninstall = "$opt_mode" && odir=$dir
+
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test clean = "$opt_mode"; then
+       case " $rmdirs " in
+         *" $odir "*) ;;
+         *) func_append rmdirs " $odir" ;;
+       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 $rmforce; then
+       continue
+      fi
+
+      rmfiles=$file
+
+      case $name in
+      *.la)
+       # Possibly a libtool archive, so verify it.
+       if func_lalib_p "$file"; then
+         func_source $dir/$name
+
+         # Delete the libtool libraries and symlinks.
+         for n in $library_names; do
+           func_append rmfiles " $odir/$n"
+         done
+         test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+         case $opt_mode in
+         clean)
+           case " $library_names " in
+           *" $dlname "*) ;;
+           *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+           esac
+           test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+           ;;
+         uninstall)
+           if test -n "$library_names"; then
+             # Do each command in the postuninstall commands.
+             func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+           fi
+
+           if test -n "$old_library"; then
+             # Do each command in the old_postuninstall commands.
+             func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+           fi
+           # FIXME: should reinstall the best remaining shared library.
+           ;;
+         esac
+       fi
+       ;;
+
+      *.lo)
+       # Possibly a libtool object, so verify it.
+       if func_lalib_p "$file"; then
+
+         # Read the .lo file
+         func_source $dir/$name
+
+         # Add PIC object to the list of files to remove.
+         if test -n "$pic_object" && test none != "$pic_object"; then
+           func_append rmfiles " $dir/$pic_object"
+         fi
+
+         # Add non-PIC object to the list of files to remove.
+         if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+           func_append rmfiles " $dir/$non_pic_object"
+         fi
+       fi
+       ;;
+
+      *)
+       if test clean = "$opt_mode"; then
+         noexename=$name
+         case $file in
+         *.exe)
+           func_stripname '' '.exe' "$file"
+           file=$func_stripname_result
+           func_stripname '' '.exe' "$name"
+           noexename=$func_stripname_result
+           # $file with .exe has already been added to rmfiles,
+           # add $file without .exe
+           func_append rmfiles " $file"
+           ;;
+         esac
+         # Do a test to see if this is a libtool program.
+         if func_ltwrapper_p "$file"; then
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             relink_command=
+             func_source $func_ltwrapper_scriptname_result
+             func_append rmfiles " $func_ltwrapper_scriptname_result"
+           else
+             relink_command=
+             func_source $dir/$noexename
+           fi
+
+           # note $name still contains .exe if it was in $file originally
+           # as does the version of $file that was added into $rmfiles
+           func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+           if test yes = "$fast_install" && test -n "$relink_command"; then
+             func_append rmfiles " $odir/lt-$name"
+           fi
+           if test "X$noexename" != "X$name"; then
+             func_append rmfiles " $odir/lt-$noexename.c"
+           fi
+         fi
+       fi
+       ;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+
+    # Try to remove the $objdir's in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+       func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+  func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+  help=$generic_help
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# 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
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/m4/ax_cflags_warn_all_ansi.m4 b/m4/ax_cflags_warn_all_ansi.m4
deleted file mode 100644 (file)
index 53f21cc..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-# ===========================================================================
-#        http://autoconf-archive.cryp.to/ax_cflags_warn_all_ansi.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CFLAGS_WARN_ALL_ANSI [(shellvar [,default, [A/NA]])]
-#
-# DESCRIPTION
-#
-#   Try to find a compiler option that enables most reasonable warnings.
-#   This macro is directly derived from VL_PROG_CC_WARNINGS which is split
-#   up into two AX_CFLAGS_WARN_ALL and AX_CFLAGS_WARN_ALL_ANSI
-#
-#   For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
-#   result is added to the shellvar being CFLAGS by default.
-#
-#   Currently this macro knows about GCC, Solaris C compiler, Digital Unix C
-#   compiler, C for AIX Compiler, HP-UX C compiler, IRIX C compiler, NEC
-#   SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos 10.0.0.8) C
-#   compiler.
-#
-#    - $1 shell-variable-to-add-to : CFLAGS
-#    - $2 add-value-if-not-found : nothing
-#    - $3 action-if-found : add value to shellvariable
-#    - $4 action-if-not-found : nothing
-#
-# LAST MODIFICATION
-#
-#   2008-04-12
-#
-# COPYLEFT
-#
-#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-#
-#   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, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Macro Archive. When you make and
-#   distribute a modified version of the Autoconf Macro, you may extend this
-#   special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_C
- ac_save_[]FLAGS="$[]FLAGS"
-# IRIX C compiler:
-#      -use_readonly_const is the default for IRIX C,
-#       puts them into .rodata, but they are copied later.
-#       need to be "-G0 -rdatashared" for strictmode but
-#       I am not sure what effect that has really.         - guidod
-for ac_arg dnl
-in "-pedantic  % -Wall -ansi -pedantic"       dnl   GCC
-   "-xstrconst % -v -Xc"                      dnl Solaris C
-   "-std1      % -verbose -w0 -warnprotos -std1" dnl Digital Unix
-   " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
-   " % -ansi -ansiE -fullwarn"                dnl IRIX
-   "+ESlit     % +w1 -Aa"                     dnl HP-UX C
-   "-Xc        % -pvctl[,]fullmsg -Xc"        dnl NEC SX-5 (Super-UX 10)
-   "-h conform % -h msglevel 2 -h conform"    dnl Cray C (Unicos)
-   #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-   AC_TRY_COMPILE([],[return 0;],
-   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
-     .ok|.ok,*) m4_ifvaln($3,$3) ;;
-   .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
-        AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
-                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
-   *) m4_ifvaln($3,$3,[
-   if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
-   then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
-   else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
-                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
-   fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
-
-dnl the only difference - the LANG selection... and the default FLAGS
-
-AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
-AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
-AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
-VAR,[VAR="no, unknown"
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- ac_save_[]FLAGS="$[]FLAGS"
-# IRIX C compiler:
-#      -use_readonly_const is the default for IRIX C,
-#       puts them into .rodata, but they are copied later.
-#       need to be "-G0 -rdatashared" for strictmode but
-#       I am not sure what effect that has really.         - guidod
-for ac_arg dnl
-in "-pedantic  % -Wall -ansi -pedantic"       dnl   GCC
-   "-xstrconst % -v -Xc"                      dnl Solaris C
-   "-std1      % -verbose -w0 -warnprotos -std1" dnl Digital Unix
-   " % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
-   " % -ansi -ansiE -fullwarn"                dnl IRIX
-   "+ESlit     % +w1 -Aa"                     dnl HP-UX C
-   "-Xc        % -pvctl[,]fullmsg -Xc"        dnl NEC SX-5 (Super-UX 10)
-   "-h conform % -h msglevel 2 -h conform"    dnl Cray C (Unicos)
-   #
-do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-   AC_TRY_COMPILE([],[return 0;],
-   [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-done
- FLAGS="$ac_save_[]FLAGS"
- AC_LANG_RESTORE
-])
-case ".$VAR" in
-     .ok|.ok,*) m4_ifvaln($3,$3) ;;
-   .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
-        AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
-                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
-   *) m4_ifvaln($3,$3,[
-   if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
-   then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
-   else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
-                      m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
-   fi ]) ;;
-esac
-AS_VAR_POPDEF([VAR])dnl
-AS_VAR_POPDEF([FLAGS])dnl
-])
diff --git a/m4/ax_create_stdint_h.m4 b/m4/ax_create_stdint_h.m4
new file mode 100644 (file)
index 0000000..33a21f8
--- /dev/null
@@ -0,0 +1,727 @@
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
+#
+# DESCRIPTION
+#
+#   the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
+#   existence of an include file <stdint.h> that defines a set of typedefs,
+#   especially uint8_t,int32_t,uintptr_t. Many older installations will not
+#   provide this file, but some will have the very same definitions in
+#   <inttypes.h>. In other enviroments we can use the inet-types in
+#   <sys/types.h> which would define the typedefs int8_t and u_int8_t
+#   respectivly.
+#
+#   This macros will create a local "_stdint.h" or the headerfile given as
+#   an argument. In many cases that file will just "#include <stdint.h>" or
+#   "#include <inttypes.h>", while in other environments it will provide the
+#   set of basic 'stdint's definitions/typedefs:
+#
+#     int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
+#     int_least32_t.. int_fast32_t.. intmax_t
+#
+#   which may or may not rely on the definitions of other files, or using
+#   the AC_CHECK_SIZEOF macro to determine the actual sizeof each type.
+#
+#   if your header files require the stdint-types you will want to create an
+#   installable file mylib-int.h that all your other installable header may
+#   include. So if you have a library package named "mylib", just use
+#
+#     AX_CREATE_STDINT_H(mylib-int.h)
+#
+#   in configure.ac and go to install that very header file in Makefile.am
+#   along with the other headers (mylib.h) - and the mylib-specific headers
+#   can simply use "#include <mylib-int.h>" to obtain the stdint-types.
+#
+#   Remember, if the system already had a valid <stdint.h>, the generated
+#   file will include it directly. No need for fuzzy HAVE_STDINT_H things...
+#   (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
+#   compilation and the c99-mode is not the default. Therefore this macro
+#   will not use the compiler's stdint.h - please complain to the GCC
+#   developers).
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 10
+
+AC_DEFUN([AX_CHECK_DATA_MODEL],[
+   AC_CHECK_SIZEOF(char)
+   AC_CHECK_SIZEOF(short)
+   AC_CHECK_SIZEOF(int)
+   AC_CHECK_SIZEOF(long)
+   AC_CHECK_SIZEOF(void*)
+   ac_cv_char_data_model=""
+   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
+   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
+   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
+   ac_cv_long_data_model=""
+   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
+   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
+   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
+   AC_MSG_CHECKING([data model])
+   case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
+    122/242)     ac_cv_data_model="IP16"  ; n="standard 16bit machine" ;;
+    122/244)     ac_cv_data_model="LP32"  ; n="standard 32bit machine" ;;
+    122/*)       ac_cv_data_model="i16"   ; n="unusual int16 model" ;;
+    124/444)     ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
+    124/488)     ac_cv_data_model="LP64"  ; n="standard 64bit unixish" ;;
+    124/448)     ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
+    124/*)       ac_cv_data_model="i32"   ; n="unusual int32 model" ;;
+    128/888)     ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
+    128/*)       ac_cv_data_model="i64"   ; n="unusual int64 model" ;;
+    222/*2)      ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
+    333/*3)      ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
+    444/*4)      ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
+    666/*6)      ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
+    888/*8)      ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
+    222/*|333/*|444/*|666/*|888/*) :
+                 ac_cv_data_model="iDSP"  ; n="unusual dsptype" ;;
+     *)          ac_cv_data_model="none"  ; n="very unusual model" ;;
+   esac
+   AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)])
+])
+
+dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF])
+AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[
+AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
+ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
+  AC_MSG_RESULT([(..)])
+  for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h])
+  do
+   unset ac_cv_type_uintptr_t
+   unset ac_cv_type_uint64_t
+   AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
+   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
+   m4_ifvaln([$2],[$2]) break
+  done
+  AC_MSG_CHECKING([for stdint uintptr_t])
+ ])
+])
+
+AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[
+AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
+ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
+  AC_MSG_RESULT([(..)])
+  for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h])
+  do
+   unset ac_cv_type_uint32_t
+   unset ac_cv_type_uint64_t
+   AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
+   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
+   m4_ifvaln([$2],[$2]) break
+   break;
+  done
+  AC_MSG_CHECKING([for stdint uint32_t])
+ ])
+])
+
+AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[
+AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
+ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
+  AC_MSG_RESULT([(..)])
+  for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do
+   unset ac_cv_type_u_int32_t
+   unset ac_cv_type_u_int64_t
+   AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
+   AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
+   m4_ifvaln([$2],[$2]) break
+   break;
+  done
+  AC_MSG_CHECKING([for stdint u_int32_t])
+ ])
+])
+
+AC_DEFUN([AX_CREATE_STDINT_H],
+[# ------ AX CREATE STDINT H -------------------------------------
+AC_MSG_CHECKING([for stdint types])
+ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
+# try to shortcircuit - if the default include path of the compiler
+# can find a "stdint.h" header then we assume that all compilers can.
+AC_CACHE_VAL([ac_cv_header_stdint_t],[
+old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
+old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
+old_CFLAGS="$CFLAGS"     ; CFLAGS=""
+AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
+[ac_cv_stdint_result="(assuming C99 compatible system)"
+ ac_cv_header_stdint_t="stdint.h"; ],
+[ac_cv_header_stdint_t=""])
+if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then
+CFLAGS="-std=c99"
+AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
+[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)])
+fi
+CXXFLAGS="$old_CXXFLAGS"
+CPPFLAGS="$old_CPPFLAGS"
+CFLAGS="$old_CFLAGS" ])
+
+v="... $ac_cv_header_stdint_h"
+if test "$ac_stdint_h" = "stdint.h" ; then
+ AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
+elif test "$ac_stdint_h" = "inttypes.h" ; then
+ AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
+elif test "_$ac_cv_header_stdint_t" = "_" ; then
+ AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
+else
+ ac_cv_header_stdint="$ac_cv_header_stdint_t"
+ AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
+fi
+
+if test "_$ac_cv_header_stdint_t" = "_" ; then # cannot shortcircuit..
+
+dnl .....intro message done, now do a few system checks.....
+dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
+dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW
+dnl instead that is triggered with 3 or more arguments (see types.m4)
+
+inttype_headers=`echo $2 | sed -e 's/,/ /g'`
+
+ac_cv_stdint_result="(no helpful system typedefs seen)"
+AX_CHECK_HEADER_STDINT_X(dnl
+   stdint.h inttypes.h sys/inttypes.h $inttype_headers,
+   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)")
+
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+AX_CHECK_HEADER_STDINT_O(dnl,
+   inttypes.h sys/inttypes.h stdint.h $inttype_headers,
+   ac_cv_stdint_result="(seen uint32_t$and64 in $i)")
+fi
+
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+if test "_$ac_cv_header_stdint_o" = "_" ; then
+AX_CHECK_HEADER_STDINT_U(dnl,
+   sys/types.h inttypes.h sys/inttypes.h $inttype_headers,
+   ac_cv_stdint_result="(seen u_int32_t$and64 in $i)")
+fi fi
+
+dnl if there was no good C99 header file, do some typedef checks...
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+   AC_MSG_CHECKING([for stdint datatype model])
+   AC_MSG_RESULT([(..)])
+   AX_CHECK_DATA_MODEL
+fi
+
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_x"
+elif  test "_$ac_cv_header_stdint_o" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_o"
+elif  test "_$ac_cv_header_stdint_u" != "_" ; then
+   ac_cv_header_stdint="$ac_cv_header_stdint_u"
+else
+   ac_cv_header_stdint="stddef.h"
+fi
+
+AC_MSG_CHECKING([for extra inttypes in chosen header])
+AC_MSG_RESULT([($ac_cv_header_stdint)])
+dnl see if int_least and int_fast types are present in _this_ header.
+unset ac_cv_type_int_least32_t
+unset ac_cv_type_int_fast32_t
+AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
+AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
+AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
+
+fi # shortcircut to system "stdint.h"
+# ------------------ PREPARE VARIABLES ------------------------------
+if test "$GCC" = "yes" ; then
+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+else
+ac_cv_stdint_message="using $CC"
+fi
+
+AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
+$ac_cv_stdint_result])
+
+dnl -----------------------------------------------------------------
+# ----------------- DONE inttypes.h checks START header -------------
+AC_CONFIG_COMMANDS([$ac_stdint_h],[
+AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h)
+ac_stdint=$tmp/_stdint.h
+
+echo "#ifndef" $_ac_stdint_h >$ac_stdint
+echo "#define" $_ac_stdint_h "1" >>$ac_stdint
+echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
+echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
+echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_t" != "_" ; then
+echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
+echo "#include <stdint.h>" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+else
+
+cat >>$ac_stdint <<STDINT_EOF
+
+/* ................... shortcircuit part ........................... */
+
+#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <stddef.h>
+
+/* .................... configured part ............................ */
+
+STDINT_EOF
+
+echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+  ac_header="$ac_cv_header_stdint_x"
+  echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
+else
+  echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
+fi
+
+echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
+if  test "_$ac_cv_header_stdint_o" != "_" ; then
+  ac_header="$ac_cv_header_stdint_o"
+  echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
+else
+  echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
+fi
+
+echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
+if  test "_$ac_cv_header_stdint_u" != "_" ; then
+  ac_header="$ac_cv_header_stdint_u"
+  echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
+else
+  echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
+fi
+
+echo "" >>$ac_stdint
+
+if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
+  echo "#include <$ac_header>" >>$ac_stdint
+  echo "" >>$ac_stdint
+fi fi
+
+echo "/* which 64bit typedef has been found */" >>$ac_stdint
+if test "$ac_cv_type_uint64_t" = "yes" ; then
+echo "#define   _STDINT_HAVE_UINT64_T" "1"  >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
+fi
+if test "$ac_cv_type_u_int64_t" = "yes" ; then
+echo "#define   _STDINT_HAVE_U_INT64_T" "1"  >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
+
+echo "/* which type model has been detected */" >>$ac_stdint
+if test "_$ac_cv_char_data_model" != "_" ; then
+echo "#define   _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
+echo "#define   _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
+else
+echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
+echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
+
+echo "/* whether int_least types were detected */" >>$ac_stdint
+if test "$ac_cv_type_int_least32_t" = "yes"; then
+echo "#define   _STDINT_HAVE_INT_LEAST32_T" "1"  >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
+fi
+echo "/* whether int_fast types were detected */" >>$ac_stdint
+if test "$ac_cv_type_int_fast32_t" = "yes"; then
+echo "#define   _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
+fi
+echo "/* whether intmax_t type was detected */" >>$ac_stdint
+if test "$ac_cv_type_intmax_t" = "yes"; then
+echo "#define   _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
+
+  cat >>$ac_stdint <<STDINT_EOF
+/* .................... detections part ............................ */
+
+/* whether we need to define bitspecific types from compiler base types */
+#ifndef _STDINT_HEADER_INTPTR
+#ifndef _STDINT_HEADER_UINT32
+#ifndef _STDINT_HEADER_U_INT32
+#define _STDINT_NEED_INT_MODEL_T
+#else
+#define _STDINT_HAVE_U_INT_TYPES
+#endif
+#endif
+#endif
+
+#ifdef _STDINT_HAVE_U_INT_TYPES
+#undef _STDINT_NEED_INT_MODEL_T
+#endif
+
+#ifdef  _STDINT_CHAR_MODEL
+#if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
+#ifndef _STDINT_BYTE_MODEL
+#define _STDINT_BYTE_MODEL 12
+#endif
+#endif
+#endif
+
+#ifndef _STDINT_HAVE_INT_LEAST32_T
+#define _STDINT_NEED_INT_LEAST_T
+#endif
+
+#ifndef _STDINT_HAVE_INT_FAST32_T
+#define _STDINT_NEED_INT_FAST_T
+#endif
+
+#ifndef _STDINT_HEADER_INTPTR
+#define _STDINT_NEED_INTPTR_T
+#ifndef _STDINT_HAVE_INTMAX_T
+#define _STDINT_NEED_INTMAX_T
+#endif
+#endif
+
+
+/* .................... definition part ............................ */
+
+/* some system headers have good uint64_t */
+#ifndef _HAVE_UINT64_T
+#if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
+#define _HAVE_UINT64_T
+typedef u_int64_t uint64_t;
+#endif
+#endif
+
+#ifndef _HAVE_UINT64_T
+/* .. here are some common heuristics using compiler runtime specifics */
+#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+#elif !defined __STRICT_ANSI__
+#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+#define _HAVE_UINT64_T
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+
+#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
+/* note: all ELF-systems seem to have loff-support which needs 64-bit */
+#if !defined _NO_LONGLONG
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
+
+#elif defined __alpha || (defined __mips && defined _ABIN32)
+#if !defined _NO_LONGLONG
+typedef long int64_t;
+typedef unsigned long uint64_t;
+#endif
+  /* compiler/cpu type to define int64_t */
+#endif
+#endif
+#endif
+
+#if defined _STDINT_HAVE_U_INT_TYPES
+/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
+typedef u_int8_t uint8_t;
+typedef u_int16_t uint16_t;
+typedef u_int32_t uint32_t;
+
+/* glibc compatibility */
+#ifndef __int8_t_defined
+#define __int8_t_defined
+#endif
+#endif
+
+#ifdef _STDINT_NEED_INT_MODEL_T
+/* we must guess all the basic types. Apart from byte-adressable system, */
+/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
+/* (btw, those nibble-addressable systems are way off, or so we assume) */
+
+dnl   /* have a look at "64bit and data size neutrality" at */
+dnl   /* http://unix.org/version2/whatsnew/login_64bit.html */
+dnl   /* (the shorthand "ILP" types always have a "P" part) */
+
+#if defined _STDINT_BYTE_MODEL
+#if _STDINT_LONG_MODEL+0 == 242
+/* 2:4:2 =  IP16 = a normal 16-bit system                */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned long   uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          long    int32_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
+/* 2:4:4 =  LP32 = a 32-bit system derived from a 16-bit */
+/* 4:4:4 = ILP32 = a normal 32-bit system                */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned int    uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          int     int32_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
+/* 4:8:4 =  IP32 = a 32-bit system prepared for 64-bit    */
+/* 4:8:8 =  LP64 = a normal 64-bit system                 */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned int    uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          int     int32_t;
+#endif
+/* this system has a "long" of 64bit */
+#ifndef _HAVE_UINT64_T
+#define _HAVE_UINT64_T
+typedef unsigned long   uint64_t;
+typedef          long    int64_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 448
+/*      LLP64   a 64-bit system derived from a 32-bit system */
+typedef unsigned char   uint8_t;
+typedef unsigned short  uint16_t;
+typedef unsigned int    uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef          char    int8_t;
+typedef          short   int16_t;
+typedef          int     int32_t;
+#endif
+/* assuming the system has a "long long" */
+#ifndef _HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef unsigned long long uint64_t;
+typedef          long long  int64_t;
+#endif
+#else
+#define _STDINT_NO_INT32_T
+#endif
+#else
+#define _STDINT_NO_INT8_T
+#define _STDINT_NO_INT32_T
+#endif
+#endif
+
+/*
+ * quote from SunOS-5.8 sys/inttypes.h:
+ * Use at your own risk.  As of February 1996, the committee is squarely
+ * behind the fixed sized types; the "least" and "fast" types are still being
+ * discussed.  The probability that the "fast" types may be removed before
+ * the standard is finalized is high enough that they are not currently
+ * implemented.
+ */
+
+#if defined _STDINT_NEED_INT_LEAST_T
+typedef  int8_t    int_least8_t;
+typedef  int16_t   int_least16_t;
+typedef  int32_t   int_least32_t;
+#ifdef _HAVE_UINT64_T
+typedef  int64_t   int_least64_t;
+#endif
+
+typedef uint8_t   uint_least8_t;
+typedef uint16_t  uint_least16_t;
+typedef uint32_t  uint_least32_t;
+#ifdef _HAVE_UINT64_T
+typedef uint64_t  uint_least64_t;
+#endif
+  /* least types */
+#endif
+
+#if defined _STDINT_NEED_INT_FAST_T
+typedef  int8_t    int_fast8_t;
+typedef  int       int_fast16_t;
+typedef  int32_t   int_fast32_t;
+#ifdef _HAVE_UINT64_T
+typedef  int64_t   int_fast64_t;
+#endif
+
+typedef uint8_t   uint_fast8_t;
+typedef unsigned  uint_fast16_t;
+typedef uint32_t  uint_fast32_t;
+#ifdef _HAVE_UINT64_T
+typedef uint64_t  uint_fast64_t;
+#endif
+  /* fast types */
+#endif
+
+#ifdef _STDINT_NEED_INTMAX_T
+#ifdef _HAVE_UINT64_T
+typedef  int64_t       intmax_t;
+typedef uint64_t      uintmax_t;
+#else
+typedef          long  intmax_t;
+typedef unsigned long uintmax_t;
+#endif
+#endif
+
+#ifdef _STDINT_NEED_INTPTR_T
+#ifndef __intptr_t_defined
+#define __intptr_t_defined
+/* we encourage using "long" to store pointer values, never use "int" ! */
+#if   _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
+typedef  unsigned int   uintptr_t;
+typedef           int    intptr_t;
+#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
+typedef  unsigned long  uintptr_t;
+typedef           long   intptr_t;
+#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
+typedef        uint64_t uintptr_t;
+typedef         int64_t  intptr_t;
+#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
+typedef  unsigned long  uintptr_t;
+typedef           long   intptr_t;
+#endif
+#endif
+#endif
+
+/* The ISO C99 standard specifies that in C++ implementations these
+   should only be defined if explicitly requested.  */
+#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
+#ifndef UINT32_C
+
+/* Signed.  */
+# define INT8_C(c)      c
+# define INT16_C(c)     c
+# define INT32_C(c)     c
+# ifdef _HAVE_LONGLONG_UINT64_T
+#  define INT64_C(c)    c ## L
+# else
+#  define INT64_C(c)    c ## LL
+# endif
+
+/* Unsigned.  */
+# define UINT8_C(c)     c ## U
+# define UINT16_C(c)    c ## U
+# define UINT32_C(c)    c ## U
+# ifdef _HAVE_LONGLONG_UINT64_T
+#  define UINT64_C(c)   c ## UL
+# else
+#  define UINT64_C(c)   c ## ULL
+# endif
+
+/* Maximal type.  */
+# ifdef _HAVE_LONGLONG_UINT64_T
+#  define INTMAX_C(c)   c ## L
+#  define UINTMAX_C(c)  c ## UL
+# else
+#  define INTMAX_C(c)   c ## LL
+#  define UINTMAX_C(c)  c ## ULL
+# endif
+
+  /* literalnumbers */
+#endif
+#endif
+
+/* These limits are merily those of a two complement byte-oriented system */
+
+/* Minimum of signed integral types.  */
+# define INT8_MIN               (-128)
+# define INT16_MIN              (-32767-1)
+# define INT32_MIN              (-2147483647-1)
+# define INT64_MIN              (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types.  */
+# define INT8_MAX               (127)
+# define INT16_MAX              (32767)
+# define INT32_MAX              (2147483647)
+# define INT64_MAX              (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types.  */
+# define UINT8_MAX              (255)
+# define UINT16_MAX             (65535)
+# define UINT32_MAX             (4294967295U)
+# define UINT64_MAX             (__UINT64_C(18446744073709551615))
+
+/* Minimum of signed integral types having a minimum size.  */
+# define INT_LEAST8_MIN         INT8_MIN
+# define INT_LEAST16_MIN        INT16_MIN
+# define INT_LEAST32_MIN        INT32_MIN
+# define INT_LEAST64_MIN        INT64_MIN
+/* Maximum of signed integral types having a minimum size.  */
+# define INT_LEAST8_MAX         INT8_MAX
+# define INT_LEAST16_MAX        INT16_MAX
+# define INT_LEAST32_MAX        INT32_MAX
+# define INT_LEAST64_MAX        INT64_MAX
+
+/* Maximum of unsigned integral types having a minimum size.  */
+# define UINT_LEAST8_MAX        UINT8_MAX
+# define UINT_LEAST16_MAX       UINT16_MAX
+# define UINT_LEAST32_MAX       UINT32_MAX
+# define UINT_LEAST64_MAX       UINT64_MAX
+
+  /* shortcircuit*/
+#endif
+  /* once */
+#endif
+#endif
+STDINT_EOF
+fi
+    if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
+      AC_MSG_NOTICE([$ac_stdint_h is unchanged])
+    else
+      ac_dir=`AS_DIRNAME(["$ac_stdint_h"])`
+      AS_MKDIR_P(["$ac_dir"])
+      rm -f $ac_stdint_h
+      mv $ac_stdint $ac_stdint_h
+    fi
+],[# variables for create stdint.h replacement
+PACKAGE="$PACKAGE"
+VERSION="$VERSION"
+ac_stdint_h="$ac_stdint_h"
+_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)
+ac_cv_stdint_message="$ac_cv_stdint_message"
+ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
+ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
+ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
+ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_char_data_model="$ac_cv_char_data_model"
+ac_cv_long_data_model="$ac_cv_long_data_model"
+ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
+ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
+])
+])
diff --git a/m4/librt_timers.m4 b/m4/librt_timers.m4
new file mode 100644 (file)
index 0000000..f1595e2
--- /dev/null
@@ -0,0 +1,90 @@
+# HW_HEADER_TIME_H
+# ------------------
+# Define HAVE_TIME_H to 1 if <time.h> is available.
+AC_DEFUN([HW_HEADER_TIME_H],
+[
+  AC_PREREQ([2.60])dnl Older releases should work if AC_CHECK_HEADERS is used.
+  AC_CHECK_HEADERS_ONCE([time.h])
+])# HW_HEADER_TIME_H
+
+# HW_LIBRT_TIMERS
+# -----------------
+# Set $hw_cv_librt_timers and $hw_cv_librt_timers_posix to "yes" or "no",
+# respectively.  If the timer_create() function is available and
+# POSIX compliant, then the system's timer_create(), timer_settime(),
+# and timer_delete() functions are used. Otherwise, make sure
+# the replacement functions will be built.
+#
+# In the case where we are cross compiling, the POSIX detection of
+# the timer_create() function is skipped, and instead the usual check
+# for the existence of all the timer_* functions is done using
+# AC_REPLACE_FUNCS.
+#
+# If enable_timer_replacement=true, the replacements is forced to be built.
+AC_DEFUN([HW_LIBRT_TIMERS],
+[
+  AC_PREREQ([2.60])dnl 2.59 should work if some AC_TYPE_* macros are replaced.
+  AC_REQUIRE([HW_HEADER_TIME_H])dnl Our check evaluates HAVE_TIME_H.
+
+  if test "xtrue" != x"$enable_timer_replacement"; then
+         AC_CHECK_FUNC([timer_create],
+               [hw_cv_librt_timers=yes],
+               [hw_cv_librt_timers=no])
+         AS_IF([test "$hw_cv_librt_timers" = yes],
+               [AC_CACHE_CHECK([if timer_create is supported on the system],
+                 [hw_cv_librt_timers_posix],
+                 [AC_RUN_IFELSE(
+                       [AC_LANG_PROGRAM(
+                         [[#if HAVE_TIME_H
+                         #include <time.h>
+                         #endif
+              #include <errno.h>
+                         static int test_timer_create()
+                         {
+                timer_t timerid;
+                if(timer_create(CLOCK_REALTIME, NULL, &timerid) != 0)
+                {
+                    /* 
+                      On this system, although the function is available,
+                      no meaningful implementation is provided.
+                    */
+                    if(errno == ENOSYS)
+                    {
+                        return 1;
+                    }
+                }
+                return 0;
+                         }]],
+                         [[return test_timer_create();]])],
+                       [hw_cv_librt_timers_posix=yes],
+                       [hw_cv_librt_timers_posix=no],
+                       [hw_cv_librt_timers_posix=autodetect])])],
+               [hw_cv_librt_timers_posix=no])
+  else
+      hw_cv_librt_timers_posix=no
+  fi
+
+  # If the system does not have a POSIX timer_create(), then use
+  # Check's reimplementation of the timer_* calls
+  AS_IF([test "$hw_cv_librt_timers_posix" = no],
+    [_HW_LIBRT_TIMERS_REPLACE])
+
+  # If we are cross compiling, do the normal check for the
+  # timer_* calls.
+  AS_IF([test "$hw_cv_librt_timers_posix" = autodetect],
+    [AC_REPLACE_FUNCS([timer_create timer_settime timer_delete])
+     AC_CHECK_DECLS([timer_create, timer_settime, timer_delete])])
+])# HW_LIBRT_TIMERS
+
+# _HW_LIBRT_TIMERS_REPLACE
+# ------------------------
+# Arrange for building timer_create.c, timer_settime.c, and
+# timer_delete.c.
+AC_DEFUN([_HW_LIBRT_TIMERS_REPLACE],
+[
+  AS_IF([test "x$_hw_cv_librt_timers_replace_done" != xyes],
+    [AC_LIBOBJ([timer_create])
+     AC_LIBOBJ([timer_settime])
+     AC_LIBOBJ([timer_delete])
+    _hw_cv_librt_timers_replace_done=yes])
+])# _HW_LIBRT_TIMERS_REPLACE
index 2ca1c1f..10ab284 100644 (file)
@@ -1,7 +1,6 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,35 +8,30 @@
 # modifications, as long as this notice is preserved.
 
 m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the  same
+# distribution terms that you use for the rest of that program.
 #
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-# serial 56 LT_INIT
+# serial 58 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -65,7 +59,8 @@ esac
 # LT_INIT([OPTIONS])
 # ------------------
 AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
 AC_BEFORE([$0], [LTDL_INIT])dnl
@@ -82,11 +77,13 @@ AC_REQUIRE([LTVERSION_VERSION])dnl
 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 m4_require([_LT_PROG_LTMAIN])dnl
 
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
 dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -106,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in @S|@*""; do
+      case $cc_temp in
+        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
 # _LT_CC_BASENAME(CC)
 # -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
 m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
 ])
 
 
 # _LT_FILEUTILS_DEFAULTS
 # ----------------------
 # It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
 m4_defun([_LT_FILEUTILS_DEFAULTS],
 [: ${CP="cp -f"}
 : ${MV="mv -f"}
@@ -138,6 +152,11 @@ m4_defun([_LT_FILEUTILS_DEFAULTS],
 m4_defun([_LT_SETUP],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -160,68 +179,54 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 ])
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
 _LT_CHECK_OBJDIR
 
 m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -250,16 +255,38 @@ _LT_CONFIG_COMMANDS
 ])# _LT_SETUP
 
 
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
 # _LT_PROG_LTMAIN
 # ---------------
-# Note that this code is called both from `configure', and `config.status'
+# Note that this code is called both from 'configure', and 'config.status'
 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
 # so we pass a copy along to make sure it has a sensible value anyway.
 m4_defun([_LT_PROG_LTMAIN],
 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 ])# _LT_PROG_LTMAIN
 
 
@@ -269,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh"
 
 # So that we can recreate a full libtool script including additional
 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
+# in macros and then make a single call at the end using the 'libtool'
 # label.
 
 
@@ -404,11 +431,11 @@ m4_define([_lt_decl_all_varnames],
 
 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
 # ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
 
 # _LT_CONFIG_STATUS_DECLARATIONS
@@ -418,7 +445,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE],
 # embedded single quotes properly.  In configure, this macro expands
 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 #
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
@@ -429,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 # Output comment and list of tags supported by the script
 m4_defun([_LT_LIBTOOL_TAGS],
 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
+available_tags='_LT_TAGS'dnl
 ])
 
 
@@ -457,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 # _LT_LIBTOOL_CONFIG_VARS
 # -----------------------
 # Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 # section) are produced by _LT_LIBTOOL_TAG_VARS.
 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -483,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 # variables for single and double quote escaping we saved from calls
 # to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'.  Finally, any additional code accumulated
 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 m4_defun([_LT_CONFIG_COMMANDS],
 [AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -517,12 +544,20 @@ LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -533,9 +568,9 @@ done
 # Double-quote double-evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -543,16 +578,38 @@ for var in lt_decl_all_varnames([[ \
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
 _LT_OUTPUT_LIBTOOL_INIT
 ])
 
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# '#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
 # ---------
@@ -562,20 +619,11 @@ _LT_OUTPUT_LIBTOOL_INIT
 AC_DEFUN([LT_OUTPUT],
 [: ${CONFIG_LT=./config.lt}
 AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
 
 cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
+lt_cl_silent=false
 exec AS_MESSAGE_LOG_FD>>config.log
 {
   echo
@@ -583,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 } >&AS_MESSAGE_LOG_FD
 
 lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
+'$as_me' creates a local libtool stub from the current configuration,
 for use in further configure time tests before the real libtool is
 generated.
 
@@ -601,11 +649,11 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
-while test $[#] != 0
+while test 0 != $[#]
 do
   case $[1] in
     --version | --v* | -V )
@@ -618,10 +666,10 @@ do
       lt_cl_silent=: ;;
 
     -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
 
     *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
   esac
   shift
 done
@@ -646,15 +694,13 @@ chmod +x "$CONFIG_LT"
 # appending to config.log, which fails on DOS, as config.log is still kept
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
+lt_cl_success=:
+test yes = "$silent" &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
 ])# LT_OUTPUT
 
 
@@ -669,27 +715,31 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
 _LT_COPYING
 _LT_LIBTOOL_TAGS
 
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
 # ### BEGIN LIBTOOL CONFIG
 _LT_LIBTOOL_CONFIG_VARS
 _LT_LIBTOOL_TAG_VARS
@@ -697,13 +747,24 @@ _LT_LIBTOOL_TAG_VARS
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_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
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -717,15 +778,10 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 ],
@@ -742,7 +798,6 @@ _LT_EOF
 [m4_if([$1], [], [
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'], [])
 ])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -770,6 +825,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],                 [_LT_LANG(C)],
   [C++],               [_LT_LANG(CXX)],
+  [Go],                        [_LT_LANG(GO)],
   [Java],              [_LT_LANG(GCJ)],
   [Fortran 77],                [_LT_LANG(F77)],
   [Fortran],           [_LT_LANG(FC)],
@@ -791,6 +847,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -821,6 +902,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -831,11 +916,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
 
 # _LT_TAG_COMPILER
@@ -909,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
       [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
        # By default we will add the -single_module flag. You can override
        # by either setting the environment variable LT_MULTI_MODULE
        # non-empty at configure time, or by adding -multi_module to the
@@ -921,7 +1008,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+       # If there is a non-empty error log, and "single_module"
+       # appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+         cat conftest.err >&AS_MESSAGE_LOG_FD
+       # Otherwise, if the output was created with a 0 exit code from
+       # the compiler, it worked.
+       elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -929,6 +1022,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        rm -rf libconftest.dylib*
        rm -f conftest.*
       fi])
+
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
       [lt_cv_ld_exported_symbols_list=no
@@ -938,36 +1032,64 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
        [lt_cv_ld_exported_symbols_list=yes],
        [lt_cv_ld_exported_symbols_list=no])
-       LDFLAGS="$save_LDFLAGS"
+       LDFLAGS=$save_LDFLAGS
+    ])
+
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+       cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+       lt_cv_ld_force_load=yes
+      else
+       cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
     ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
        10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[[012]]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       10.[[012]][[,.]]*)
+         _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
        10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+         _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -977,8 +1099,8 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -987,23 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+[   if test yes != "$lt_cv_apple_cc_single_mod"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1011,234 +1139,176 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   fi
 ])
 
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
 # Links a minimal program and checks the executable
 # for the system default hardcoded library path. In most cases,
 # this is /usr/lib:/lib, but when the MPI compilers are used
 # the location of the communication and MPI libs are included too.
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+         /^0/ {
+             s/^0  *\([^ ]*\) *$/\1/
+             p
+         }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
 ])# _LT_SYS_MODULE_PATH_AIX
 
 
 # _LT_SHELL_INIT(ARG)
 # -------------------
 m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-        [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
 
 
 # _LT_PROG_ECHO_BACKSLASH
 # -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
 else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
 fi
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-          test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-         # Cool, printf works
-         :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-         export CONFIG_SHELL
-         SHELL="$CONFIG_SHELL"
-         export SHELL
-         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-         # maybe with a smaller string...
-         prev=:
-
-         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-           then
-             break
-           fi
-           prev="$cmd"
-         done
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
 
-         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
+case $ECHO in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
-AC_SUBST(lt_ECHO)
-])
 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 ])# _LT_PROG_ECHO_BACKSLASH
 
 
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+  [Search for dependent libraries within DIR (or the compiler's sysroot
+   if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+   if test yes = "$GCC"; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([$with_sysroot])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+
 # _LT_ENABLE_LOCK
 # ---------------
 m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
   [AS_HELP_STRING([--disable-libtool-lock],
     [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-       HPUX_IA64_MODE="32"
+       HPUX_IA64_MODE=32
        ;;
       *ELF-64*)
-       HPUX_IA64_MODE="64"
+       HPUX_IA64_MODE=64
        ;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
        *32-bit*)
          LD="${LD-ld} -melf32bsmip"
@@ -1267,9 +1337,46 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+       emul="${emul}32"
+       ;;
+      *64-bit*)
+       emul="${emul}64"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+       emul="${emul}btsmip"
+       ;;
+      *LSB*)
+       emul="${emul}ltsmip"
+       ;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+       emul="${emul}n32"
+       ;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1279,9 +1386,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
-         ppc64-*linux*|powerpc64-*linux*)
+         powerpc64le-*linux*)
+           LD="${LD-ld} -m elf32lppclinux"
+           ;;
+         powerpc64-*linux*)
            LD="${LD-ld} -m elf32ppclinux"
            ;;
          s390x-*linux*)
@@ -1300,7 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
          x86_64-*linux*)
            LD="${LD-ld} -m elf_x86_64"
            ;;
-         ppc*-*linux*|powerpc*-*linux*)
+         powerpcle-*linux*)
+           LD="${LD-ld} -m elf64lppc"
+           ;;
+         powerpc-*linux*)
            LD="${LD-ld} -m elf64ppc"
            ;;
          s390*-*linux*|s390*-*tpf*)
@@ -1318,25 +1438,39 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
     [AC_LANG_PUSH(C)
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
+*-*solaris*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*|x86_64-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD=${LD-ld}_sol2
+        fi
+        ;;
       *)
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
          LD="${LD-ld} -64"
@@ -1350,18 +1484,51 @@ sparc*-*solaris*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
 ])# _LT_ENABLE_LOCK
 
 
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test 0 -eq "$ac_status"; then
+       # Ensure the archiver fails upon bogus file names.
+       rm -f conftest.$ac_objext libconftest.a
+       AC_TRY_EVAL([lt_ar_try])
+       if test 0 -ne "$ac_status"; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test no = "$lt_cv_ar_at_file"; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
 # _LT_CMD_OLD_ARCHIVE
 # -------------------
 m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
+[_LT_PROG_AR
 
 AC_CHECK_TOOL(STRIP, strip, :)
 test -z "$STRIP" && STRIP=:
@@ -1379,19 +1546,28 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+  bitrig* | openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
 _LT_DECL([], [old_postinstall_cmds], [2])
 _LT_DECL([], [old_postuninstall_cmds], [2])
 _LT_TAGDECL([], [old_archive_cmds], [2],
     [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
 ])# _LT_CMD_OLD_ARCHIVE
 
 
@@ -1406,7 +1582,7 @@ AC_CACHE_CHECK([$1], [$2],
   [$2=no
    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
+   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -1416,15 +1592,15 @@ AC_CACHE_CHECK([$1], [$2],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        $2=yes
@@ -1433,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2],
    $RM conftest*
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$5], , :, [$5])
 else
     m4_if([$6], , :, [$6])
@@ -1455,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
 m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $3"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1464,7 +1640,7 @@ AC_CACHE_CHECK([$1], [$2],
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          $2=yes
@@ -1474,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2],
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$4], , :, [$4])
 else
     m4_if([$5], , :, [$5])
@@ -1498,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
 AC_MSG_CHECKING([the maximum length of command line arguments])
 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -1527,13 +1703,18 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1552,6 +1733,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1578,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+             test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -1609,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   esac
 ])
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 else
   AC_MSG_RESULT(none)
@@ -1637,13 +1824,13 @@ m4_defun([_LT_HEADER_DLFCN],
 # ----------------------------------------------------------------
 m4_defun([_LT_TRY_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
+if test yes = "$cross_compiling"; then :
   [$4]
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
+[#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -1684,7 +1871,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1693,7 +1886,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
       /* dlclose (self); */
     }
   else
@@ -1702,7 +1899,7 @@ int main ()
   return status;
 }]
 _LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -1723,7 +1920,7 @@ rm -fr conftest*
 # ------------------
 AC_DEFUN([LT_SYS_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
+if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -1733,44 +1930,52 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
+               [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     AC_CHECK_FUNC([shl_load],
-         [lt_cv_dlopen="shl_load"],
+         [lt_cv_dlopen=shl_load],
       [AC_CHECK_LIB([dld], [shl_load],
-           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+           [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
        [AC_CHECK_FUNC([dlopen],
-             [lt_cv_dlopen="dlopen"],
+             [lt_cv_dlopen=dlopen],
          [AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+               [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
            [AC_CHECK_LIB([svld], [dlopen],
-                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+                 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
              [AC_CHECK_LIB([dld], [dld_link],
-                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+                   [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
              ])
            ])
          ])
@@ -1779,21 +1984,21 @@ else
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -1803,7 +2008,7 @@ else
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
          lt_cv_dlopen_self_static, [dnl
@@ -1813,9 +2018,9 @@ else
       ])
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -1869,16 +2074,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
@@ -1907,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS],
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 _LT_COMPILER_C_O([$1])
 
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   AC_MSG_CHECKING([if we can lock with hard links])
   hard_links=yes
@@ -1918,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" !=
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+  if test no = "$hard_links"; then
+    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
     need_locks=warn
   fi
 else
@@ -1946,8 +2151,8 @@ objdir=$lt_cv_objdir
 _LT_DECL([], [objdir], [0],
          [The name of the directory that contains temporary libtool files])dnl
 m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+  [Define to the sub-directory where libtool stores uninstalled libraries.])
 ])# _LT_CHECK_OBJDIR
 
 
@@ -1959,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 _LT_TAGVAR(hardcode_action, $1)=
 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
 
   # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
     # Linking always hardcodes the temporary library directory.
     _LT_TAGVAR(hardcode_action, $1)=relink
   else
@@ -1981,12 +2186,12 @@ else
 fi
 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -2010,7 +2215,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
@@ -2028,6 +2233,47 @@ _LT_DECL([], [striplib], [1])
 ])# _LT_CMD_STRIPLIB
 
 
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x@S|@2 in
+    x)
+        ;;
+    *:)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+        ;;
+    x:*)
+        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+        ;;
+    *)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
 # _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
@@ -2037,47 +2283,63 @@ m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
        [], [
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -2087,14 +2349,20 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -2111,56 +2379,109 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[[01]] | aix4.[[01]].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
           echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+          echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
        :
       else
        can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -2170,27 +2491,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2202,16 +2523,17 @@ bsdi[[45]]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -2227,37 +2549,84 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH 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.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        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}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -2267,8 +2636,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2278,18 +2647,14 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2297,25 +2662,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2334,13 +2700,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -2357,14 +2726,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -2372,8 +2742,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -2382,20 +2752,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2406,16 +2778,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
+       if test yes = "$lt_cv_prog_gnu_ld"; then
+               version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
        fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -2434,8 +2806,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -2444,35 +2816,65 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+        [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -2502,12 +2904,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -2516,8 +2918,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -2526,58 +2928,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  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
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -2585,11 +2997,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -2599,20 +3011,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -2633,24 +3045,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/necthen
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -2665,19 +3077,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2686,20 +3098,30 @@ uts4*)
   ;;
 esac
 AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
 _LT_DECL([], [variables_saved_for_relink], [1],
     [Variables whose values should be saved in libtool wrapper scripts and
     restored at link time])
@@ -2717,6 +3139,8 @@ _LT_DECL([], [library_names_spec], [1],
     The last name is the one that the linker finds with -lNAME]])
 _LT_DECL([], [soname_spec], [1],
     [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
 _LT_DECL([], [postinstall_cmds], [2],
     [Command to use after installation of a shared archive])
 _LT_DECL([], [postuninstall_cmds], [2],
@@ -2730,39 +3154,41 @@ _LT_DECL([], [hardcode_into_libs], [0],
     [Whether we should hardcode library paths into libraries])
 _LT_DECL([], [sys_lib_search_path_spec], [2],
     [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
+    [Detected run-time system search path for libraries])
+_LT_DECL([], [configure_time_lt_sys_library_path], [2],
+    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
 ])# _LT_SYS_DYNAMIC_LINKER
 
 
 # _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# find a file program which can recognize shared library
+# find a file program that can recognize shared library
 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 [m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
 [[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
   ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+    if test -f "$ac_dir/$1"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         MAGIC_CMD=$lt_cv_path_MAGIC_CMD
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
            :
@@ -2785,11 +3211,11 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   AC_MSG_RESULT($MAGIC_CMD)
 else
@@ -2807,7 +3233,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
 # _LT_PATH_MAGIC
 # --------------
-# find a file program which can recognize a shared library
+# find a file program that can recognize a shared library
 m4_defun([_LT_PATH_MAGIC],
 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -2829,20 +3255,21 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
+    [test no = "$withval" || with_gnu_ld=yes],
     [with_gnu_ld=no])dnl
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -2856,7 +3283,7 @@ if test "$GCC" = yes; then
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
        ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -2867,37 +3294,37 @@ if test "$GCC" = yes; then
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   AC_MSG_CHECKING([for GNU ld])
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(lt_cv_path_LD,
 [if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
+       test no != "$with_gnu_ld" && break
        ;;
       *)
-       test "$with_gnu_ld" != yes && break
+       test yes != "$with_gnu_ld" && break
        ;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi])
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   AC_MSG_RESULT($LD)
 else
@@ -2950,19 +3377,61 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test yes != "$GCC"; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
     ;;
 esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+  [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
 # _LT_CHECK_MAGIC_METHOD
 # ----------------------
 # how to check for library dependencies
@@ -2978,13 +3447,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[[4-9]]*)
@@ -3015,12 +3484,13 @@ mingw* | pw32*)
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -3046,7 +3516,7 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
+haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3058,11 +3528,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -3083,8 +3553,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3106,8 +3576,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3160,8 +3630,26 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 ])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -3169,7 +3657,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 _LT_DECL([], [deplibs_check_method], [1],
     [Method to check whether dependent libraries are shared objects])
 _LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 ])# _LT_CHECK_MAGIC_METHOD
 
 
@@ -3181,33 +3673,38 @@ AC_DEFUN([LT_PATH_NM],
 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
        # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
        #   nm: unknown option "B" ignored
        # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
+       # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+       case $build_os in
+       mingw*) lt_bad_file=conftest.nm/nofile ;;
+       *) lt_bad_file=/dev/null ;;
+       esac
+       case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+       *$lt_bad_file* | *'Invalid file or object type'*)
          lt_cv_path_NM="$tmp_nm -B"
-         break
+         break 2
          ;;
        *)
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
          */dev/null*)
            lt_cv_path_NM="$tmp_nm -p"
-           break
+           break 2
            ;;
          *)
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3218,18 +3715,30 @@ else
        esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols -headers"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
   AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -3239,13 +3748,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -3260,6 +3769,82 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AM_PROG_NM], [])
 dnl AC_DEFUN([AC_PROG_NM], [])
 
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test yes != "$lt_cv_path_mainfest_tool"; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+  test DEF = "`$SED -n dnl
+    -e '\''s/^[[        ]]*//'\'' dnl Strip leading whitespace
+    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
+    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[  ]].*\)*$/DEF/p'\'' dnl
+    -e q dnl                          Only consider the first "real" line
+    $1`" dnl
+])# _LT_DLL_DEF_P
+
 
 # LT_LIB_M
 # --------
@@ -3268,15 +3853,15 @@ AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
   ;;
 *)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  AC_CHECK_LIB(m, cos, LIBM=-lm)
   ;;
 esac
 AC_SUBST([LIBM])
@@ -3295,8 +3880,13 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+if test yes = "$GCC"; then
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
 
   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
@@ -3313,6 +3903,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
 AC_REQUIRE([LT_PATH_LD])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -3341,7 +3932,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[[ABCDEGRST]]'
   fi
   ;;
@@ -3374,14 +3965,44 @@ case `$NM -V 2>&1` in
   symcode='[[ABCDGIRSTW]]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -3399,24 +4020,29 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -3438,7 +4064,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -3450,6 +4076,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
          cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t@_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -3461,7 +4099,7 @@ _LT_EOF
          cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT@&t@_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -3469,7 +4107,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
          cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -3487,15 +4125,15 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
          # Now try linking the two files.
          mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
+         lt_globsym_save_LIBS=$LIBS
+         lt_globsym_save_CFLAGS=$CFLAGS
+         LIBS=conftstm.$ac_objext
          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+         if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
+         LIBS=$lt_globsym_save_LIBS
+         CFLAGS=$lt_globsym_save_CFLAGS
        else
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
        fi
@@ -3512,7 +4150,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -3528,16 +4166,29 @@ else
   AC_MSG_RESULT(ok)
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
     [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+    [Transform the output of nm into a list of symbols to manually relocate])
 _LT_DECL([global_symbol_to_c_name_address],
     [lt_cv_sys_global_symbol_to_c_name_address], [1],
     [Transform the output of nm in a C name address pair])
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+    [The name lister interface])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
 
 
@@ -3549,20 +4200,20 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
+  if test yes = "$GXX"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -3573,8 +4224,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -3590,6 +4241,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+       ;;
+      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -3600,6 +4256,11 @@ m4_if([$1], [CXX], [
       # DJGPP does not support shared libraries at all
       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
       ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
     interix[[3-9]]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
@@ -3634,7 +4295,7 @@ m4_if([$1], [CXX], [
     case $host_os in
       aix[[4-9]]*)
        # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
+       if test ia64 = "$host_cpu"; then
          # AIX 5 now supports IA64 processor
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        else
@@ -3649,6 +4310,12 @@ m4_if([$1], [CXX], [
          ;;
        esac
        ;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+       # This hack is so that the source file can tell whether it is being
+       # built for inclusion in a dll (and should export symbols for example).
+       m4_if([$1], [GCJ], [],
+         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+       ;;
       dgux*)
        case $cc_basename in
          ec++*)
@@ -3669,14 +4336,14 @@ m4_if([$1], [CXX], [
        case $cc_basename in
          CC*)
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+           if test ia64 != "$host_cpu"; then
              _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
            fi
            ;;
          aCC*)
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
            case $host_cpu in
            hppa*64*|ia64*)
              # +Z the default
@@ -3705,7 +4372,7 @@ m4_if([$1], [CXX], [
            ;;
        esac
        ;;
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
        case $cc_basename in
          KCC*)
            # KAI C++ Compiler
@@ -3713,7 +4380,7 @@ m4_if([$1], [CXX], [
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
            ;;
          ecpc* )
-           # old Intel C++ for x86_64 which still supported -KPIC.
+           # old Intel C++ for x86_64, which still supported -KPIC.
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -3738,8 +4405,8 @@ m4_if([$1], [CXX], [
            _LT_TAGVAR(lt_prog_compiler_pic, $1)=
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
            ;;
-         xlc* | xlC*)
-           # IBM XL 8.0 on PPC
+         xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+           # IBM XL 8.0, 9.0 on PPC and BlueGene
            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -3801,7 +4468,7 @@ m4_if([$1], [CXX], [
        ;;
       solaris*)
        case $cc_basename in
-         CC*)
+         CC* | sunCC*)
            # Sun C++ 4.2, 5.x and Centerline C++
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -3858,17 +4525,18 @@ m4_if([$1], [CXX], [
   fi
 ],
 [
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -3879,8 +4547,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -3897,6 +4565,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -3905,6 +4578,12 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -3947,12 +4626,21 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # AIX 5 now supports IA64 processor
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
@@ -3960,11 +4648,30 @@ m4_if([$1], [CXX], [
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       m4_if([$1], [GCJ], [],
        [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+       ;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -3980,7 +4687,7 @@ m4_if([$1], [CXX], [
        ;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -3989,9 +4696,9 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4010,7 +4717,19 @@ m4_if([$1], [CXX], [
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+       # NAG Fortran compiler
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       ;;
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
        # which looks to be a dead project)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4022,25 +4741,40 @@ m4_if([$1], [CXX], [
         # All Alpha code is PIC.
         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
-      xl*)
-       # IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
        ;;
       *)
        case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+         ;;
+       *Sun\ F* | *Sun*Fortran*)
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+         ;;
        *Sun\ C*)
          # Sun C 5.9
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
          ;;
-       *Sun\ F*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+        *Intel*\ [[CF]]*Compiler*)
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+         ;;
+       *Portland\ Group*)
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
          ;;
        esac
        ;;
@@ -4072,7 +4806,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
       *)
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
@@ -4092,7 +4826,7 @@ m4_if([$1], [CXX], [
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/necthen
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
@@ -4121,7 +4855,7 @@ m4_if([$1], [CXX], [
   fi
 ])
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
     ;;
@@ -4129,9 +4863,11 @@ case $host_os in
     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
     ;;
 esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-       [How to pass a linker flag through the compiler])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4150,6 +4886,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
        [Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+       [How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
@@ -4170,6 +4908,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 m4_defun([_LT_LINKER_SHLIBS],
 [AC_REQUIRE([LT_PATH_LD])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -4178,30 +4917,44 @@ m4_require([_LT_TAG_COMPILER])dnl
 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 m4_if([$1], [CXX], [
   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+    # Without the "-l" option, or with the "-B" option, AIX nm treats
+    # weak defined symbols like other global defined symbols, whereas
+    # GNU nm marks them as "W".
+    # While the 'weak' keyword is ignored in the Export File, we need
+    # it in the Import File for the 'aix-soname' feature, so we have
+    # to replace the "-B" option with "-P" for AIX nm.
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
+    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+    ;;
   cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  linux* | k*bsd*-gnu)
+    case $cc_basename in
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
+  linux* | k*bsd*-gnu | gnu*)
     _LT_TAGVAR(link_all_deplibs, $1)=no
-  ;;
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    ;;
   esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 ], [
   runpath_var=
   _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -4216,7 +4969,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4232,9 +4984,9 @@ m4_if([$1], [CXX], [
   # included in the symbol list
   _LT_TAGVAR(include_expsyms, $1)=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -4250,7 +5002,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -4258,30 +5010,60 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu | gnu*)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test yes = "$with_gnu_ld"; then
+    case $host_os in
+      aix*)
+       # The AIX port of GNU ld has always aspired to compatibility
+       # with the native linker.  However, as the warning in the GNU ld
+       # block says, versions before 2.19.5* couldn't really create working
+       # shared libraries, regardless of the interface used.
+       case `$LD -v 2>&1` in
+         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+         *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+         *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+         *)
+           lt_use_gnu_ld_interface=yes
+           ;;
+       esac
+       ;;
+      *)
+       lt_use_gnu_ld_interface=yes
+       ;;
+    esac
+  fi
+
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -4293,15 +5075,16 @@ dnl Note also adjust exclude_expsyms for C++ above.
     case $host_os in
     aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -4311,7 +5094,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -4327,7 +5110,7 @@ _LT_EOF
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
        # support --undefined.  This deserves some investigation.  FIXME
-       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4337,61 +5120,97 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file, use it as
+       # is; otherwise, prepend EXPORTS...
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
-    interix[[3-9]]*)
-      _LT_TAGVAR(hardcode_direct, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
        case $cc_basename in
          diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
        esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
+        && test no = "$tmp_diet"
       then
-       tmp_addflag=
+       tmp_addflag=' $pic_flag'
        tmp_sharedflag='-shared'
        case $cc_basename,$host_cpu in
         pgcc*)                         # Portland Group C compiler
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag'
          ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+       pgf77* | pgf90* | pgf95* | pgfortran*)
+                                       # Portland Group f77 and f90 compilers
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          tmp_addflag=' $pic_flag -Mnomain' ;;
        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
          tmp_addflag=' -i_dynamic' ;;
@@ -4402,39 +5221,47 @@ _LT_EOF
        lf95*)                          # Lahey Fortran 8.1
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
          tmp_sharedflag='--shared' ;;
-       xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
+       xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
          tmp_sharedflag='-qmkshrobj'
          tmp_addflag= ;;
+       nvcc*)  # Cuda Compiler Driver 2.2
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+         _LT_TAGVAR(compiler_needs_object, $1)=yes
+         ;;
        esac
        case `$CC -V 2>&1 | sed 5q` in
        *Sun\ C*)                       # Sun C 5.9
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
          _LT_TAGVAR(compiler_needs_object, $1)=yes
          tmp_sharedflag='-G' ;;
        *Sun\ F*)                       # Sun Fortran 8.3
          tmp_sharedflag='-G' ;;
        esac
-       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
        case $cc_basename in
-       xlf*)
+       tcc*)
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+         ;;
+       xlf* | bgf* | bgxlf* | mpixlf*)
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+         if test yes = "$supports_anon_versioning"; then
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
          fi
          ;;
        esac
@@ -4448,8 +5275,8 @@ _LT_EOF
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        wlarc=
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4467,8 +5294,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4480,7 +5307,7 @@ _LT_EOF
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -4495,9 +5322,9 @@ _LT_EOF
          # DT_RUNPATH tag from executables and libraries.  But doing so
          # requires that you compile everything twice, which is a pain.
          if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
          else
            _LT_TAGVAR(ld_shlibs, $1)=no
          fi
@@ -4514,15 +5341,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
     esac
 
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
       runpath_var=
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -4538,7 +5365,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
        # Neither direct hardcoding nor static linking is supported with a
        # broken collect2.
        _LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -4546,32 +5373,57 @@ _LT_EOF
       ;;
 
     aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
        # On IA64, the linker does run time linking by default, so we don't
        # have to do anything special.
        aix_use_runtimelinking=no
        exp_sym_flag='-Bexport'
-       no_entry_flag=""
+       no_entry_flag=
       else
        # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+       # Without the "-l" option, or with the "-B" option, AIX nm treats
+       # weak defined symbols like other global defined symbols, whereas
+       # GNU nm marks them as "W".
+       # While the 'weak' keyword is ignored in the Export File, we need
+       # it in the Import File for the 'aix-soname' feature, so we have
+       # to replace the "-B" option with "-P" for AIX nm.
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
        else
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+         _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
        fi
        aix_use_runtimelinking=no
 
        # Test if we are trying to use run time linking or normal
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
+       # have runtime linking enabled, and use it for executables.
+       # For shared libraries, we enable/disable runtime linking
+       # depending on the kind of the shared library created -
+       # when "with_aix_soname,aix_use_runtimelinking" is:
+       # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "aix,yes"  lib.so          shared, rtl:yes, for executables
+       #            lib.a           static archive
+       # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+       #            lib.a(lib.so.V) shared, rtl:no,  for executables
+       # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a(lib.so.V) shared, rtl:no
+       # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+       #            lib.a           static archive
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
          for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
            aix_use_runtimelinking=yes
            break
          fi
          done
+         if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+           # With aix-soname=svr4, we create the lib.so.V shared archives only,
+           # so we don't have lib.a shared libs to link our executables.
+           # We have to force runtime linking in this case.
+           aix_use_runtimelinking=yes
+           LDFLAGS="$LDFLAGS -Wl,-brtl"
+         fi
          ;;
        esac
 
@@ -4590,13 +5442,21 @@ _LT_EOF
       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+       # The Import File defines what to hardcode.
+       _LT_TAGVAR(hardcode_direct, $1)=no
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+       ;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
        # We only want to do this on AIX 4.2 and lower, the check
        # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
+         collect2name=`$CC -print-prog-name=collect2`
          if test -f "$collect2name" &&
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
          then
@@ -4615,57 +5475,80 @@ _LT_EOF
          ;;
        esac
        shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
+       if test yes = "$aix_use_runtimelinking"; then
+         shared_flag="$shared_flag "'$wl-G'
        fi
-       _LT_TAGVAR(link_all_deplibs, $1)=no
+       # Need to ensure runtime linking is disabled for the traditional
+       # shared library, or the linker may eventually find shared libraries
+       # /with/ Import File - we do not want to mix them.
+       shared_flag_aix='-shared'
+       shared_flag_svr4='-shared $wl-G'
       else
        # not using gcc
-       if test "$host_cpu" = ia64; then
+       if test ia64 = "$host_cpu"; then
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
        # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
        else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
+         if test yes = "$aix_use_runtimelinking"; then
+           shared_flag='$wl-G'
          else
-           shared_flag='${wl}-bM:SRE'
+           shared_flag='$wl-bM:SRE'
          fi
+         shared_flag_aix='$wl-bM:SRE'
+         shared_flag_svr4='$wl-G'
        fi
       fi
 
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
        # Warning - without using the other runtime loading flags (-brtl),
        # -berok will link without error, but may produce a broken library.
        _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_SYS_MODULE_PATH_AIX([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-       if test "$host_cpu" = ia64; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+       if test ia64 = "$host_cpu"; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
          _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
        else
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_SYS_MODULE_PATH_AIX([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
-         _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+         _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+         if test yes = "$with_gnu_ld"; then
+           # We only use this code for GNU lds that support --whole-archive.
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+         else
+           # Exported symbols can be pulled into shared objects from archives
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         fi
          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+         # -brtl affects multiple linker settings, -berok does not and is overridden later
+         compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+         if test svr4 != "$with_aix_soname"; then
+           # This is similar to how AIX traditionally builds its shared libraries.
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+         fi
+         if test aix != "$with_aix_soname"; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+         else
+           # used by -dlpreopen to get the symbols
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+         fi
+         _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
        fi
       fi
       ;;
@@ -4674,7 +5557,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -4694,20 +5577,65 @@ _LT_EOF
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      case $cc_basename in
+      cl*)
+       # Native MSVC
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       _LT_TAGVAR(always_export_symbols, $1)=yes
+       _LT_TAGVAR(file_list_spec, $1)='@'
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=.dll
+       # FIXME: Setting linknames here is a bad hack.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
+       # The linker will not automatically build a static lib if we build a DLL.
+       # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+       # Don't use ranlib
+       _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+       _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
+       ;;
+      *)
+       # Assume MSVC wrapper
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Tell ltmain to make .lib files, not .a files.
+       libext=lib
+       # Tell ltmain to make .dll files, not .so files.
+       shrext_cmds=.dll
+       # FIXME: Setting linknames here is a bad hack.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+       # The linker will automatically build a .lib file if we build a DLL.
+       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+       # FIXME: Should let the user specify the lib program.
+       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       ;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4720,10 +5648,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -4736,7 +5660,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -4745,41 +5669,40 @@ _LT_EOF
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_direct, $1)=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
        # hardcode_minus_L: Not really in the search PATH,
        # but as the default location of the library.
        _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -4787,33 +5710,40 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
        case $host_cpu in
        hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        esac
       else
        case $host_cpu in
        hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+       m4_if($1, [], [
+         # Older versions of the 11.00 compiler do not understand -b yet
+         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+         _LT_LINKER_OPTION([if $CC understands -b],
+           _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+           [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+           [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+         [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
          ;;
        esac
       fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
        case $host_cpu in
@@ -4824,7 +5754,7 @@ _LT_EOF
        *)
          _LT_TAGVAR(hardcode_direct, $1)=yes
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 
          # hardcode_minus_L: Not really in the search PATH,
          # but as the default location of the library.
@@ -4835,28 +5765,54 @@ _LT_EOF
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
        # Try to use the -exported_symbol ld option, if it does not
        # work, assume that -exports_file does not work either and
        # implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
+       # This should be the same for all languages, so no per-tag cache variable.
+       AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+         [lt_cv_irix_exported_symbol],
+         [save_LDFLAGS=$LDFLAGS
+          LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+          AC_LINK_IFELSE(
+            [AC_LANG_SOURCE(
+               [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+                             [C++], [[int foo (void) { return 0; }]],
+                             [Fortran 77], [[
+      subroutine foo
+      end]],
+                             [Fortran], [[
+      subroutine foo
+      end]])])],
+             [lt_cv_irix_exported_symbol=yes],
+             [lt_cv_irix_exported_symbol=no])
+           LDFLAGS=$save_LDFLAGS])
+       if test yes = "$lt_cv_irix_exported_symbol"; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+       fi
+       _LT_TAGVAR(link_all_deplibs, $1)=no
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(inherit_rpath, $1)=yes
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+       # Fabrice Bellard et al's Tiny C Compiler
+       _LT_TAGVAR(ld_shlibs, $1)=yes
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      esac
+      ;;
+
     netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -4871,7 +5827,7 @@ _LT_EOF
     newsos6)
       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
@@ -4879,27 +5835,19 @@ _LT_EOF
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
        else
-         case $host_os in
-          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-            _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-            ;;
-          *)
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-            ;;
-         esac
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
        fi
       else
        _LT_TAGVAR(ld_shlibs, $1)=no
@@ -4910,33 +5858,53 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+       $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+       $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+       $ECHO EXPORTS >> $output_objdir/$libname.def~
+       prefix_cmds="$SED"~
+       if test EXPORTS = "`$SED 1q $export_symbols`"; then
+         prefix_cmds="$prefix_cmds -e 1d";
+       fi~
+       prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+       cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+       $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+       emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       else
        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
        # Both c and cxx compiler support -rpath directly
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -4947,24 +5915,24 @@ _LT_EOF
 
     solaris*)
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       wlarc='$wl'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
        case `$CC -V 2>&1` in
        *"Compilers 5.0"*)
          wlarc=''
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
          ;;
        *)
-         wlarc='${wl}'
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         wlarc='$wl'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
          ;;
        esac
       fi
@@ -4974,11 +5942,11 @@ _LT_EOF
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
        # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but understands '-z linker_flag'.  GCC discards it without '$wl',
        # but is careful enough not to reorder.
        # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       if test yes = "$GCC"; then
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
        else
          _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
        fi
@@ -4988,10 +5956,10 @@ _LT_EOF
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
        # Use $CC to link under sequent, because it throws in some extra .o
        # files that make .init and .fini sections work.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
        _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -5040,43 +6008,43 @@ _LT_EOF
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -5091,17 +6059,17 @@ _LT_EOF
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
        ;;
       esac
     fi
   fi
 ])
 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
@@ -5118,7 +6086,7 @@ x|xyes)
   # Assume -lc should be added
   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -5127,36 +6095,38 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-       pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+       [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+       [$RM conftest*
+       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+         soname=conftest
+         lib=conftest
+         libobjs=conftest.$ac_objext
+         deplibs=
+         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+         compiler_flags=-v
+         linker_flags=-v
+         verstring=
+         output_objdir=.
+         libname=conftest
+         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+         _LT_TAGVAR(allow_undefined_flag, $1)=
+         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+         then
+           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+         else
+           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+         fi
+         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+       else
+         cat conftest.err 1>&5
+       fi
+       $RM conftest*
+       ])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
       ;;
     esac
   fi
@@ -5193,18 +6163,15 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
     [Flag to hardcode $libdir into a binary during linking.
     This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary])
 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    "absolute", i.e impossible to change by setting $shlibpath_var if the
     library is relocated])
 _LT_TAGDECL([], [hardcode_minus_L], [0],
     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -5221,8 +6188,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
     to runtime path list])
 _LT_TAGDECL([], [link_all_deplibs], [0],
     [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
 _LT_TAGDECL([], [always_export_symbols], [0],
     [Set to "yes" if exported symbols are required])
 _LT_TAGDECL([], [export_symbols_cmds], [2],
@@ -5233,6 +6198,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
     [Symbols that must always be exported])
 _LT_TAGDECL([], [prelink_cmds], [2],
     [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
 _LT_TAGDECL([], [file_list_spec], [1],
     [Specify filename containing input files])
 dnl FIXME: Not yet implemented
@@ -5245,10 +6212,10 @@ dnl    [Compiler flag to generate thread safe objects])
 # ------------------------
 # Ensure that the configuration variables for a C compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_C_CONFIG],
 [m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
+lt_save_CC=$CC
 AC_LANG_PUSH(C)
 
 # Source file extension for C test sources.
@@ -5288,18 +6255,18 @@ if test -n "$compiler"; then
   LT_SYS_DLOPEN_SELF
   _LT_CMD_STRIPLIB
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   AC_MSG_CHECKING([if libtool supports shared libraries])
   AC_MSG_RESULT([$can_build_shared])
 
   AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -5307,8 +6274,12 @@ if test -n "$compiler"; then
     ;;
 
   aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;                  # shared object as lib.so file only
+      yes,svr4,*) ;;                   # shared object as lib.so archive member only
+      yes,*) enable_static=no ;;       # shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -5316,47 +6287,32 @@ if test -n "$compiler"; then
 
   AC_MSG_CHECKING([whether to build static libraries])
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   AC_MSG_RESULT([$enable_static])
 
   _LT_CONFIG($1)
 fi
 AC_LANG_POP
-CC="$lt_save_CC"
+CC=$lt_save_CC
 ])# _LT_LANG_C_CONFIG
 
 
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
 # _LT_LANG_CXX_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test no != "$CXX" &&
+    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+    (test g++ != "$CXX"))); then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
 
 AC_LANG_PUSH(C++)
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5368,7 +6324,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -5378,6 +6333,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -5393,7 +6350,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -5409,6 +6366,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -5426,6 +6384,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -5433,35 +6392,35 @@ if test "$_lt_caught_CXX_error" != yes; then
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
     else
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
     fi
 
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       # Set up default GNU C++ configuration
 
       LT_PATH_LD
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if test yes = "$with_gnu_ld"; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
+        wlarc='$wl'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
          $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
         else
           _LT_TAGVAR(whole_archive_flag_spec, $1)=
         fi
@@ -5480,7 +6439,7 @@ if test "$_lt_caught_CXX_error" != yes; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -5497,18 +6456,30 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=no
         ;;
       aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
+        if test ia64 = "$host_cpu"; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=""
+          no_entry_flag=
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
+          # have runtime linking enabled, and use it for executables.
+          # For shared libraries, we enable/disable runtime linking
+          # depending on the kind of the shared library created -
+          # when "with_aix_soname,aix_use_runtimelinking" is:
+          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "aix,yes"  lib.so          shared, rtl:yes, for executables
+          #            lib.a           static archive
+          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+          #            lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a(lib.so.V) shared, rtl:no
+          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a           static archive
           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
            for ld_flag in $LDFLAGS; do
              case $ld_flag in
@@ -5518,6 +6489,13 @@ if test "$_lt_caught_CXX_error" != yes; then
                ;;
              esac
            done
+           if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+             # With aix-soname=svr4, we create the lib.so.V shared archives only,
+             # so we don't have lib.a shared libs to link our executables.
+             # We have to force runtime linking in this case.
+             aix_use_runtimelinking=yes
+             LDFLAGS="$LDFLAGS -Wl,-brtl"
+           fi
            ;;
           esac
 
@@ -5536,13 +6514,21 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+        case $with_aix_soname,$aix_use_runtimelinking in
+        aix,*) ;;      # no import file
+        svr4,* | *,yes) # use import file
+          # The Import File defines what to hardcode.
+          _LT_TAGVAR(hardcode_direct, $1)=no
+          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+          ;;
+        esac
 
-        if test "$GXX" = yes; then
+        if test yes = "$GXX"; then
           case $host_os in aix4.[[012]]|aix4.[[012]].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
+         collect2name=`$CC -print-prog-name=collect2`
          if test -f "$collect2name" &&
             strings "$collect2name" | $GREP resolve_lib_name >/dev/null
          then
@@ -5560,59 +6546,84 @@ if test "$_lt_caught_CXX_error" != yes; then
          fi
           esac
           shared_flag='-shared'
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag="$shared_flag "'${wl}-G'
+         if test yes = "$aix_use_runtimelinking"; then
+           shared_flag=$shared_flag' $wl-G'
          fi
+         # Need to ensure runtime linking is disabled for the traditional
+         # shared library, or the linker may eventually find shared libraries
+         # /with/ Import File - we do not want to mix them.
+         shared_flag_aix='-shared'
+         shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test "$host_cpu" = ia64; then
+          if test ia64 = "$host_cpu"; then
          # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
          # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
           else
-           if test "$aix_use_runtimelinking" = yes; then
-             shared_flag='${wl}-G'
+           if test yes = "$aix_use_runtimelinking"; then
+             shared_flag='$wl-G'
            else
-             shared_flag='${wl}-bM:SRE'
+             shared_flag='$wl-bM:SRE'
            fi
+           shared_flag_aix='$wl-bM:SRE'
+           shared_flag_svr4='$wl-G'
           fi
         fi
 
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
        # export.
         _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
+       if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # The "-G" linker flag allows undefined symbols.
+          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          _LT_SYS_MODULE_PATH_AIX
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+          _LT_SYS_MODULE_PATH_AIX([$1])
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
-          if test "$host_cpu" = ia64; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+          if test ia64 = "$host_cpu"; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
            _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
           else
            # Determine the default libpath from the value encoded in an
            # empty executable.
-           _LT_SYS_MODULE_PATH_AIX
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+           _LT_SYS_MODULE_PATH_AIX([$1])
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
            # Warning - without using the other run time loading flags,
            # -berok will link without error, but may produce a broken library.
-           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-           # Exported symbols can be pulled into shared objects from archives
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+           _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+           _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+           if test yes = "$with_gnu_ld"; then
+             # We only use this code for GNU lds that support --whole-archive.
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+           else
+             # Exported symbols can be pulled into shared objects from archives
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+           fi
            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-           # This is similar to how AIX traditionally builds its shared
-           # libraries.
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+           # -brtl affects multiple linker settings, -berok does not and is overridden later
+           compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+           if test svr4 != "$with_aix_soname"; then
+             # This is similar to how AIX traditionally builds its shared
+             # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+             _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+           fi
+           if test aix != "$with_aix_soname"; then
+             _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+           else
+             # used by -dlpreopen to get the symbols
+             _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+           fi
+           _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
           fi
         fi
         ;;
@@ -5622,7 +6633,7 @@ if test "$_lt_caught_CXX_error" != yes; then
          _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
          # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
          # support --undefined.  This deserves some investigation.  FIXME
-         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
        else
          _LT_TAGVAR(ld_shlibs, $1)=no
        fi
@@ -5638,32 +6649,108 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           cp $export_symbols $output_objdir/$soname.def;
-          else
-           echo EXPORTS > $output_objdir/$soname.def;
-           cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
+       case $GXX,$cc_basename in
+       ,cl* | no,cl*)
+         # Native MSVC
+         # hardcode_libdir_flag_spec is actually meaningless, as there is
+         # no search path for DLLs.
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         _LT_TAGVAR(always_export_symbols, $1)=yes
+         _LT_TAGVAR(file_list_spec, $1)='@'
+         # Tell ltmain to make .lib files, not .a files.
+         libext=lib
+         # Tell ltmain to make .dll files, not .so files.
+         shrext_cmds=.dll
+         # FIXME: Setting linknames here is a bad hack.
+         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+         _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
+         # The linker will not automatically build a static lib if we build a DLL.
+         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+         # Don't use ranlib
+         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
+         ;;
+       *)
+         # g++
+         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+         # as there is no search path for DLLs.
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         _LT_TAGVAR(always_export_symbols, $1)=no
+         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+           # If the export-symbols file already is a .def file, use it as
+           # is; otherwise, prepend EXPORTS...
+           _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+         else
+           _LT_TAGVAR(ld_shlibs, $1)=no
+         fi
+         ;;
+       esac
+       ;;
       darwin* | rhapsody*)
         _LT_DARWIN_LINKER_FEATURES($1)
        ;;
 
+      os2*)
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       shrext_cmds=.dll
+       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+         $ECHO EXPORTS >> $output_objdir/$libname.def~
+         emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+         emximp -o $lib $output_objdir/$libname.def'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+         $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+         $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+         $ECHO EXPORTS >> $output_objdir/$libname.def~
+         prefix_cmds="$SED"~
+         if test EXPORTS = "`$SED 1q $export_symbols`"; then
+           prefix_cmds="$prefix_cmds -e 1d";
+         fi~
+         prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+         cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+         $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+         emximp -o $lib $output_objdir/$libname.def'
+       _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+       ;;
+
       dgux*)
         case $cc_basename in
           ec++*)
@@ -5682,7 +6769,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
        # switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5698,13 +6785,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
-      gnu*)
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
         ;;
 
       hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
         _LT_TAGVAR(hardcode_direct, $1)=yes
         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
                                             # but as the default
@@ -5716,7 +6805,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -5725,11 +6814,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            if test yes = "$GXX"; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5739,15 +6828,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        if test no = "$with_gnu_ld"; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+             _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
               ;;
           esac
         fi
@@ -5773,13 +6862,13 @@ if test "$_lt_caught_CXX_error" != yes; then
           aCC*)
            case $host_cpu in
              hppa*64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                ;;
              ia64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                ;;
              *)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                ;;
            esac
            # Commands to make compiler produce verbose output that lists
@@ -5790,20 +6879,20 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
           *)
-           if test "$GXX" = yes; then
-             if test $with_gnu_ld = no; then
+           if test yes = "$GXX"; then
+             if test no = "$with_gnu_ld"; then
                case $host_cpu in
                  hppa*64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                  ia64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                  *)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
                    ;;
                esac
              fi
@@ -5818,22 +6907,22 @@ if test "$_lt_caught_CXX_error" != yes; then
       interix[[3-9]]*)
        _LT_TAGVAR(hardcode_direct, $1)=no
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
        # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
        # Instead, shared libraries are loaded at an image base (0x10000000 by
        # default) and relocated if they conflict, which is a slow very memory
        # consuming and fragmenting process.  To avoid this, we pick a random,
        # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
        # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
        ;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
            # SGI C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 
            # Archives containing C++ object files must be created using
            # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -5842,22 +6931,22 @@ if test "$_lt_caught_CXX_error" != yes; then
            _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
            ;;
           *)
-           if test "$GXX" = yes; then
-             if test "$with_gnu_ld" = no; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+           if test yes = "$GXX"; then
+             if test no = "$with_gnu_ld"; then
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
              else
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
              fi
            fi
            _LT_TAGVAR(link_all_deplibs, $1)=yes
            ;;
         esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
            # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -5865,8 +6954,8 @@ if test "$_lt_caught_CXX_error" != yes; then
            # KCC will only create a shared library if the output file
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
            # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
@@ -5875,10 +6964,10 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
            # Archives containing C++ object files must be created using
            # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -5892,59 +6981,59 @@ if test "$_lt_caught_CXX_error" != yes; then
            # earlier do not add the objects themselves.
            case `$CC -V 2>&1` in
              *"Version 7."*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
                ;;
              *)  # Version 8.0 or newer
                tmp_idyn=
                case $host_cpu in
                  ia64*) tmp_idyn=' -i_dynamic';;
                esac
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
                ;;
            esac
            _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
            ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
            case `$CC -V` in
-           *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+           *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
              _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
              _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-               $RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
              _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
              _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
              ;;
-           *) # Version 6 will use weak symbols
-             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+           *) # Version 6 and above use weak symbols
+             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
              ;;
            esac
 
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
             ;;
          cxx*)
            # Compaq C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
 
            runpath_var=LD_RUN_PATH
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5958,18 +7047,18 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
            ;;
-         xl*)
+         xl* | mpixl* | bgxl*)
            # IBM XL 8.0 on PPC, with GNU ld
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           if test "x$supports_anon_versioning" = xyes; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+           if test yes = "$supports_anon_versioning"; then
              _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-               echo "local: *; };" >> $output_objdir/$libname.ver~
-               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
            fi
            ;;
          *)
@@ -5977,16 +7066,16 @@ if test "$_lt_caught_CXX_error" != yes; then
            *Sun\ C*)
              # Sun C++ 5.9
              _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+             _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
              _LT_TAGVAR(compiler_needs_object, $1)=yes
 
              # Not sure whether something based on
              # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
              # would be better.
-             output_verbose_link_cmd='echo'
+             output_verbose_link_cmd='func_echo_all'
 
              # Archives containing C++ object files must be created using
              # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6038,24 +7127,19 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
        ;;
 
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      openbsd*)
+      openbsd* | bitrig*)
        if test -f /usr/libexec/ld.so; then
          _LT_TAGVAR(hardcode_direct, $1)=yes
          _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
          _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
          fi
-         output_verbose_link_cmd=echo
+         output_verbose_link_cmd=func_echo_all
        else
          _LT_TAGVAR(ld_shlibs, $1)=no
        fi
@@ -6069,9 +7153,9 @@ if test "$_lt_caught_CXX_error" != yes; then
            # KCC will only create a shared library if the output file
            # ends with ".so" (or ".sl" for HP-UX), so rename the library
            # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
            _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
            # Archives containing C++ object files must be created using
@@ -6089,17 +7173,17 @@ if test "$_lt_caught_CXX_error" != yes; then
           cxx*)
            case $host in
              osf3*)
-               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+               _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
                ;;
              *)
                _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-                 echo "-hidden">> $lib.exp~
-                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
-                 $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
                _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
                ;;
            esac
@@ -6114,27 +7198,27 @@ if test "$_lt_caught_CXX_error" != yes; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
          *)
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+           if test yes,no = "$GXX,$with_gnu_ld"; then
+             _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
              case $host in
                osf3*)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
                  ;;
                *)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
                  ;;
              esac
 
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
              _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
              # Commands to make compiler produce verbose output that lists
              # what "hidden" libraries, object files and flags are used when
              # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
            else
              # FIXME: insert proper C++ library support
@@ -6170,13 +7254,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
            # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
            _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6184,14 +7268,14 @@ if test "$_lt_caught_CXX_error" != yes; then
              solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
              *)
                # The compiler driver will combine and reorder linker options,
-               # but understands `-z linker_flag'.
+               # but understands '-z linker_flag'.
                # Supported since Solaris 2.6 (maybe 2.5.1?)
                _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
                ;;
            esac
            _LT_TAGVAR(link_all_deplibs, $1)=yes
 
-           output_verbose_link_cmd='echo'
+           output_verbose_link_cmd='func_echo_all'
 
            # Archives containing C++ object files must be created using
            # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6201,42 +7285,42 @@ if test "$_lt_caught_CXX_error" != yes; then
            ;;
           gcx*)
            # Green Hills C++ Compiler
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 
            # The C++ compiler must be used to create the archive.
            _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
            ;;
           *)
            # GNU C++ compiler with Solaris linker
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+           if test yes,no = "$GXX,$with_gnu_ld"; then
+             _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              else
-               # g++ 2.7 appears to require `-G' NOT `-shared' on this
+               # g++ 2.7 appears to require '-G' NOT '-shared' on this
                # platform.
-               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              fi
 
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
              case $host_os in
                solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
                *)
-                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+                 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
                  ;;
              esac
            fi
@@ -6245,48 +7329,52 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
        *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
          ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-       # Note: We can NOT use -z defs as we might desire, because we do not
+       # Note: We CANNOT use -z defs as we might desire, because we do not
        # link with -lc, and that would cause any symbols used from libc to
        # always be unresolved, which means just about no library would
        # ever link correctly.  If we're not using GNU ld we use -z text
        # though, which does catch some bad symbols but isn't as heavy-handed
        # as -z defs.
-       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+       _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+       _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
        _LT_TAGVAR(link_all_deplibs, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
        runpath_var='LD_RUN_PATH'
 
        case $cc_basename in
           CC*)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+              '"$_LT_TAGVAR(old_archive_cmds, $1)"
+           _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+              '"$_LT_TAGVAR(reload_cmds, $1)"
            ;;
          *)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
            ;;
        esac
       ;;
@@ -6317,10 +7405,10 @@ if test "$_lt_caught_CXX_error" != yes; then
     esac
 
     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$GXX
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6338,6 +7426,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -6346,12 +7435,36 @@ if test "$_lt_caught_CXX_error" != yes; then
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
 
 AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
 
 
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case @S|@2 in
+  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6360,6 +7473,7 @@ AC_LANG_POP
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
 _LT_TAGVAR(postdep_objects, $1)=
@@ -6409,7 +7523,20 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 dnl Parse the compiler output and extract the necessary
 dnl objects, libraries and library flags.
 if AC_TRY_EVAL(ac_compile); then
@@ -6421,29 +7548,38 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
         prev=$p
         continue
-       else
-        prev=
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test no = "$pre_test_object_deps_done"; then
+        case $prev in
+        -L | -R)
           # Internal compiler library paths should come after those
           # provided the user.  The postdeps already come after the
           # user supplied libs so there is no need to process them.
           if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+            _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
           else
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
           fi
           ;;
         # The "-l" case would never come before the object being
@@ -6451,13 +7587,15 @@ if AC_TRY_EVAL(ac_compile); then
         esac
        else
         if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-          _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+          _LT_TAGVAR(postdeps, $1)=$prev$p
         else
-          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
         fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -6466,15 +7604,15 @@ if AC_TRY_EVAL(ac_compile); then
         continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
         if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-          _LT_TAGVAR(predep_objects, $1)="$p"
+          _LT_TAGVAR(predep_objects, $1)=$p
         else
           _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
         fi
        else
         if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-          _LT_TAGVAR(postdep_objects, $1)="$p"
+          _LT_TAGVAR(postdep_objects, $1)=$p
         else
           _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
         fi
@@ -6493,6 +7631,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],
@@ -6504,51 +7643,6 @@ interix[[3-9]]*)
   _LT_TAGVAR(postdep_objects,$1)=
   _LT_TAGVAR(postdeps,$1)=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 ])
 
@@ -6557,7 +7651,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
 esac
  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
     [The directories searched by this compiler when creating a shared library])
@@ -6573,32 +7667,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 ])# _LT_SYS_HIDDEN_LIBDEPS
 
 
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
 # _LT_LANG_F77_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test no = "$F77"; then
+  _lt_disable_F77=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6608,7 +7686,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6617,6 +7694,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6632,7 +7711,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the F77 compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
+if test yes != "$_lt_disable_F77"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -6654,9 +7733,11 @@ if test "$_lt_disable_F77" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -6666,21 +7747,25 @@ if test "$_lt_disable_F77" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
+       if test ia64 != "$host_cpu"; then
+         case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+         yes,aix,yes) ;;               # shared object as lib.so file only
+         yes,svr4,*) ;;                # shared object as lib.so archive member only
+         yes,*) enable_static=no ;;    # shared object in lib.a archive as well
+         esac
        fi
         ;;
     esac
@@ -6688,11 +7773,11 @@ if test "$_lt_disable_F77" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$G77
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6709,39 +7794,25 @@ if test "$_lt_disable_F77" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
 
 
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
 # _LT_LANG_FC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test no = "$FC"; then
+  _lt_disable_FC=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6751,7 +7822,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6760,6 +7830,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6775,7 +7847,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the FC compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
+if test yes != "$_lt_disable_FC"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -6797,9 +7869,11 @@ if test "$_lt_disable_FC" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
@@ -6811,21 +7885,25 @@ if test "$_lt_disable_FC" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
+       if test ia64 != "$host_cpu"; then
+         case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+         yes,aix,yes) ;;               # shared object as lib.so file only
+         yes,svr4,*) ;;                # shared object as lib.so archive member only
+         yes,*) enable_static=no ;;    # shared object in lib.a archive as well
+         esac
        fi
         ;;
     esac
@@ -6833,11 +7911,11 @@ if test "$_lt_disable_FC" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6855,8 +7933,9 @@ if test "$_lt_disable_FC" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_FC"
 
 AC_LANG_POP
 ])# _LT_LANG_FC_CONFIG
@@ -6866,7 +7945,7 @@ AC_LANG_POP
 # --------------------------
 # Ensure that the configuration variables for the GNU Java Compiler compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_GCJ_CONFIG],
 [AC_REQUIRE([LT_PROG_GCJ])dnl
 AC_LANG_SAVE
@@ -6892,19 +7971,23 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=yes
 CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
 _LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
 ## CAVEAT EMPTOR:
 ## There is no encapsulation within the following macros, do not change
@@ -6924,15 +8007,87 @@ fi
 AC_LANG_RESTORE
 
 GCC=$lt_save_GCC
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_RC_CONFIG],
 [AC_REQUIRE([LT_PROG_RC])dnl
 AC_LANG_SAVE
@@ -6948,7 +8103,7 @@ _LT_TAGVAR(objext, $1)=$objext
 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
 # Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+lt_simple_link_test_code=$lt_simple_compile_test_code
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_TAG_COMPILER
@@ -6958,10 +8113,12 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
 CC=${RC-"windres"}
+CFLAGS=
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_CC_BASENAME([$compiler])
@@ -6974,7 +8131,8 @@ fi
 
 GCC=$lt_save_GCC
 AC_LANG_RESTORE
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_RC_CONFIG
 
 
@@ -6984,7 +8142,7 @@ AC_DEFUN([LT_PROG_GCJ],
 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
     [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
       AC_SUBST(GCJFLAGS)])])[]dnl
 ])
 
@@ -6994,6 +8152,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
@@ -7033,6 +8198,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 AC_SUBST([OBJDUMP])
 ])
 
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
 
 # _LT_DECL_SED
 # ------------
@@ -7079,7 +8253,7 @@ lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
+  test ! -f "$lt_ac_sed" && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -7096,9 +8270,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
     cmp -s conftest.out conftest.nl || break
     # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
+    test 10 -lt "$lt_ac_count" && break
     lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
+    if test "$lt_ac_count" -gt "$lt_ac_max"; then
       lt_ac_max=$lt_ac_count
       lt_cv_path_SED=$lt_ac_sed
     fi
@@ -7122,27 +8296,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
 # Find out whether the shell is Bourne or XSI compatible,
 # or has some other useful features.
 m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
   lt_unset=false
@@ -7166,208 +8320,69 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine what file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
     ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
     ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
     ;;
-  esac
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
 ])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
index 34151a3..94b0829 100644 (file)
@@ -1,13 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 6 ltoptions.m4
+# serial 8 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -28,7 +29,7 @@ m4_define([_LT_SET_OPTION],
 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
         _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
+    [m4_warning([Unknown $1 option '$2'])])[]dnl
 ])
 
 
@@ -74,13 +75,15 @@ m4_if([$1],[LT_INIT],[
   dnl
   dnl If no reference was made to various pairs of opposing options, then
   dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
   dnl archives by default:
   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-                  [_LT_ENABLE_FAST_INSTALL])
+                  [_LT_ENABLE_FAST_INSTALL])
+  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+                  [_LT_WITH_AIX_SONAME([aix])])
   ])
 ])# _LT_SET_OPTIONS
 
@@ -111,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
 [_LT_SET_OPTION([LT_INIT], [dlopen])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
+put the 'dlopen' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -125,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 [enable_win32_dll=yes
 
 case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
   AC_CHECK_TOOL(AS, as, false)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -133,13 +136,13 @@ case $host in
 esac
 
 test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
 test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
 test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 ])# win32-dll
 
 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
@@ -147,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 _LT_SET_OPTION([LT_INIT], [win32-dll])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
+put the 'win32-dll' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -156,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([shared],
@@ -171,14 +174,14 @@ AC_ARG_ENABLE([shared],
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_shared=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -210,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([static],
@@ -225,14 +228,14 @@ AC_ARG_ENABLE([static],
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_static=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -264,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([fast-install],
@@ -279,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-       IFS="$lt_save_ifs"
+       IFS=$lt_save_ifs
        if test "X$pkg" = "X$p"; then
          enable_fast_install=yes
        fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -303,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
+the 'fast-install' option into LT_INIT's first parameter.])
 ])
 
 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
+the 'disable-fast-install' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -318,19 +321,85 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
 
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+  AC_MSG_CHECKING([which variant of shared library versioning to provide])
+  AC_ARG_WITH([aix-soname],
+    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+    [case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname],
+    [AC_CACHE_VAL([lt_cv_with_aix_soname],
+      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+    with_aix_soname=$lt_cv_with_aix_soname])
+  AC_MSG_RESULT([$with_aix_soname])
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
 # _LT_WITH_PIC([MODE])
 # --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
 # LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for lt_pkg in $withval; do
+       IFS=$lt_save_ifs
+       if test "X$lt_pkg" = "X$lt_p"; then
+         pic_mode=yes
+       fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac],
+    [pic_mode=m4_default([$1], [default])])
 
 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 ])# _LT_WITH_PIC
@@ -343,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
 [_LT_SET_OPTION([LT_INIT], [pic-only])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
+put the 'pic-only' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
index 9000a05..48bc934 100644 (file)
@@ -1,6 +1,7 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -33,7 +34,7 @@ m4_define([_lt_join],
 # ------------
 # Manipulate m4 lists.
 # These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
+# Autoconf-2.59, which quotes differently.
 m4_define([lt_car], [[$1]])
 m4_define([lt_cdr],
 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
 
 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
 # ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
 # Note that neither SEPARATOR nor STRING are expanded; they are appended
 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
index b8e154f..fa04b52 100644 (file)
@@ -1,23 +1,23 @@
 # ltversion.m4 -- version numbers                      -*- Autoconf -*-
 #
-#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# Generated from ltversion.in.
+# @configure_input@
 
-# serial 3012 ltversion.m4
+# serial 4179 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.2.6])
-m4_define([LT_PACKAGE_REVISION], [1.3012])
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6'
-macro_revision='1.3012'
+[macro_version='2.4.6'
+macro_revision='2.4.6'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
index 637bb20..c6b26f8 100644 (file)
@@ -1,17 +1,18 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 4 lt~obsolete.m4
+# serial 5 lt~obsolete.m4
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
 # which have later been changed to m4_define as they aren't part of the
 # exported API, or moved to Autoconf or Automake where they belong.
 #
@@ -25,7 +26,7 @@
 # included after everything else.  This provides aclocal with the
 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 # because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
 #
 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 # Yes, that means every name once taken will need to remain here until
@@ -77,7 +78,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL],  [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
 m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
 m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],             [AC_DEFUN([AC_LIBTOOL_RC])])
 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@@ -90,3 +90,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],       [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],        [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],                [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],        [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],   [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],              [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],               [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],              [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/m4/snprintf.m4 b/m4/snprintf.m4
new file mode 100644 (file)
index 0000000..e176d17
--- /dev/null
@@ -0,0 +1,263 @@
+# $Id: snprintf.m4,v 1.1.1.1 2008/01/06 03:24:00 holger Exp $
+
+# Copyright (c) 2008 Holger Weiss <holger@jhweiss.de>.
+#
+# This code may freely be used, modified and/or redistributed for any purpose.
+# It would be nice if additions and fixes to this file (including trivial code
+# cleanups) would be sent back in order to let me include them in the version
+# available at <http://www.jhweiss.de/software/snprintf.html>.  However, this is
+# not a requirement for using or redistributing (possibly modified) versions of
+# this file, nor is leaving this notice intact mandatory.
+
+# HW_HEADER_STDARG_H
+# ------------------
+# Define HAVE_STDARG_H to 1 if <stdarg.h> is available.
+AC_DEFUN([HW_HEADER_STDARG_H],
+[
+  AC_PREREQ([2.60])dnl Older releases should work if AC_CHECK_HEADERS is used.
+  AC_CHECK_HEADERS_ONCE([stdarg.h])
+])# HW_HEADER_STDARG_H
+
+# HW_HEADER_VARARGS_H
+# -------------------
+# Define HAVE_VARARGS_H to 1 if <varargs.h> is available.
+AC_DEFUN([HW_HEADER_VARARGS_H],
+[
+  AC_PREREQ([2.60])dnl Older releases should work if AC_CHECK_HEADERS is used.
+  AC_CHECK_HEADERS_ONCE([varargs.h])
+])# HW_HEADER_VARARGS_H
+
+# HW_FUNC_VA_COPY
+# ---------------
+# Set $hw_cv_func_va_copy to "yes" or "no".  Define HAVE_VA_COPY to 1 if
+# $hw_cv_func_va_copy is set to "yes".  Note that it's "unspecified whether
+# va_copy and va_end are macros or identifiers declared with external linkage."
+# (C99: 7.15.1, 1)  Therefore, the presence of va_copy(3) cannot simply "be
+# tested with #ifdef", as suggested by the Autoconf manual (5.5.1).
+AC_DEFUN([HW_FUNC_VA_COPY],
+[
+  AC_REQUIRE([HW_HEADER_STDARG_H])dnl Our check evaluates HAVE_STDARG_H.
+  AC_REQUIRE([HW_HEADER_VARARGS_H])dnl Our check evaluates HAVE_VARARGS_H.
+  AC_CACHE_CHECK([for va_copy],
+    [hw_cv_func_va_copy],
+    [AC_RUN_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[#if HAVE_STDARG_H
+        #include <stdarg.h>
+        #elif HAVE_VARARGS_H
+        #include <varargs.h>
+        #endif]],
+        [[va_list ap, aq; va_copy(aq, ap);]])],
+      [hw_cv_func_va_copy=yes],
+      [hw_cv_func_va_copy=no],
+      [hw_cv_func_va_copy=no])])
+  AS_IF([test "$hw_cv_func_va_copy" = yes],
+    [AC_DEFINE([HAVE_VA_COPY], [1],
+      [Define to 1 if you have the `va_copy' function or macro.])])
+])# HW_FUNC_VA_COPY
+
+# HW_FUNC___VA_COPY
+# -----------------
+# Set $hw_cv_func___va_copy to "yes" or "no".  Define HAVE___VA_COPY to 1 if
+# $hw_cv_func___va_copy is set to "yes".
+AC_DEFUN([HW_FUNC___VA_COPY],
+[
+  AC_REQUIRE([HW_HEADER_STDARG_H])dnl Our check evaluates HAVE_STDARG_H.
+  AC_REQUIRE([HW_HEADER_VARARGS_H])dnl Our check evaluates HAVE_VARARGS_H.
+  AC_CACHE_CHECK([for __va_copy],
+    [hw_cv_func___va_copy],
+    [AC_RUN_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[#if HAVE_STDARG_H
+        #include <stdarg.h>
+        #elif HAVE_VARARGS_H
+        #include <varargs.h>
+        #endif]],
+        [[va_list ap, aq; __va_copy(aq, ap);]])],
+      [hw_cv_func___va_copy=yes],
+      [hw_cv_func___va_copy=no],
+      [hw_cv_func___va_copy=no])])
+  AS_IF([test "$hw_cv_func___va_copy" = yes],
+    [AC_DEFINE([HAVE___VA_COPY], [1],
+      [Define to 1 if you have the `__va_copy' function or macro.])])
+])# HW_FUNC___VA_COPY
+
+# HW_FUNC_VSNPRINTF
+# -----------------
+# Set $hw_cv_func_vsnprintf and $hw_cv_func_vsnprintf_c99 to "yes" or "no",
+# respectively.  Define HAVE_VSNPRINTF to 1 only if $hw_cv_func_vsnprintf_c99
+# is set to "yes".  Otherwise, define vsnprintf to rpl_vsnprintf and make sure
+# the replacement function will be built.
+#
+# If enable_snprintf_replacement=true, the replacement is forced to be built.
+AC_DEFUN([HW_FUNC_VSNPRINTF],
+[
+  AC_PREREQ([2.60])dnl 2.59 should work if some AC_TYPE_* macros are replaced.
+  AC_REQUIRE([HW_HEADER_STDARG_H])dnl Our check evaluates HAVE_STDARG_H.
+
+  if test "xtrue" != x"$enable_snprintf_replacement"; then
+         AC_CHECK_FUNC([vsnprintf],
+               [hw_cv_func_vsnprintf=yes],
+               [hw_cv_func_vsnprintf=no])
+         AS_IF([test "$hw_cv_func_vsnprintf" = yes],
+               [AC_CACHE_CHECK([whether vsnprintf is C99 compliant],
+                 [hw_cv_func_vsnprintf_c99],
+                 [AC_RUN_IFELSE(
+                       [AC_LANG_PROGRAM(
+                         [[#if HAVE_STDARG_H
+                         #include <stdarg.h>
+                         #endif
+                         #include <stdio.h>
+                         static int testprintf(char *buf, size_t size, const char *format, ...)
+                         {
+                               int result;
+                               va_list ap;
+                               va_start(ap, format);
+                               result = vsnprintf(buf, size, format, ap);
+                               va_end(ap);
+                               return result;
+                         }]],
+                         [[char buf[43];
+                         if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+                                 testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+                                 buf[0] != 'T' || buf[3] != '\0')
+                               return 1;]])],
+                       [hw_cv_func_vsnprintf_c99=yes],
+                       [hw_cv_func_vsnprintf_c99=no],
+                       [hw_cv_func_vsnprintf_c99=no])])],
+               [hw_cv_func_snprintf_c99=no])
+         AS_IF([test "$hw_cv_func_vsnprintf_c99" = yes],
+               [AC_DEFINE([HAVE_VSNPRINTF], [1],
+                 [Define to 1 if you have a C99 compliant 'vsnprintf' function.])])
+  else
+      hw_cv_func_vsnprintf_c99=no
+  fi
+
+  AS_IF([test "$hw_cv_func_vsnprintf_c99" = no],
+    [AC_DEFINE([vsnprintf], [rpl_vsnprintf],
+      [Define to rpl_vsnprintf if the replacement function should be used.])
+    AC_CHECK_HEADERS([inttypes.h locale.h stddef.h stdint.h])
+    AC_CHECK_MEMBERS([struct lconv.decimal_point, struct lconv.thousands_sep],
+      [], [], [#include <locale.h>])
+    AC_TYPE_LONG_DOUBLE
+    AC_TYPE_LONG_LONG_INT
+    AC_TYPE_UNSIGNED_LONG_LONG_INT
+    AC_TYPE_SIZE_T
+    AC_TYPE_INTMAX_T
+    AC_TYPE_UINTMAX_T
+    AC_TYPE_UINTPTR_T
+    AC_CHECK_TYPES([ptrdiff_t])
+    AC_CHECK_FUNCS([localeconv])
+    _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_VSNPRINTF
+
+# HW_FUNC_SNPRINTF
+# ----------------
+# Set $hw_cv_func_snprintf and $hw_cv_func_snprintf_c99 to "yes" or "no",
+# respectively.  Define HAVE_SNPRINTF to 1 only if $hw_cv_func_snprintf_c99
+# is set to "yes".  Otherwise, define snprintf to rpl_snprintf and make sure
+# the replacement function will be built.
+#
+# If enable_snprintf_replacement=true, the replacement is forced to be built.
+AC_DEFUN([HW_FUNC_SNPRINTF],
+[
+  AC_REQUIRE([HW_FUNC_VSNPRINTF])dnl Our snprintf(3) calls vsnprintf(3).
+
+  if test "xtrue" != x"$enable_snprintf_replacement"; then
+         AC_CHECK_FUNC([snprintf],
+               [hw_cv_func_snprintf=yes],
+               [hw_cv_func_snprintf=no])
+         AS_IF([test "$hw_cv_func_snprintf" = yes],
+               [AC_CACHE_CHECK([whether snprintf is C99 compliant],
+                 [hw_cv_func_snprintf_c99],
+                 [AC_RUN_IFELSE(
+                       [AC_LANG_PROGRAM([[#include <stdio.h>]],
+                         [[char buf[43];
+                         if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+                                 snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+                                 buf[0] != 'T' || buf[3] != '\0')
+                               return 1;]])],
+                       [hw_cv_func_snprintf_c99=yes],
+                       [hw_cv_func_snprintf_c99=no],
+                       [hw_cv_func_snprintf_c99=no])])],
+               [hw_cv_func_snprintf_c99=no])
+  else
+      hw_cv_func_snprintf_c99=no
+  fi
+
+  AS_IF([test "$hw_cv_func_snprintf_c99" = yes],
+    [AC_DEFINE([HAVE_SNPRINTF], [1],
+      [Define to 1 if you have a C99 compliant 'snprintf' function.])],
+    [AC_DEFINE([snprintf], [rpl_snprintf],
+      [Define to rpl_snprintf if the replacement function should be used.])
+    _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_SNPRINTF
+
+# HW_FUNC_VASPRINTF
+# -----------------
+# Set $hw_cv_func_vasprintf to "yes" or "no".  Define HAVE_VASPRINTF to 1 if
+# $hw_cv_func_vasprintf is set to "yes".  Otherwise, define vasprintf to
+# rpl_vasprintf and make sure the replacement function will be built.
+#
+# If enable_snprintf_replacement=true, the replacement is forced to be built.
+AC_DEFUN([HW_FUNC_VASPRINTF],
+[
+  AC_REQUIRE([HW_FUNC_VSNPRINTF])dnl Our vasprintf(3) calls vsnprintf(3).
+
+  if test "xtrue" != x"$enable_snprintf_replacement"; then
+         AC_CHECK_FUNCS([vasprintf],
+               [hw_cv_func_vasprintf=yes],
+               [hw_cv_func_vasprintf=no])
+  else
+      hw_cv_func_vasprintf=no
+  fi
+
+  AS_IF([test "$hw_cv_func_vasprintf" = no],
+    [AC_DEFINE([vasprintf], [rpl_vasprintf],
+      [Define to rpl_vasprintf if the replacement function should be used.])
+    AC_CHECK_HEADERS([stdlib.h])
+    HW_FUNC_VA_COPY
+    AS_IF([test "$hw_cv_func_va_copy" = no],
+      [HW_FUNC___VA_COPY])
+    _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_VASPRINTF
+
+# HW_FUNC_ASPRINTF
+# ----------------
+# Set $hw_cv_func_asprintf to "yes" or "no".  Define HAVE_ASPRINTF to 1 if
+# $hw_cv_func_asprintf is set to "yes".  Otherwise, define asprintf to
+# rpl_asprintf and make sure the replacement function will be built.
+#
+# If enable_snprintf_replacement=true, the replacement is forced to be built.
+AC_DEFUN([HW_FUNC_ASPRINTF],
+[
+  AC_REQUIRE([HW_FUNC_VASPRINTF])dnl Our asprintf(3) calls vasprintf(3).
+
+  if test "xtrue" != x"$enable_snprintf_replacement"; then
+         AC_CHECK_FUNCS([asprintf],
+               [hw_cv_func_asprintf=yes],
+               [hw_cv_func_asprintf=no])
+  else
+      hw_cv_func_asprintf=no
+  fi
+  
+  AS_IF([test "$hw_cv_func_asprintf" = no],
+    [AC_DEFINE([asprintf], [rpl_asprintf],
+      [Define to rpl_asprintf if the replacement function should be used.])
+    _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_ASPRINTF
+
+# _HW_FUNC_XPRINTF_REPLACE
+# ------------------------
+# Arrange for building snprintf.c.  Must be called if one or more of the
+# functions provided by snprintf.c are needed.
+AC_DEFUN([_HW_FUNC_XPRINTF_REPLACE],
+[
+  AS_IF([test "x$_hw_cv_func_xprintf_replace_done" != xyes],
+    [AC_C_CONST
+    HW_HEADER_STDARG_H
+    AC_LIBOBJ([snprintf])
+    _hw_cv_func_xprintf_replace_done=yes])
+])# _HW_FUNC_XPRINTF_REPLACE
+
+dnl vim: set joinspaces textwidth=80:
diff --git a/missing b/missing
new file mode 100755 (executable)
index 0000000..f62bbae
--- /dev/null
+++ b/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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, see <http://www.gnu.org/licenses/>.
+
+# 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
+
+case $1 in
+
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
+
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+    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
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dae28fc
--- /dev/null
@@ -0,0 +1,65 @@
+#
+# Check: a unit test framework for C
+# Copyright (C) 2011 Mateusz Loskot
+# Copyright (C) 2001, 2002 Arien Malec
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+set(SOURCES
+  check.c
+  check_error.c
+  check_list.c
+  check_log.c
+  check_msg.c
+  check_pack.c
+  check_print.c
+  check_run.c
+  check_str.c)
+
+set(HEADERS 
+  ${CONFIG_HEADER}
+  ${CMAKE_CURRENT_BINARY_DIR}/check.h
+  check.h.in
+  check_error.h
+  check_impl.h
+  check_list.h
+  check_log.h
+  check_msg.h
+  check_pack.h
+  check_print.h
+  check_str.h)
+
+configure_file(check.h.in check.h)
+
+# Enable finding check.h
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+add_library(check STATIC ${SOURCES} ${HEADERS})
+target_link_libraries(check ${LIBM} ${LIBRT} ${SUBUNIT})
+
+if(MSVC)
+  add_definitions(-DCK_DLL_EXP=_declspec\(dllexport\))
+endif (MSVC)
+
+install(TARGETS check 
+  EXPORT check
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib)
+
+install(FILES ${CMAKE_BINARY_DIR}/src/check.h DESTINATION include)
+install(EXPORT check DESTINATION cmake)
index da781be..22ebde0 100644 (file)
@@ -7,7 +7,7 @@ include_HEADERS         = check.h
 
 EXTRA_DIST             = check.h.in
 
-AM_CFLAGS              = @GCOV_CFLAGS@ @PTHREAD_CFLAGS@
+AM_CFLAGS              = @GCOV_CFLAGS@ @PTHREAD_CFLAGS@ $(LIBSUBUNIT_CFLAGS)
 
 CFILES =\
        check.c         \
@@ -34,16 +34,16 @@ HFILES =\
 
 EXPORT_SYM     = exported.sym
 $(EXPORT_SYM): check.h.in
-       sed -n -e 's/^..*CK_EXPORT[[:space:]][[:space:]]*\([[:alnum:]_][[:alnum:]_]*\)..*$$/\1/p' @top_srcdir@/src/check.h.in > $@
+       ${SED} -n -e 's/^..*CK_EXPORT[[:space:]][[:space:]]*\([[:alnum:]_][[:alnum:]_]*\)..*$$/\1/p' @top_srcdir@/src/check.h.in > $@
 
 libcheck_la_DEPENDENCIES= $(EXPORT_SYM)
 libcheck_la_LDFLAGS    = -no-undefined -export-symbols $(EXPORT_SYM)
 libcheck_la_SOURCES    = $(CFILES) $(HFILES)
-libcheck_la_LIBADD     = @GCOV_LIBS@ @PTHREAD_LIBS@ $(top_builddir)/lib/libcompat.la
+libcheck_la_LIBADD     = @GCOV_LIBS@ @PTHREAD_LIBS@ $(LIBSUBUNIT_LIBS) $(top_builddir)/lib/libcompat.la
 
 libcheckinternal_la_LDFLAGS     = -no-undefined
 libcheckinternal_la_SOURCES    = $(CFILES) $(HFILES)
-libcheckinternal_la_LIBADD     = @GCOV_LIBS@ @PTHREAD_LIBS@ $(top_builddir)/lib/libcompat.la
+libcheckinternal_la_LIBADD     = @GCOV_LIBS@ @PTHREAD_LIBS@ $(LIBSUBUNIT_LIBS) $(top_builddir)/lib/libcompat.la
 
 CLEANFILES     = *~ *.gcno $(EXPORT_SYM)
 
index dfb1168..b7b6110 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 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.
+# Copyright (C) 1994-2014 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.
 
 
 VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -34,70 +90,147 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = src
-DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/check.h.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
        $(top_srcdir)/m4/ax_c_check_flag.m4 \
-       $(top_srcdir)/m4/ax_cflags_warn_all_ansi.m4 \
-       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+       $(top_srcdir)/m4/librt_timers.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
+       $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = check.h
+CONFIG_CLEAN_VPATH_FILES =
 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__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
 am__objects_1 = check.lo check_error.lo check_list.lo check_log.lo \
        check_msg.lo check_pack.lo check_print.lo check_run.lo \
        check_str.lo
 am__objects_2 =
 am_libcheck_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libcheck_la_OBJECTS = $(am_libcheck_la_OBJECTS)
-libcheck_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcheck_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(libcheck_la_LDFLAGS) $(LDFLAGS) -o $@
-libcheckinternal_la_DEPENDENCIES = $(top_builddir)/lib/libcompat.la
+libcheckinternal_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       $(top_builddir)/lib/libcompat.la
 am_libcheckinternal_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libcheckinternal_la_OBJECTS = $(am_libcheckinternal_la_OBJECTS)
-libcheckinternal_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(libcheckinternal_la_LDFLAGS) $(LDFLAGS) -o $@
+libcheckinternal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(AM_CFLAGS) $(CFLAGS) $(libcheckinternal_la_LDFLAGS) \
+       $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(libcheck_la_SOURCES) $(libcheckinternal_la_SOURCES)
 DIST_SOURCES = $(libcheck_la_SOURCES) $(libcheckinternal_la_SOURCES)
-includeHEADERS_INSTALL = $(INSTALL_HEADER)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 HEADERS = $(include_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/check.h.in \
+       $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+AWK_GSUB_DBL_BSLASH = @AWK_GSUB_DBL_BSLASH@
+AWK_PATH = @AWK_PATH@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -110,20 +243,25 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_REGEX = @ENABLE_REGEX@
 ENABLE_SUBUNIT = @ENABLE_SUBUNIT@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILTERDIFF = @FILTERDIFF@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
 GENHTML = @GENHTML@
 GREP = @GREP@
+HAVE_FORK = @HAVE_FORK@
+HAVE_REGEX = @HAVE_REGEX@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -134,11 +272,16 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBSUBUNIT_CFLAGS = @LIBSUBUNIT_CFLAGS@
+LIBSUBUNIT_LIBS = @LIBSUBUNIT_LIBS@
+LIBSUBUNIT_PC = @LIBSUBUNIT_PC@
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -151,8 +294,12 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -167,6 +314,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 acx_pthread_config = @acx_pthread_config@
@@ -200,7 +348,6 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -208,6 +355,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -220,7 +368,7 @@ lib_LTLIBRARIES = libcheck.la
 noinst_LTLIBRARIES = libcheckinternal.la
 include_HEADERS = check.h
 EXTRA_DIST = check.h.in
-AM_CFLAGS = @GCOV_CFLAGS@ @PTHREAD_CFLAGS@
+AM_CFLAGS = @GCOV_CFLAGS@ @PTHREAD_CFLAGS@ $(LIBSUBUNIT_CFLAGS)
 CFILES = \
        check.c         \
        check_error.c   \
@@ -247,10 +395,10 @@ EXPORT_SYM = exported.sym
 libcheck_la_DEPENDENCIES = $(EXPORT_SYM)
 libcheck_la_LDFLAGS = -no-undefined -export-symbols $(EXPORT_SYM)
 libcheck_la_SOURCES = $(CFILES) $(HFILES)
-libcheck_la_LIBADD = @GCOV_LIBS@ @PTHREAD_LIBS@ $(top_builddir)/lib/libcompat.la
+libcheck_la_LIBADD = @GCOV_LIBS@ @PTHREAD_LIBS@ $(LIBSUBUNIT_LIBS) $(top_builddir)/lib/libcompat.la
 libcheckinternal_la_LDFLAGS = -no-undefined
 libcheckinternal_la_SOURCES = $(CFILES) $(HFILES)
-libcheckinternal_la_LIBADD = @GCOV_LIBS@ @PTHREAD_LIBS@ $(top_builddir)/lib/libcompat.la
+libcheckinternal_la_LIBADD = @GCOV_LIBS@ @PTHREAD_LIBS@ $(LIBSUBUNIT_LIBS) $(top_builddir)/lib/libcompat.la
 CLEANFILES = *~ *.gcno $(EXPORT_SYM)
 LCOV_INPUT = $(CFILES:%.c=.libs/%.gcda)
 LCOV_OUTPUT = lcov.info
@@ -270,10 +418,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  src/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnits  src/Makefile
-.PRECIOUS: Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits src/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits src/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -290,48 +437,61 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 check.h: $(top_builddir)/config.status $(srcdir)/check.h.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       list2=; 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"; \
+           list2="$$list2 $$p"; \
          else :; fi; \
-       done
+       done; \
+       test -z "$$list2" || { \
+         echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+       }
 
 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"; \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
        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
+       @list='$(lib_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
 
 clean-noinstLTLIBRARIES:
        -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-       @list='$(noinst_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
-libcheck.la: $(libcheck_la_OBJECTS) $(libcheck_la_DEPENDENCIES) 
-       $(libcheck_la_LINK) -rpath $(libdir) $(libcheck_la_OBJECTS) $(libcheck_la_LIBADD) $(LIBS)
-libcheckinternal.la: $(libcheckinternal_la_OBJECTS) $(libcheckinternal_la_DEPENDENCIES) 
-       $(libcheckinternal_la_LINK)  $(libcheckinternal_la_OBJECTS) $(libcheckinternal_la_LIBADD) $(LIBS)
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
+libcheck.la: $(libcheck_la_OBJECTS) $(libcheck_la_DEPENDENCIES) $(EXTRA_libcheck_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libcheck_la_LINK) -rpath $(libdir) $(libcheck_la_OBJECTS) $(libcheck_la_LIBADD) $(LIBS)
+
+libcheckinternal.la: $(libcheckinternal_la_OBJECTS) $(libcheckinternal_la_DEPENDENCIES) $(EXTRA_libcheckinternal_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(libcheckinternal_la_LINK)  $(libcheckinternal_la_OBJECTS) $(libcheckinternal_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -350,25 +510,25 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_str.Plo@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -377,65 +537,74 @@ clean-libtool:
        -rm -rf .libs _libs
 install-includeHEADERS: $(include_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
-       @list='$(include_HEADERS)'; for p in $$list; do \
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+       fi; \
+       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"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
        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
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -456,13 +625,17 @@ distdir: $(DISTFILES)
          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 "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -483,10 +656,15 @@ install-am: all-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
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -494,6 +672,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -515,6 +694,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -523,18 +704,28 @@ install-data-am: install-includeHEADERS
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-libLTLIBRARIES
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -559,24 +750,26 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
        clean-libLTLIBRARIES clean-libtool clean-local \
-       clean-noinstLTLIBRARIES ctags distclean distclean-compile \
-       distclean-generic distclean-libtool distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-includeHEADERS install-info install-info-am \
-       install-libLTLIBRARIES install-man install-pdf install-pdf-am \
-       install-ps install-ps-am install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
+       clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-includeHEADERS install-info \
+       install-info-am install-libLTLIBRARIES install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-includeHEADERS \
+       tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
        uninstall-libLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 $(EXPORT_SYM): check.h.in
-       sed -n -e 's/^..*CK_EXPORT[[:space:]][[:space:]]*\([[:alnum:]_][[:alnum:]_]*\)..*$$/\1/p' @top_srcdir@/src/check.h.in > $@
+       ${SED} -n -e 's/^..*CK_EXPORT[[:space:]][[:space:]]*\([[:alnum:]_][[:alnum:]_]*\)..*$$/\1/p' @top_srcdir@/src/check.h.in > $@
 
 lcov: $(LCOV_HTML)
 
@@ -596,6 +789,7 @@ clean-local: lcov-clean
 .PHONY: lcov-clean
 lcov-clean:
        -$(RM) -r $(LCOV_HTML) $(LCOV_OUTPUT)
+
 # 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:
index 41b9e79..e42636e 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+#include <math.h>
 
 #include "check.h"
 #include "check_error.h"
 #define DEFAULT_TIMEOUT 4
 #endif
 
+/*
+ * When a process exits either normally, with exit(), or
+ * by an uncaught signal, The lower 0x377 bits are passed
+ * to the parent. Of those, only the lower 8 bits are
+ * returned by the WEXITSTATUS() macro.
+ */
+#define WEXITSTATUS_MASK 0xFF
+
 int check_major_version = CHECK_MAJOR_VERSION;
 int check_minor_version = CHECK_MINOR_VERSION;
 int check_micro_version = CHECK_MICRO_VERSION;
 
-static int non_pass (int val);
-static Fixture *fixture_create (SFun fun, int ischecked);
-static void tcase_add_fixture (TCase *tc, SFun setup, SFun teardown,
-                              int ischecked);
-static void tr_init (TestResult *tr);
-static void suite_free (Suite *s);
-static void tcase_free (TCase *tc);
-
-Suite *suite_create (const char *name)
-{
-  Suite *s;
-  s = emalloc (sizeof(Suite)); /* freed in suite_free */
-  if (name == NULL)
-    s->name = "";
-  else
-    s->name = name;
-  s->tclst = check_list_create();
-  return s;
-}
-
-static void suite_free (Suite *s)
-{
-  List *l;
-  if (s == NULL)
-    return;
-  l = s->tclst;
-  for (list_front(l); !list_at_end(l); list_advance (l)) {
-    tcase_free (list_val(l));
-  }
-  list_free (s->tclst);
-  free(s);
-}
-
-TCase *tcase_create (const char *name)
-{
-  char *env;
-  int timeout = DEFAULT_TIMEOUT;
-  TCase *tc = emalloc (sizeof(TCase)); /*freed in tcase_free */
-  if (name == NULL)
-    tc->name = "";
-  else
-    tc->name = name;
-
-  env = getenv("CK_DEFAULT_TIMEOUT");
-  if (env != NULL) {
-    int tmp = atoi(env);
-    if (tmp >= 0) {
-      timeout = tmp;
+const char* current_test_name = NULL;
+
+static int non_pass(int val);
+static Fixture *fixture_create(SFun fun, int ischecked);
+static void tcase_add_fixture(TCase * tc, SFun setup, SFun teardown,
+                              int ischecked);
+static void tr_init(TestResult * tr);
+static void suite_free(Suite * s);
+static void tcase_free(TCase * tc);
+
+Suite *suite_create(const char *name)
+{
+    Suite *s;
+
+    s = (Suite *)emalloc(sizeof(Suite)); /* freed in suite_free */
+    if(name == NULL)
+        s->name = "";
+    else
+        s->name = name;
+    s->tclst = check_list_create();
+    return s;
+}
+
+int suite_tcase(Suite * s, const char *tcname)
+{
+    List *l;
+    TCase *tc;
+
+    if(s == NULL)
+        return 0;
+
+    l = s->tclst;
+    for(check_list_front(l); !check_list_at_end(l); check_list_advance(l))
+    {
+        tc = (TCase *)check_list_val(l);
+        if(strcmp(tcname, tc->name) == 0)
+            return 1;
+    }
+
+    return 0;
+}
+
+static void suite_free(Suite * s)
+{
+    List *l;
+
+    if(s == NULL)
+        return;
+    l = s->tclst;
+    for(check_list_front(l); !check_list_at_end(l); check_list_advance(l))
+    {
+        tcase_free((TCase *)check_list_val(l));
+    }
+    check_list_free(s->tclst);
+    free(s);
+}
+
+
+TCase *tcase_create(const char *name)
+{
+    char *env;
+    double timeout_sec = DEFAULT_TIMEOUT;
+
+    TCase *tc = (TCase *)emalloc(sizeof(TCase)); /*freed in tcase_free */
+
+    if(name == NULL)
+        tc->name = "";
+    else
+        tc->name = name;
+
+    env = getenv("CK_DEFAULT_TIMEOUT");
+    if(env != NULL)
+    {
+        char *endptr = NULL;
+        double tmp = strtod(env, &endptr);
+
+        if(tmp >= 0 && endptr != env && (*endptr) == '\0')
+        {
+            timeout_sec = tmp;
+        }
     }
-  }
 
-  env = getenv("CK_TIMEOUT_MULTIPLIER");
-  if (env != NULL) {
-    int tmp = atoi(env);
-    if (tmp >= 0) {
-      timeout = timeout * tmp;
+    env = getenv("CK_TIMEOUT_MULTIPLIER");
+    if(env != NULL)
+    {
+        char *endptr = NULL;
+        double tmp = strtod(env, &endptr);
+
+        if(tmp >= 0 && endptr != env && (*endptr) == '\0')
+        {
+            timeout_sec = timeout_sec * tmp;
+        }
     }
-  }  
 
-  tc->timeout = timeout;
-  tc->tflst = check_list_create();
-  tc->unch_sflst = check_list_create();
-  tc->ch_sflst = check_list_create();
-  tc->unch_tflst = check_list_create();
-  tc->ch_tflst = check_list_create();
+    tc->timeout.tv_sec = (time_t) floor(timeout_sec);
+    tc->timeout.tv_nsec =
+        (long)((timeout_sec -
+                floor(timeout_sec)) * (double)NANOS_PER_SECONDS);
 
-  return tc;
+    tc->tflst = check_list_create();
+    tc->unch_sflst = check_list_create();
+    tc->ch_sflst = check_list_create();
+    tc->unch_tflst = check_list_create();
+    tc->ch_tflst = check_list_create();
+    tc->tags = check_list_create();
+
+    return tc;
 }
 
+/*
+ * Helper function to create a list of tags from
+ * a space separated string.
+ */
+List *tag_string_to_list(const char *tags_string)
+{
+    List *list;
+    char *tags;
+    char *tag;
+
+    list = check_list_create();
 
-static void tcase_free (TCase *tc)
+    if (NULL == tags_string)
+    {
+       return list;
+    }
+
+    tags = strdup(tags_string);
+    tag = strtok(tags, " ");
+    while (tag)
+    {
+       check_list_add_end(list, strdup(tag));
+       tag = strtok(NULL, " ");
+    }
+    free(tags);
+    return list;
+}
+
+void tcase_set_tags(TCase * tc, const char *tags_orig)
 {
-  list_apply (tc->tflst, free);
-  list_apply (tc->unch_sflst, free);
-  list_apply (tc->ch_sflst, free);
-  list_apply (tc->unch_tflst, free);
-  list_apply (tc->ch_tflst, free);
-  list_free(tc->tflst);
-  list_free(tc->unch_sflst);
-  list_free(tc->ch_sflst);
-  list_free(tc->unch_tflst);
-  list_free(tc->ch_tflst);
-  
-  free(tc);
+    /* replace any pre-existing list */
+    if (tc->tags)
+    {
+       check_list_apply(tc->tags, free);
+       check_list_free(tc->tags);
+    }
+    tc->tags = tag_string_to_list(tags_orig);
 }
 
-void suite_add_tcase (Suite *s, TCase *tc)
+static void tcase_free(TCase * tc)
 {
-  if (s == NULL || tc == NULL)
-    return;
-  list_add_end (s->tclst, tc);
+    check_list_apply(tc->tflst, free);
+    check_list_apply(tc->unch_sflst, free);
+    check_list_apply(tc->ch_sflst, free);
+    check_list_apply(tc->unch_tflst, free);
+    check_list_apply(tc->ch_tflst, free);
+    check_list_apply(tc->tags, free);
+    check_list_free(tc->tflst);
+    check_list_free(tc->unch_sflst);
+    check_list_free(tc->ch_sflst);
+    check_list_free(tc->unch_tflst);
+    check_list_free(tc->ch_tflst);
+    check_list_free(tc->tags);
+    free(tc);
 }
 
-void _tcase_add_test (TCase *tc, TFun fn, const char *name, int _signal, int allowed_exit_value, int start, int end)
+unsigned int tcase_matching_tag(TCase *tc, List *check_for)
 {
-  TF * tf;
-  if (tc == NULL || fn == NULL || name == NULL)
-    return;
-  tf = emalloc (sizeof(TF)); /* freed in tcase_free */
-  tf->fn = fn;
-  tf->loop_start = start;
-  tf->loop_end = end;
-  tf->signal = _signal; /* 0 means no signal expected */
-  tf->allowed_exit_value = allowed_exit_value; /* 0 is default successful exit */
-  tf->name = name;
-  list_add_end (tc->tflst, tf);
+
+    if (NULL == check_for)
+    {
+       return 0;
+    }
+
+    for(check_list_front(check_for); !check_list_at_end(check_for);
+        check_list_advance(check_for))
+    {
+       for(check_list_front(tc->tags); !check_list_at_end(tc->tags);
+           check_list_advance(tc->tags))
+       {
+           if (0 == strcmp((const char *)check_list_val(tc->tags),
+                           (const char *)check_list_val(check_for)))
+           {
+               return 1;
+           }
+       }
+    }
+    return 0;
 }
 
-static Fixture *fixture_create (SFun fun, int ischecked)
+void suite_add_tcase(Suite * s, TCase * tc)
 {
-  Fixture *f;
-  f = emalloc (sizeof(Fixture));
-  f->fun = fun;
-  f->ischecked = ischecked;
+    if(s == NULL || tc == NULL || check_list_contains(s->tclst, tc))
+    {
+        return;
+    }
 
-  return f;
+    check_list_add_end(s->tclst, tc);
 }
 
-void tcase_add_unchecked_fixture (TCase *tc, SFun setup, SFun teardown)
+void _tcase_add_test(TCase * tc, TFun fn, const char *name, int _signal,
+                     int allowed_exit_value, int start, int end)
 {
-  tcase_add_fixture(tc,setup,teardown,0);
+    TF *tf;
+
+    if(tc == NULL || fn == NULL || name == NULL)
+        return;
+    tf = (TF *)emalloc(sizeof(TF));   /* freed in tcase_free */
+    tf->fn = fn;
+    tf->loop_start = start;
+    tf->loop_end = end;
+    tf->signal = _signal;       /* 0 means no signal expected */
+    tf->allowed_exit_value =
+      (WEXITSTATUS_MASK & allowed_exit_value);   /* 0 is default successful exit */
+    tf->name = name;
+    check_list_add_end(tc->tflst, tf);
 }
 
-void tcase_add_checked_fixture (TCase *tc, SFun setup, SFun teardown)
+static Fixture *fixture_create(SFun fun, int ischecked)
 {
-  tcase_add_fixture (tc,setup,teardown,1);
+    Fixture *f;
+
+    f = (Fixture *)emalloc(sizeof(Fixture));
+    f->fun = fun;
+    f->ischecked = ischecked;
+
+    return f;
 }
 
-static void tcase_add_fixture (TCase *tc, SFun setup, SFun teardown,
-                              int ischecked)
+void tcase_add_unchecked_fixture(TCase * tc, SFun setup, SFun teardown)
 {
-  if (setup) {
-    if (ischecked)
-      list_add_end (tc->ch_sflst, fixture_create(setup, ischecked));
-    else
-      list_add_end (tc->unch_sflst, fixture_create(setup, ischecked));
-  }
+    tcase_add_fixture(tc, setup, teardown, 0);
+}
 
-  /* Add teardowns at front so they are run in reverse order. */
-  if (teardown) {
-    if (ischecked)
-      list_add_front (tc->ch_tflst, fixture_create(teardown, ischecked));
-    else
-      list_add_front (tc->unch_tflst, fixture_create(teardown, ischecked));  
-  }
+void tcase_add_checked_fixture(TCase * tc, SFun setup, SFun teardown)
+{
+    tcase_add_fixture(tc, setup, teardown, 1);
 }
 
-void tcase_set_timeout (TCase *tc, int timeout)
+static void tcase_add_fixture(TCase * tc, SFun setup, SFun teardown,
+                              int ischecked)
 {
-  if (timeout >= 0) {
-    char *env = getenv("CK_TIMEOUT_MULTIPLIER");
-    if (env != NULL) {
-      int tmp = atoi(env);
-      if (tmp >= 0) {
-        timeout = timeout * tmp;
-      }
+    if(setup)
+    {
+        if(ischecked)
+            check_list_add_end(tc->ch_sflst,
+                               fixture_create(setup, ischecked));
+        else
+            check_list_add_end(tc->unch_sflst,
+                               fixture_create(setup, ischecked));
+    }
+
+    /* Add teardowns at front so they are run in reverse order. */
+    if(teardown)
+    {
+        if(ischecked)
+            check_list_add_front(tc->ch_tflst,
+                                 fixture_create(teardown, ischecked));
+        else
+            check_list_add_front(tc->unch_tflst,
+                                 fixture_create(teardown, ischecked));
     }
-    tc->timeout = timeout;
-  }
 }
 
-void tcase_fn_start (const char *fname CK_ATTRIBUTE_UNUSED, const char *file, int line)
+void tcase_set_timeout(TCase * tc, double timeout)
 {
-  send_ctx_info (CK_CTX_TEST);
-  send_loc_info (file, line);
+#if defined(HAVE_FORK)
+    if(timeout >= 0)
+    {
+        char *env = getenv("CK_TIMEOUT_MULTIPLIER");
+
+        if(env != NULL)
+        {
+            char *endptr = NULL;
+            double tmp = strtod(env, &endptr);
+
+            if(tmp >= 0 && endptr != env && (*endptr) == '\0')
+            {
+                timeout = timeout * tmp;
+            }
+        }
+
+        tc->timeout.tv_sec = (time_t) floor(timeout);
+        tc->timeout.tv_nsec =
+            (long)((timeout - floor(timeout)) * (double)NANOS_PER_SECONDS);
+    }
+#else
+    (void)tc;
+    (void)timeout;
+    /* Ignoring, as Check is not compiled with fork support. */
+#endif /* HAVE_FORK */
 }
 
-void _mark_point (const char *file, int line)
+void tcase_fn_start(const char *fname, const char *file,
+                    int line)
 {
-  send_loc_info (file, line);
+    send_ctx_info(CK_CTX_TEST);
+    send_loc_info(file, line);
+
+    current_test_name = fname;
 }
 
-void _fail_unless (int result, const char *file,
-                   int line, const char *expr, ...)
+const char* tcase_name(void)
 {
-  const char *msg;
-    
-  send_loc_info (file, line);
-  if (!result) {
+       return current_test_name;
+}
+
+void _mark_point(const char *file, int line)
+{
+    send_loc_info(file, line);
+}
+
+void _ck_assert_failed(const char *file, int line, const char *expr, ...)
+{
+    const char *msg;
     va_list ap;
     char buf[BUFSIZ];
-    
-    va_start(ap,expr);
-    msg = (const char*)va_arg(ap, char *);
-    if (msg == NULL)
-      msg = expr;
-    vsnprintf(buf, BUFSIZ, msg, ap);
+    const char *to_send;
+
+    send_loc_info(file, line);
+
+    va_start(ap, expr);
+    msg = (const char *)va_arg(ap, char *);
+
+    /*
+     * If a message was passed, format it with vsnprintf.
+     * Otherwise, print the expression as is.
+     */
+    if(msg != NULL)
+    {
+        vsnprintf(buf, BUFSIZ, msg, ap);
+        to_send = buf;
+    }
+    else
+    {
+        to_send = expr;
+    }
+
     va_end(ap);
-    send_failure_info (buf);
-    if (cur_fork_status() == CK_FORK) {
-#ifdef _POSIX_VERSION
-      exit(1);
-#endif /* _POSIX_VERSION */
+    send_failure_info(to_send);
+    if(cur_fork_status() == CK_FORK)
+    {
+#if defined(HAVE_FORK) && HAVE_FORK==1
+        _exit(1);
+#endif /* HAVE_FORK */
+    }
+    else
+    {
+        longjmp(error_jmp_buffer, 1);
     }
-  }
 }
 
-SRunner *srunner_create (Suite *s)
+SRunner *srunner_create(Suite * s)
 {
-  SRunner *sr = emalloc (sizeof(SRunner)); /* freed in srunner_free */
-  sr->slst = check_list_create();
-  if (s != NULL)
-    list_add_end(sr->slst, s);
-  sr->stats = emalloc (sizeof(TestStats)); /* freed in srunner_free */
-  sr->stats->n_checked = sr->stats->n_failed = sr->stats->n_errors = 0;
-  sr->resultlst = check_list_create();
-  sr->log_fname = NULL;
-  sr->xml_fname = NULL;
-  sr->loglst = NULL;
-  sr->fstat = CK_FORK_GETENV;
-  return sr;
+    SRunner *sr = (SRunner *)emalloc(sizeof(SRunner));     /* freed in srunner_free */
+
+    sr->slst = check_list_create();
+    if(s != NULL)
+        check_list_add_end(sr->slst, s);
+    sr->stats = (TestStats *)emalloc(sizeof(TestStats));     /* freed in srunner_free */
+    sr->stats->n_checked = sr->stats->n_failed = sr->stats->n_errors = 0;
+    sr->resultlst = check_list_create();
+    sr->log_fname = NULL;
+    sr->xml_fname = NULL;
+    sr->tap_fname = NULL;
+    sr->loglst = NULL;
+
+#if defined(HAVE_FORK)
+    sr->fstat = CK_FORK_GETENV;
+#else
+    /*
+     * Overriding the default of running tests in fork mode,
+     * as this system does not have fork()
+     */
+    sr->fstat = CK_NOFORK;
+#endif /* HAVE_FORK */
+
+    return sr;
 }
 
-void srunner_add_suite (SRunner *sr, Suite *s)
+void srunner_add_suite(SRunner * sr, Suite * s)
 {
-  if (s == NULL)
-    return;
+    if(s == NULL)
+        return;
 
-  list_add_end(sr->slst, s);
+    check_list_add_end(sr->slst, s);
 }
 
-void srunner_free (SRunner *sr)
+void srunner_free(SRunner * sr)
 {
-  List *l;
-  TestResult *tr;
-  if (sr == NULL)
-    return;
-  
-  free (sr->stats);
-  l = sr->slst;
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    suite_free(list_val(l));
-  }
-  list_free(sr->slst);
+    List *l;
+    TestResult *tr;
 
-  l = sr->resultlst;
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    tr = list_val(l);
-    free(tr->file);
-    free(tr->msg);
-    free(tr);
-  }
-  list_free (sr->resultlst);
+    if(sr == NULL)
+        return;
+
+    free(sr->stats);
+    l = sr->slst;
+    for(check_list_front(l); !check_list_at_end(l); check_list_advance(l))
+    {
+        suite_free((Suite *)check_list_val(l));
+    }
+    check_list_free(sr->slst);
 
-  free (sr);
+    l = sr->resultlst;
+    for(check_list_front(l); !check_list_at_end(l); check_list_advance(l))
+    {
+        tr = (TestResult *)check_list_val(l);
+        tr_free(tr);
+    }
+    check_list_free(sr->resultlst);
+
+    free(sr);
 }
 
-int srunner_ntests_failed (SRunner *sr)
+int srunner_ntests_failed(SRunner * sr)
 {
-  return sr->stats->n_failed + sr->stats->n_errors;
+    return sr->stats->n_failed + sr->stats->n_errors;
 }
 
-int srunner_ntests_run (SRunner *sr)
+int srunner_ntests_run(SRunner * sr)
 {
-  return sr->stats->n_checked;
+    return sr->stats->n_checked;
 }
 
-TestResult **srunner_failures (SRunner *sr)
+TestResult **srunner_failures(SRunner * sr)
 {
-  int i = 0;
-  TestResult **trarray;
-  List *rlst;
-  trarray = malloc (sizeof(trarray[0]) * srunner_ntests_failed (sr));
+    int i = 0;
+    TestResult **trarray;
+    List *rlst;
+
+    trarray = (TestResult **)emalloc(sizeof(trarray[0]) * srunner_ntests_failed(sr));
+
+    rlst = sr->resultlst;
+    for(check_list_front(rlst); !check_list_at_end(rlst);
+        check_list_advance(rlst))
+    {
+        TestResult *tr = (TestResult *)check_list_val(rlst);
 
-  rlst = sr->resultlst;
-  for (list_front(rlst); !list_at_end(rlst); list_advance(rlst)) {
-    TestResult *tr = list_val(rlst);
-    if (non_pass(tr->rtype))
-      trarray[i++] = tr;
-    
-  }
-  return trarray;
+        if(non_pass(tr->rtype))
+            trarray[i++] = tr;
+
+    }
+    return trarray;
 }
 
-TestResult **srunner_results (SRunner *sr)
+TestResult **srunner_results(SRunner * sr)
 {
-  int i = 0;
-  TestResult **trarray;
-  List *rlst;
+    int i = 0;
+    TestResult **trarray;
+    List *rlst;
 
-  trarray = malloc (sizeof(trarray[0]) * srunner_ntests_run (sr));
+    trarray =(TestResult **) emalloc(sizeof(trarray[0]) * srunner_ntests_run(sr));
 
-  rlst = sr->resultlst;
-  for (list_front(rlst); !list_at_end(rlst); list_advance(rlst)) {
-    trarray[i++] = list_val(rlst);
-  }
-  return trarray;
+    rlst = sr->resultlst;
+    for(check_list_front(rlst); !check_list_at_end(rlst);
+        check_list_advance(rlst))
+    {
+        trarray[i++] = (TestResult *)check_list_val(rlst);
+    }
+    return trarray;
 }
 
-static int non_pass (int val)
+static int non_pass(int val)
 {
-  return val != CK_PASS;
+    return val != CK_PASS;
 }
 
 TestResult *tr_create(void)
 {
-  TestResult *tr;
+    TestResult *tr;
 
-  tr = emalloc (sizeof(TestResult));
-  tr_init (tr);
-  return tr;
+    tr = (TestResult *)emalloc(sizeof(TestResult));
+    tr_init(tr);
+    return tr;
 }
 
-void tr_reset(TestResult *tr)
+static void tr_init(TestResult * tr)
 {
-  tr_init(tr);
+    tr->ctx = CK_CTX_INVALID;
+    tr->line = -1;
+    tr->rtype = CK_TEST_RESULT_INVALID;
+    tr->msg = NULL;
+    tr->file = NULL;
+    tr->tcname = NULL;
+    tr->tname = NULL;
+    tr->duration = -1;
 }
 
-static void tr_init (TestResult *tr)
+void tr_free(TestResult * tr)
 {
-  tr->ctx = CK_CTX_INVALID;
-  tr->line = -1;
-  tr->rtype = CK_TEST_RESULT_INVALID;
-  tr->msg = NULL;
-  tr->file = NULL;
-  tr->tcname = NULL;
-  tr->tname = NULL;
+    free(tr->file);
+    free(tr->msg);
+    free(tr);
 }
 
 
-const char *tr_msg (TestResult *tr)
+const char *tr_msg(TestResult * tr)
 {
-  return tr->msg;
+    return tr->msg;
 }
 
-int tr_lno (TestResult *tr)
+int tr_lno(TestResult * tr)
 {
-  return tr->line;
+    return tr->line;
 }
 
-const char *tr_lfile (TestResult *tr)
+const char *tr_lfile(TestResult * tr)
 {
-  return tr->file;
+    return tr->file;
 }
 
-int tr_rtype (TestResult *tr)
+int tr_rtype(TestResult * tr)
 {
-  return tr->rtype;
+    return tr->rtype;
 }
 
-enum ck_result_ctx tr_ctx (TestResult *tr)
+enum ck_result_ctx tr_ctx(TestResult * tr)
 {
-  return tr->ctx;
+    return tr->ctx;
 }
 
-const char *tr_tcname (TestResult *tr)
+const char *tr_tcname(TestResult * tr)
 {
-  return tr->tcname;
+    return tr->tcname;
 }
 
-static int _fstat = CK_FORK;
+static enum fork_status _fstat = CK_FORK;
 
-void set_fork_status (enum fork_status fstat)
+void set_fork_status(enum fork_status fstat)
 {
-  if (fstat == CK_FORK || fstat == CK_NOFORK || fstat == CK_FORK_GETENV)
-    _fstat = fstat;
-  else
-    eprintf ("Bad status in set_fork_status", __FILE__, __LINE__);
+    if(fstat == CK_FORK || fstat == CK_NOFORK || fstat == CK_FORK_GETENV)
+        _fstat = fstat;
+    else
+        eprintf("Bad status in set_fork_status", __FILE__, __LINE__);
+}
+
+enum fork_status cur_fork_status(void)
+{
+    return _fstat;
 }
 
-enum fork_status cur_fork_status (void)
+/**
+ * Not all systems support the same clockid_t's. This call checks
+ * if the CLOCK_MONOTONIC clockid_t is valid. If so, that is returned,
+ * otherwise, CLOCK_REALTIME is returned.
+ *
+ * The clockid_t that was found to work on the first call is
+ * cached for subsequent calls.
+ */
+clockid_t check_get_clockid()
 {
-  return _fstat;
+    static clockid_t clockid = -1;
+
+    if(clockid == -1)
+    {
+/*
+ * Only check if we have librt available. Otherwise, the clockid
+ * will be ignored anyway, as the clock_gettime() and
+ * timer_create() functions will be re-implemented in libcompat.
+ * Worse, if librt and alarm() are unavailable, this check
+ * will result in an assert(0).
+ */
+#ifdef HAVE_LIBRT
+        timer_t timerid;
+
+        if(timer_create(CLOCK_MONOTONIC, NULL, &timerid) == 0)
+        {
+            timer_delete(timerid);
+            clockid = CLOCK_MONOTONIC;
+        }
+        else
+        {
+            clockid = CLOCK_REALTIME;
+        }
+#else
+        clockid = CLOCK_MONOTONIC;
+#endif
+    }
+
+    return clockid;
 }
index afb42f6..c7d89db 100644 (file)
@@ -1,7 +1,7 @@
 /*-*- mode:C; -*- */
 /*
  * Check: a unit test framework for C
- * Copyright (C) 2001, 2002, Arien Malec
+ * Copyright (C) 2001, 2002 Arien Malec
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,8 +15,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_H
 
 #include <stddef.h>
 #include <string.h>
+#include <math.h>
+#include <float.h>
 
-/* Check: a unit test framework for C
-
-   Check is a unit test framework for C. It features a simple
-   interface for defining unit tests, putting little in the way of the
-   developer. Tests are run in a separate address space, so Check can
-   catch both assertion failures and code errors that cause
-   segmentation faults or other signals. The output from unit tests
-   can be used within source code editors and IDEs.
-
-   Unit tests are created with the START_TEST/END_TEST macro
-   pair. The fail_unless and fail macros are used for creating
-   checks within unit tests; the mark_point macro is useful for
-   trapping the location of signals and/or early exits.
-
-
-   Test cases are created with tcase_create, unit tests are added
-   with tcase_add_test
-
-
-   Suites are created with suite_create; test cases are added
-   with suite_add_tcase
-
-   Suites are run through an SRunner, which is created with
-   srunner_create. Additional suites can be added to an SRunner with
-   srunner_add_suite. An SRunner is freed with srunner_free, which also
-   frees all suites added to the runner. 
-
-   Use srunner_run_all to run a suite and print results.
+#include <check_stdint.h>
 
+/*
    Macros and functions starting with _ (underscore) are internal and
    may change without notice. You have been warned!.
-
 */
 
 
@@ -77,341 +52,2236 @@ CK_CPPSTART
 #if GCC_VERSION_AT_LEAST(2,95)
 #define CK_ATTRIBUTE_UNUSED __attribute__ ((unused))
 #else
-#define CK_ATTRIBUTE_UNUSED              
+#define CK_ATTRIBUTE_UNUSED
 #endif /* GCC 2.95 */
 
+#if GCC_VERSION_AT_LEAST(2,5)
+#define CK_ATTRIBUTE_NORETURN __attribute__ ((noreturn))
+#else
+#define CK_ATTRIBUTE_NORETURN
+#endif /* GCC 2.5 */
+
 #include <sys/types.h>
 
-/* Used to create the linker script for hiding lib-local symbols. Shall
-   be put directly in front of the exported symbol. */
+#if defined(_MSC_VER)
+/* define pid_t for Windows, as it is needed later */
+#define pid_t int
+#endif /* _MSC_VER */
+
+/*
+ * Used to create the linker script for hiding lib-local symbols. Shall
+ * be put directly in front of the exported symbol.
+ */
 #define CK_EXPORT
 
+/*
+ * Used for MSVC to create the export attribute
+ * CK_DLL_EXP is defined during the compilation of the library
+ * on the command line.
+ */
+#ifndef CK_DLL_EXP
+#define CK_DLL_EXP
+#endif
+
 /* check version numbers */
-  
+
 #define CHECK_MAJOR_VERSION (0)
-#define CHECK_MINOR_VERSION (9)
-#define CHECK_MICRO_VERSION (8)
+#define CHECK_MINOR_VERSION (12)
+#define CHECK_MICRO_VERSION (0)
 
-extern int CK_EXPORT check_major_version;
-extern int CK_EXPORT check_minor_version;
-extern int CK_EXPORT check_micro_version;
+CK_DLL_EXP extern int CK_EXPORT check_major_version;
+CK_DLL_EXP extern int CK_EXPORT check_minor_version;
+CK_DLL_EXP extern int CK_EXPORT check_micro_version;
 
 #ifndef NULL
 #define NULL ((void*)0)
 #endif
 
-/* opaque type for a test case
-
-   A TCase represents a test case.  Create with tcase_create, free
-   with tcase_free.  For the moment, test cases can only be run
-   through a suite
+/**
+ * Type for a test case
+ *
+ * A TCase represents a test case.  Create with tcase_create, free
+ * with tcase_free.  For the moment, test cases can only be run
+ * through a suite
 */
-typedef struct TCase TCase; 
+typedef struct TCase TCase;
 
-/* type for a test function */
+/**
+ * Type for a test function
+ */
 typedef void (*TFun) (int);
 
-/* type for a setup/teardown function */
+/**
+ * Type for a setup/teardown function
+ */
 typedef void (*SFun) (void);
-/* Opaque type for a test suite */
+
+/**
+ * Type for a test suite
+ */
 typedef struct Suite Suite;
-/* Creates a test suite with the given name */
-Suite * CK_EXPORT suite_create (const char *name);
 
-/* Add a test case to a suite */
-void CK_EXPORT suite_add_tcase (Suite *s, TCase *tc);
+/**
+ * Creates a test suite with the given name.
+ *
+ * Create a suite, which will contain test cases. Once
+ * created, use suite_add_tcase() to add test cases.
+ * When finished, create a suite runner from the
+ * suite using srunner_create()
+ *
+ * @param name name of the suite
+ *
+ * @return suite
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP Suite *CK_EXPORT suite_create(const char *name);
+
+/**
+ * Determines whether a given test suite contains a case named after a
+ * given string.
+ *
+ * @param s suite to check
+ * @param tcname test case to look for
+ *
+ * @return 1 iff the given test case is within the given suite;
+ *          0 otherwise
+ *
+ * @since 0.9.9
+ */
+CK_DLL_EXP int CK_EXPORT suite_tcase(Suite * s, const char *tcname);
+
+/**
+ * Add a test case to a suite.
+ *
+ * Note that if the TCase has already been added attempting
+ * to add it again will be ignored.
+ *
+ * @param s suite to add test case to
+ * @param tc test case to add to suite
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP void CK_EXPORT suite_add_tcase(Suite * s, TCase * tc);
 
-/* Create a test case */
-TCase * CK_EXPORT tcase_create (const char *name);
+/**
+ * Create a test case.
+ *
+ * Once created, tests can be added with the tcase_add_test()
+ * function, and the test case assigned to a suite with the
+ * suite_add_tcase() function.
+ *
+ * @param name name of the test case
+ *
+ * @return test case containing no tests
+ *
+ * @since 0.6.0
+ * */
+CK_DLL_EXP TCase *CK_EXPORT tcase_create(const char *name);
 
-/* Add a test function to a test case (macro version) */
+/**
+ * Associate a test case with certain tags.
+ * Replaces any existing tags with the new set.
+ *
+ * @param tc the test case
+ *
+ * @param tags string containing arbitrary tags separated by spaces.
+ *        This will be copied. Passing NULL clears all tags.
+ *
+ * @since 0.11.0
+ * */
+CK_DLL_EXP void CK_EXPORT tcase_set_tags(TCase * tc,
+                                        const char *tags);
+/**
+ * Add a test function to a test case
+ *
+ * @param tc test case to add test to
+ * @param tf test function to add to test case
+ *
+ * @since 0.6.0
+ * */
 #define tcase_add_test(tc,tf) tcase_add_test_raise_signal(tc,tf,0)
 
-/* Add a test function with signal handling to a test case (macro version) */
+/**
+ * Add a test function with signal handling to a test case
+ *
+ * The added test is expected to terminate by throwing the given signal
+ *
+ * @param tc test case to add test to
+ * @param tf test function to add to test case
+ * @param signal expected signal for test function to throw in order for
+ *                the test to be considered passing
+ *
+ * @since 0.9.2
+ * */
 #define tcase_add_test_raise_signal(tc,tf,signal) \
    _tcase_add_test((tc),(tf),"" # tf "",(signal), 0, 0, 1)
 
-/* Add a test function with an expected exit value to a test case (macro version) */
+/**
+ * Add a test function with an expected exit value to a test case
+ *
+ * The added test is expected to terminate by exiting with the given value
+ *
+ * @param tc test case to add test to
+ * @param tf test function to add to test case
+ * @param expected_exit_value exit value for test function to return in
+ *                             order for the test to be considered passing
+ *
+ * @since 0.9.7
+ */
 #define tcase_add_exit_test(tc, tf, expected_exit_value) \
   _tcase_add_test((tc),(tf),"" # tf "",0,(expected_exit_value),0,1)
 
-/* Add a looping test function to a test case (macro version)
-
-   The test will be called in a for(i = s; i < e; i++) loop with each
-   iteration being executed in a new context. The loop variable 'i' is
-   available in the test.
+/**
+ * Add a looping test function to a test case
+ *
+ * The test will be called in a for(i = s; i < e; i++) loop with each
+ * iteration being executed in a new context. The loop variable 'i' is
+ * available in the test.
+ *
+ * @param tc test case to add test to
+ * @param tf function to add to test case
+ * @param s starting index for value "i" in test
+ * @param e ending index for value "i" in test
+ *
+ * @since 0.9.4
  */
 #define tcase_add_loop_test(tc,tf,s,e) \
   _tcase_add_test((tc),(tf),"" # tf "",0,0,(s),(e))
-/* Signal version of loop test.  
-   FIXME: add a test case; this is untested as part of Check's tests.
+
+/**
+ * Add a looping test function with signal handling to a test case
+ *
+ * The test will be called in a for(i = s; i < e; i++) loop with each
+ * iteration being executed in a new context. The loop variable 'i' is
+ * available in the test.
+ *
+ * The added test is expected to terminate by throwing the given signal
+ *
+ * @param tc test case to add test to
+ * @param tf function to add to test case
+ * @param signal expected signal for test function to throw in order for
+ *                the test to be considered passing
+ * @param s starting index for value "i" in test
+ * @param e ending index for value "i" in test
+ *
+ * @since 0.9.5
  */
 #define tcase_add_loop_test_raise_signal(tc,tf,signal,s,e) \
   _tcase_add_test((tc),(tf),"" # tf "",(signal),0,(s),(e))
 
-/* allowed exit value version of loop test. */
+/**
+ * Add a looping test function with an expected exit value to a test case
+ *
+ * The test will be called in a for(i = s; i < e; i++) loop with each
+ * iteration being executed in a new context. The loop variable 'i' is
+ * available in the test.
+ *
+ * The added test is expected to terminate by exiting with the given value
+ *
+ * @param tc test case to add test to
+ * @param tf function to add to test case
+ * @param expected_exit_value exit value for test function to return in
+ *                             order for the test to be considered passing
+ * @param s starting index for value "i" in test
+ * @param e ending index for value "i" in test
+ *
+ * @since 0.9.7
+ */
 #define tcase_add_loop_exit_test(tc,tf,expected_exit_value,s,e) \
   _tcase_add_test((tc),(tf),"" # tf "",0,(expected_exit_value),(s),(e))
 
 /* Add a test function to a test case
   (function version -- use this when the macro won't work
 */
-void CK_EXPORT _tcase_add_test (TCase *tc, TFun tf, const char *fname, int _signal, int allowed_exit_value, int start, int end);
-
-/* Add unchecked fixture setup/teardown functions to a test case
+CK_DLL_EXP void CK_EXPORT _tcase_add_test(TCase * tc, TFun tf,
+                                          const char *fname, int _signal,
+                                          int allowed_exit_value, int start,
+                                          int end);
 
-   If unchecked fixture functions are run at the start and end of the
-   test case, and not before and after unit tests. Note that unchecked
-   setup/teardown functions are not run in a separate address space,
-   like test functions, and so must not exit or signal (e.g.,
-   segfault)
+/**
+ * Add unchecked fixture setup/teardown functions to a test case
+ *
+ * Unchecked fixture functions are run at the start and end of the
+ * test case, and not before and after unit tests. Further,
+ * unchecked fixture functions are not run in a separate address space,
+ * like test functions, and so must not exit or signal (e.g.,
+ * segfault).
+ *
+ * Also, when run in CK_NOFORK mode, unchecked fixture functions may
+ * lead to different unit test behavior if unit tests change data
+ * setup by the fixture functions.
+ *
+ * Note that if a setup function fails, the remaining setup functions
+ * will be omitted, as will the test case and the teardown functions.
+ * If a teardown function fails the remaining teardown functins will be
+ * omitted.
+ *
+ * @param tc test case to add unchecked fixture setup/teardown to
+ * @param setup function to add to be executed before the test case;
+ *               if NULL no setup function is added
+ * @param teardown function to add to be executed after the test case;
+ *               if NULL no teardown function is added
+ * @since 0.8.0
+ */
+CK_DLL_EXP void CK_EXPORT tcase_add_unchecked_fixture(TCase * tc, SFun setup,
+                                                      SFun teardown);
 
-   Also, when run in CK_NOFORK mode, unchecked fixture functions may
-   lead to different unit test behavior IF unit tests change data
-   setup by the fixture functions.
+/**
+ * Add checked fixture setup/teardown functions to a test case
+ *
+ * Checked fixture functions are run before and after each unit test inside
+ * of the address space of the test. Thus, if using CK_FORK
+ * mode the separate process running the unit test will survive signals
+ * or unexpected exits in the fixture function. Also, if the setup
+ * function is idempotent, unit test behavior will be the same in
+ * CK_FORK and CK_NOFORK modes.
+ *
+ * However, since fixture functions are run before and after each unit
+ * test, they should not be expensive code.
+ *
+ * Note that if a setup function fails, the remaining setup functions
+ * will be omitted, as will the test and the teardown functions. If a
+ * teardown function fails the remaining teardown functins will be
+ * omitted.
+ *
+ * @param tc test case to add checked fixture setup/teardown to
+ * @param setup function to add to be executed before each unit test in
+ *               the test case;  if NULL no setup function is added
+ * @param teardown function to add to be executed after each unit test in
+ *               the test case; if NULL no teardown function is added
+ *
+ * @since 0.8.0
 */
-void CK_EXPORT tcase_add_unchecked_fixture (TCase *tc, SFun setup, SFun teardown);
-
-/* Add fixture setup/teardown functions to a test case
-
-   Checked fixture functions are run before and after unit
-   tests. Unlike unchecked fixture functions, checked fixture
-   functions are run in the same separate address space as the test
-   program, and thus the test function will survive signals or
-   unexpected exits in the fixture function. Also, IF the setup
-   function is idempotent, unit test behavior will be the same in
-   CK_FORK and CK_NOFORK modes.
+CK_DLL_EXP void CK_EXPORT tcase_add_checked_fixture(TCase * tc, SFun setup,
+                                                    SFun teardown);
 
-   However, since fixture functions are run before and after each unit
-   test, they should not be expensive code.
-
-*/ 
-void CK_EXPORT tcase_add_checked_fixture (TCase *tc, SFun setup, SFun teardown);
+/**
+ * Set the timeout for all tests in a test case.
+ *
+ * A test that lasts longer than the timeout (in seconds) will be killed
+ * and thus fail with an error.
+ *
+ * If not set, the default timeout is one assigned at compile time. If
+ * the environment variable CK_DEFAULT_TIMEOUT is defined and no timeout
+ * is set, the value in the environment variable is used.
+ *
+ * If Check is compile without fork() support this call is ignored,
+ * as timeouts are not possible.
+ *
+ * @param tc test case to assign timeout to
+ * @param timeout to use, in seconds. If the value contains a decimal
+ *                 portion, but no high resolution timer is available,
+ *                 the value is rounded up to the nearest second.
+ *
+ * @since 0.9.2
+ */
+CK_DLL_EXP void CK_EXPORT tcase_set_timeout(TCase * tc, double timeout);
 
-/* Set the timeout for all tests in a test case. A test that lasts longer
-   than the timeout (in seconds) will be killed and thus fail with an error.
-   The timeout can also be set globaly with the environment variable
-   CK_DEFAULT_TIMEOUT, the specific setting always takes precedence.
-*/
-void CK_EXPORT tcase_set_timeout (TCase *tc, int timeout);
 /* Internal function to mark the start of a test function */
-void CK_EXPORT tcase_fn_start (const char *fname, const char *file, int line);
+CK_DLL_EXP void CK_EXPORT tcase_fn_start(const char *fname, const char *file,
+                                         int line);
+
+/**
+ * Retreive the name of the current running test. This is the name
+ * of the test passed to START_TEST. This is only valid when called
+ * from a running test. The value return outside of a running test is
+ * undefined.
+ *
+ * @since 0.11.0
+ */
+CK_DLL_EXP const char* CK_EXPORT tcase_name(void);
 
-/* Start a unit test with START_TEST(unit_name), end with END_TEST
-   One must use braces within a START_/END_ pair to declare new variables
-*/ 
+/**
+ * Start a unit test with START_TEST(unit_name), end with END_TEST.
+ *
+ * One must use braces within a START_/END_ pair to declare new variables
+ *
+ * @since 0.6.0
+ */
 #define START_TEST(__testname)\
 static void __testname (int _i CK_ATTRIBUTE_UNUSED)\
 {\
   tcase_fn_start (""# __testname, __FILE__, __LINE__);
 
-/* End a unit test */
+/**
+ *  End a unit test
+ *
+ * @since 0.6.0
+ */
 #define END_TEST }
 
-/* Fail the test case unless expr is true */
-/* The space before the comma sign before ## is essential to be compatible
-   with gcc 2.95.3 and earlier.
-*/
-#define fail_unless(expr, ...)\
-        _fail_unless(expr, __FILE__, __LINE__,\
-        "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
-
-/* Fail the test case if expr is true */
-/* The space before the comma sign before ## is essential to be compatible
-   with gcc 2.95.3 and earlier.
-*/
+/*
+ * Fail the test case unless expr is false
+ *
+ * This call is deprecated.
+ */
+#define fail_unless ck_assert_msg
 
-/* FIXME: these macros may conflict with C89 if expr is 
-   FIXME:   strcmp (str1, str2) due to excessive string length. */
+/*
+ * Fail the test case if expr is false
+ *
+ * This call is deprecated.
+ *
+ * NOTE: The space before the comma sign before ## is essential to be compatible
+ * with gcc 2.95.3 and earlier.
+ * FIXME: these macros may conflict with C89 if expr is
+ * FIXME:   strcmp (str1, str2) due to excessive string length.
+ */
 #define fail_if(expr, ...)\
-        _fail_unless(!(expr), __FILE__, __LINE__,\
-        "Failure '"#expr"' occured" , ## __VA_ARGS__, NULL)
-
-/* Always fail */
-#define fail(...) _fail_unless(0, __FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
-
-/* Non macro version of #fail_unless, with more complicated interface */
-void CK_EXPORT _fail_unless (int result, const char *file,
-                             int line, const char *expr, ...);
-
-/* New check fail API. */
-#define ck_abort() ck_abort_msg(NULL)
-#define ck_abort_msg fail
-#define ck_assert(C) ck_assert_msg(C, NULL)
-#define ck_assert_msg fail_unless
-
-/* Integer comparsion macros with improved output compared to fail_unless(). */
-/* O may be any comparion operator. */
-#define _ck_assert_int(X, O, Y) ck_assert_msg((X) O (Y), "Assertion '"#X#O#Y"' failed: "#X"==%d, "#Y"==%d", X, Y) 
-#define ck_assert_int_eq(X, Y) _ck_assert_int(X, ==, Y) 
-#define ck_assert_int_ne(X, Y) _ck_assert_int(X, !=, Y) 
-
-/* String comparsion macros with improved output compared to fail_unless() */
-#define _ck_assert_str(C, X, O, Y) ck_assert_msg(C, "Assertion '"#X#O#Y"' failed: "#X"==\"%s\", "#Y"==\"%s\"", X, Y) 
-#define ck_assert_str_eq(X, Y) _ck_assert_str(!strcmp(X, Y), X, ==, Y)
-#define ck_assert_str_ne(X, Y) _ck_assert_str(strcmp(X, Y), X, !=, Y)
-
+  (expr) ? \
+     _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__, NULL) \
+     : _mark_point(__FILE__, __LINE__)
 
-/* Mark the last point reached in a unit test
-   (useful for tracking down where a segfault, etc. occurs)
-*/
-#define mark_point() _mark_point(__FILE__,__LINE__)
-
-/* Non macro version of #mark_point */
-void CK_EXPORT _mark_point (const char *file, int line);
-
-/* Result of a test */
-enum test_result {
-  CK_TEST_RESULT_INVALID, /* Default value; should not encounter this */
-  CK_PASS, /* Test passed*/
-  CK_FAILURE, /* Test completed but failed */
-  CK_ERROR /* Test failed to complete
-             (unexpected signal or non-zero early exit) */ 
-};
+/*
+ * Fail the test
+ *
+ * This call is deprecated.
+ */
+#define fail ck_abort_msg
 
-/* Specifies the how much output an SRunner should produce */
-enum print_output {
-  CK_SILENT, /* No output */
-  CK_MINIMAL, /* Only summary output */
-  CK_NORMAL, /* All failed tests */
-  CK_VERBOSE, /* All tests */
-  CK_ENV, /* Look at environment var */
-#if 0
-  CK_SUBUNIT, /* Run as a subunit child process */
+/*
+ * This is called whenever an assertion fails.
+ * Note that it only has the noreturn modifier when
+ * using fork. If fork is unavailable, the function
+ * calls longjmp() when a test assertion fails. Marking
+ * the function as noreturn causes gcc to make assumptions
+ * which are not valid, as longjmp() is like a return.
+ */
+#if 1
+CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
+                                            const char *expr,
+                                            ...) CK_ATTRIBUTE_NORETURN;
+#else
+CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
+                                            const char *expr, ...);
 #endif
-  CK_LAST
-};
-
-/* Holds state for a running of a test suite */
-typedef struct SRunner SRunner;
-
-/* Opaque type for a test failure */
-typedef struct TestResult TestResult;
 
-/* accessors for tr fields */
-enum ck_result_ctx {
-  CK_CTX_INVALID, /* Default value; should not encounter this */
-  CK_CTX_SETUP,
-  CK_CTX_TEST,
-  CK_CTX_TEARDOWN
-};
+/**
+ * Fail the test if expression is false
+ *
+ * @param expr expression to evaluate
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert(expr) ck_assert_msg(expr, NULL)
 
-/* Type of result */
-int CK_EXPORT tr_rtype (TestResult *tr);
-/* Context in which the result occurred */ 
-enum ck_result_ctx CK_EXPORT tr_ctx (TestResult *tr); 
-/* Failure message */
-const char * CK_EXPORT tr_msg (TestResult *tr);
-/* Line number at which failure occured */
-int CK_EXPORT tr_lno (TestResult *tr);
-/* File name at which failure occured */
-const char * CK_EXPORT tr_lfile (TestResult *tr);
-/* Test case in which unit test was run */
-const char * CK_EXPORT tr_tcname (TestResult *tr);
-
-/* Creates an SRunner for the given suite */
-SRunner * CK_EXPORT srunner_create (Suite *s);
-
-/* Adds a Suite to an SRunner */
-void CK_EXPORT srunner_add_suite (SRunner *sr, Suite *s);
-
-/* Frees an SRunner, all suites added to it and all contained test cases */
-void CK_EXPORT srunner_free (SRunner *sr);
-
-/* Test running */
-
-/* Runs an SRunner, printing results as specified (see enum print_output) */
-void CK_EXPORT srunner_run_all (SRunner *sr, enum print_output print_mode);
-
-/* Next functions are valid only after the suite has been
-   completely run, of course */
-
-/* Number of failed tests in a run suite. Includes failures + errors */
-int CK_EXPORT srunner_ntests_failed (SRunner *sr);
-
-/* Total number of tests run in a run suite */
-int CK_EXPORT srunner_ntests_run (SRunner *sr);
-
-/* Return an array of results for all failures
-  
-   Number of failures is equal to srunner_nfailed_tests.  Memory for
-   the array is malloc'ed and must be freed, but individual TestResults
-   must not
+/* The space before the comma sign before ## is essential to be compatible
+   with gcc 2.95.3 and earlier.
 */
-TestResult ** CK_EXPORT srunner_failures (SRunner *sr);
+/**
+ * Fail the test if the expression is false; print message on failure
+ *
+ * @param expr expression to evaluate
+ * @param ... message to print (in printf format) if expression is false
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_msg(expr, ...) \
+  (expr) ? \
+     _mark_point(__FILE__, __LINE__) : \
+     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
 
-/* Return an array of results for all run tests
+/**
+ * Unconditionally fail the test
+ *
+ * @note Once called, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_abort() ck_abort_msg(NULL)
+/**
+ * Unconditionally fail the test; print a message
+ *
+ * @param ... message to print (in printf format)
+ *
+ * @note Once called, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
+
+/* Signed and unsigned integer comparison macros with improved output compared to ck_assert(). */
+/* OP may be any comparison operator. */
+#define _ck_assert_int(X, OP, Y) do { \
+  intmax_t _ck_x = (X); \
+  intmax_t _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %jd, %s == %jd", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
+} while (0)
+
+/**
+ * Check two signed integers to determine if X==Y
+ *
+ * If not X==Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_int_eq(X, Y) _ck_assert_int(X, ==, Y)
+/**
+ * Check two signed integers to determine if X!=Y
+ *
+ * If not X!=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_int_ne(X, Y) _ck_assert_int(X, !=, Y)
+/**
+ * Check two signed integers to determine if X<Y
+ *
+ * If not X<Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_lt(X, Y) _ck_assert_int(X, <, Y)
+/**
+ * Check two signed integers to determine if X<=Y
+ *
+ * If not X<=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_le(X, Y) _ck_assert_int(X, <=, Y)
+/**
+ * Check two signed integers to determine if X>Y
+ *
+ * If not X>Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_gt(X, Y) _ck_assert_int(X, >, Y)
+/**
+ * Check two signed integers to determine if X>=Y
+ *
+ * If not X>=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_ge(X, Y) _ck_assert_int(X, >=, Y)
+
+#define _ck_assert_uint(X, OP, Y) do { \
+  uintmax_t _ck_x = (X); \
+  uintmax_t _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %ju, %s == %ju", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
+} while (0)
+/**
+ * Check two unsigned integers to determine if X==Y
+ *
+ * If not X==Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_eq(X, Y) _ck_assert_uint(X, ==, Y)
+/**
+ * Check two unsigned integers to determine if X!=Y
+ *
+ * If not X!=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_ne(X, Y) _ck_assert_uint(X, !=, Y)
+/**
+ * Check two unsigned integers to determine if X<Y
+ *
+ * If not X<Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_lt(X, Y) _ck_assert_uint(X, <, Y)
+/**
+ * Check two unsigned integers to determine if X<=Y
+ *
+ * If not X<=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_le(X, Y) _ck_assert_uint(X, <=, Y)
+/**
+ * Check two unsigned integers to determine if X>Y
+ *
+ * If not X>Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_gt(X, Y) _ck_assert_uint(X, >, Y)
+/**
+ * Check two unsigned integers to determine if X>=Y
+ *
+ * If not X>=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_ge(X, Y) _ck_assert_uint(X, >=, Y)
+
+/* Number of digits after the decimal point to output via printf */
+#ifndef CK_FLOATING_DIG
+# define CK_FLOATING_DIG 6
+#endif /* CK_FLOATING_DIG */
+
+/* Floating point number comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP may be any comparison operator, TP is type, TM is type modifier. */
+#define _ck_assert_floating(X, OP, Y, TP, TM) do { \
+  TP _ck_x = (X); \
+  TP _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, \
+  "Assertion '%s' failed: %s == %.*" TM "g, %s == %.*" TM "g", \
+  #X" "#OP" "#Y, \
+  #X, (int)CK_FLOATING_DIG, _ck_x, \
+  #Y, (int)CK_FLOATING_DIG, _ck_y); \
+} while (0)
+
+/* Check floating point number is finise. */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_finite(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(isfinite(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is finite", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Check floating point number is infinise. */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_infinite(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(isinf(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is infinite", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Check floating point number is "Not a Number". */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_nan(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(isnan(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is NaN", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Check floating point number is not "Not a Number". */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_nonnan(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(!isnan(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is not NaN", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Floating point tolerance comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP, D can have values: >, -1; <, 1. */
+#define _ck_assert_floating_op_tol(X, OP, Y, T, D, TP, TM) do { \
+  TP _ck_x = (X); \
+  TP _ck_y = (Y); \
+  TP _ck_t = (T); \
+  ck_assert_msg((_ck_x - _ck_y) OP _ck_t * (D), \
+  "Assertion '%s' failed: %s == %.*" TM "g, %s == %.*" TM "g, %s == %.*" TM "g", \
+  #X" "#OP"= "#Y", error < "#T, \
+  #X, (int)CK_FLOATING_DIG, _ck_x, \
+  #Y, (int)CK_FLOATING_DIG, _ck_y, \
+  #T, (int)CK_FLOATING_DIG, _ck_t); \
+} while (0)
+
+/* Floating point tolerance comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP can have values: <; >=. */
+#define _ck_assert_floating_absdiff_op_tol(X, Y, OP, T, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  TP _ck_y = (Y); \
+  TP _ck_t = (T); \
+  ck_assert_msg(fabsl(_ck_y - _ck_x) OP _ck_t, \
+    "Assertion '%s' failed: %s == %.*" TM "g, %s == %.*" TM "g, %s == %.*" TM "g", \
+    "fabsl("#Y" - "#X") "#OP" "#T, \
+    #X, (int)CK_FLOATING_DIG, _ck_x, \
+    #Y, (int)CK_FLOATING_DIG, _ck_y, \
+    #T, (int)CK_FLOATING_DIG, _ck_t); \
+} while (0)
+
+/**
+ * Check two single precision floating point numbers to determine if X == Y
+ *
+ * If not X == Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_eq(X, Y) _ck_assert_floating(X, ==, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X != Y
+ *
+ * If not X != Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ne(X, Y) _ck_assert_floating(X, !=, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X < Y
+ *
+ * If not X < Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_lt(X, Y) _ck_assert_floating(X, <, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X <= Y
+ *
+ * If not X <= Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_le(X, Y) _ck_assert_floating(X, <=, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X > Y
+ *
+ * If not X > Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_gt(X, Y) _ck_assert_floating(X, >, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X >= Y
+ *
+ * If not X >= Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ge(X, Y) _ck_assert_floating(X, >=, Y, float, "")
 
-   Number of results is equal to srunner_ntests_run, and excludes
-   failures due to setup function failure.
+/**
+ * Check two single precision floating point numbers to determine if X≈Y
+ * with specified tolerance
+ *
+ * If not X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_eq_tol(X, Y, T)  _ck_assert_floating_absdiff_op_tol(X, Y, <, T, float, "")
 
-   Memory is malloc'ed and must be freed, but individual TestResults
-   must not
-*/  
-TestResult ** CK_EXPORT srunner_results (SRunner *sr);
+/**
+ * Check two single precision floating point numbers to determine if not X≈Y
+ * with specified tolerance
+ *
+ * If X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ne_tol(X, Y, T) _ck_assert_floating_absdiff_op_tol(X, Y, >=, T, float, "")
 
-/* Printing */
+/**
+ * Check two single precision floating point numbers to determine if X>≈Y
+ * with specified tolerance
+ *
+ * If not X >≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ge_tol(X, Y, T) _ck_assert_floating_op_tol(X, >, Y, T, -1, float, "")
+
+/**
+ * Check two single precision floating point numbers to determine if X<≈Y
+ * with specified tolerance
+ *
+ * If not X <≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_le_tol(X, Y, T) _ck_assert_floating_op_tol(X, <, Y, T, 1, float, "")
+
+/**
+ * Check that a single precision floating point number is finite; i.e. is
+ * not +infinity, -infinity, or "Not a Number" (NaN)
+ *
+ * If X is +INFINITY or X is -INFINITY, or X is NaN, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_finite(X) _ck_assert_floating_finite(X, float, "")
+
+/**
+ * Check that a single precision floating point number is infinite,
+ * either +infinity or -infinity
+ *
+ * If X is not +INFINITY and X is not -INFINITY, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_infinite(X) _ck_assert_floating_infinite(X, float, "")
+
+/**
+ * Check that a single precision floating point number
+ * is "Not a Number" (NaN)
+ *  
+ * If X is not NaN, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_nan(X) _ck_assert_floating_nan(X, float, "")
+
+/**
+ * Check that a single precision floating point number is
+ * not "Not a Number" (NaN)
+ *
+ * If X is NaN, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_nonnan(X) _ck_assert_floating_nonnan(X, float, "")
 
-/* Print the results contained in an SRunner */
-void CK_EXPORT srunner_print (SRunner *sr, enum print_output print_mode);
-  
-  
-/* Set a log file to which to write during test running.
+/**
+ * Check two double precision floating point numbers to determine if X == Y
+ *
+ * If not X == Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_eq(X, Y) _ck_assert_floating(X, ==, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X != Y
+ *
+ * If not X != Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ne(X, Y) _ck_assert_floating(X, !=, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X < Y
+ *
+ * If not X < Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_lt(X, Y) _ck_assert_floating(X, <, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X <= Y
+ *
+ * If not X <= Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_le(X, Y) _ck_assert_floating(X, <=, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X > Y
+ *
+ * If not X > Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_gt(X, Y) _ck_assert_floating(X, >, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X >= Y
+ *
+ * If not X >= Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ge(X, Y) _ck_assert_floating(X, >=, Y, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if X≈Y
+ * with specified tolerance
+ *
+ * If not X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_eq_tol(X, Y, T)  _ck_assert_floating_absdiff_op_tol(X, Y, <, T, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if not X≈Y
+ * with specified tolerance
+ *
+ * If X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ne_tol(X, Y, T) _ck_assert_floating_absdiff_op_tol(X, Y, >=, T, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if X>≈Y
+ * with specified tolerance
+ *
+ * If not X >≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ge_tol(X, Y, T) _ck_assert_floating_op_tol(X, >, Y, T, -1, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if X<≈Y
+ * with specified tolerance
+ *
+ * If not X <≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_le_tol(X, Y, T) _ck_assert_floating_op_tol(X, <, Y, T, 1, double, "")
+
+/**
+ * Check that a double precision floating point number is finite; i.e. is
+ * not +infinity, -infinity, or "Not a Number" (NaN)
+ *
+ * If X is +INFINITY or X is -INFINITY, or X is NaN, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_finite(X) _ck_assert_floating_finite(X, double, "")
+
+/**
+ * Check that a double precision floating point number is infinite,
+ * either +infinity or -infinity
+ *
+ * If X is not +INFINITY and X is not -INFINITY, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_infinite(X) _ck_assert_floating_infinite(X, double, "")
+
+/**
+ * Check that a double precision floating point number
+ * is "Not a Number" (NaN)
+ *  
+ * If X is not NaN, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_nan(X) _ck_assert_floating_nan(X, double, "")
+
+/**
+ * Check that a double precision floating point number is
+ * not "Not a Number" (NaN)
+ *
+ * If X is NaN, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_nonnan(X) _ck_assert_floating_nonnan(X, double, "")
+
+/** 
+ * Check two double precision floating point numbers to determine if X == Y
+ *
+ * If not X == Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_eq(X, Y) _ck_assert_floating(X, ==, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X != Y
+ *
+ * If not X != Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ne(X, Y) _ck_assert_floating(X, !=, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X < Y
+ *
+ * If not X < Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_lt(X, Y) _ck_assert_floating(X, <, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X <= Y
+ *
+ * If not X <= Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_le(X, Y) _ck_assert_floating(X, <=, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X > Y
+ *
+ * If not X > Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_gt(X, Y) _ck_assert_floating(X, >, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X >= Y
+ *
+ * If not X >= Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ge(X, Y) _ck_assert_floating(X, >=, Y, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if X≈Y
+ * with specified tolerance
+ *
+ * If not X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_eq_tol(X, Y, T)  _ck_assert_floating_absdiff_op_tol(X, Y, <, T, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if not X≈Y
+ * with specified tolerance
+ *
+ * If X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ne_tol(X, Y, T) _ck_assert_floating_absdiff_op_tol(X, Y, >=, T, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if X>≈Y
+ * with specified tolerance
+ *
+ * If not X >≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ge_tol(X, Y, T) _ck_assert_floating_op_tol(X, >, Y, T, -1, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if X<≈Y
+ * with specified tolerance
+ *
+ * If not X <≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_le_tol(X, Y, T) _ck_assert_floating_op_tol(X, <, Y, T, 1, long double, "L")
+
+/**
+ * Check that a double precision floating point number is finite; i.e. is
+ * not +infinity, -infinity, or "Not a Number" (NaN)
+ *
+ * If X is +INFINITY or X is -INFINITY, or X is NaN, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_finite(X) _ck_assert_floating_finite(X, long double, "L")
+
+/**
+ * Check that a double precision floating point number is infinite,
+ * either +infinity or -infinity
+ *
+ * If X is not +INFINITY and X is not -INFINITY, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_infinite(X) _ck_assert_floating_infinite(X, long double, "L")
+
+/**
+ * Check that a double precision floating point number
+ * is "Not a Number" (NaN)
+ *  
+ * If X is not NaN, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_nan(X) _ck_assert_floating_nan(X, long double, "L")
+
+/**
+ * Check that a double precision floating point number is
+ * not "Not a Number" (NaN)
+ *
+ * If X is NaN, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_nonnan(X) _ck_assert_floating_nonnan(X, long double, "L")
+
+/* String comparison macros with improved output compared to ck_assert() */
+/* OP might be any operator that can be used in '0 OP strcmp(X,Y)' comparison. */
+/* String pointer could be compared againts NULL with == (NULLEQ = 1) and != (NULLNE = 1) operators. */
+/* The x and y parameter swap in strcmp() is needed to handle >, >=, <, <= operators. */
+/* If the x or y parameter is NULL its value will be printed without quotes. */
+#define _ck_assert_str(X, OP, Y, NULLEQ, NULLNE) do { \
+  const char* _ck_x = (X); \
+  const char* _ck_y = (Y); \
+  const char* _ck_x_s; \
+  const char* _ck_y_s; \
+  const char* _ck_x_q; \
+  const char* _ck_y_q; \
+  if (_ck_x != NULL) { \
+    _ck_x_q = "\""; \
+    _ck_x_s = _ck_x; \
+  } else { \
+    _ck_x_q = ""; \
+    _ck_x_s = "(null)"; \
+  } \
+  if (_ck_y != NULL) { \
+    _ck_y_q = "\""; \
+    _ck_y_s = _ck_y; \
+  } else { \
+    _ck_y_q = ""; \
+    _ck_y_s = "(null)"; \
+  } \
+  ck_assert_msg( \
+    (NULLEQ && (_ck_x == NULL) && (_ck_y == NULL)) || \
+    (NULLNE && ((_ck_x == NULL) || (_ck_y == NULL)) && (_ck_x != _ck_y)) || \
+    ((_ck_x != NULL) && (_ck_y != NULL) && (0 OP strcmp(_ck_y, _ck_x))), \
+    "Assertion '%s' failed: %s == %s%s%s, %s == %s%s%s", \
+    #X" "#OP" "#Y, \
+    #X, _ck_x_q, _ck_x_s, _ck_x_q, \
+    #Y, _ck_y_q, _ck_y_s, _ck_y_q); \
+} while (0)
+
+/**
+ * Check two strings to determine if 0==strcmp(X,Y)
+ *
+ * If X or Y is NULL the test failes.
+ * If (0==strcmp(X,Y)), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_str_eq(X, Y) _ck_assert_str(X, ==, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0!=strcmp(X,Y)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0!=strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_str_ne(X, Y) _ck_assert_str(X, !=, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0<strcmp(X,Y), (e.g. strcmp(X,Y)>0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0<strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_lt(X, Y) _ck_assert_str(X, <, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0<=strcmp(X,Y) (e.g. strcmp(X,Y)>=0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0<=strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_le(X, Y) _ck_assert_str(X, <=, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0<strcmp(X,Y) (e.g. strcmp(X,Y)>0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0<strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_gt(X, Y) _ck_assert_str(X, >, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0>=strcmp(X,Y) (e.g. strcmp(X,Y)<=0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0>=strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_ge(X, Y) _ck_assert_str(X, >=, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0==strcmp(X,Y) or if both are undefined 
+ *
+ * If both X and Y are NULL the test passes. However, if only one is NULL
+ * the test fails.
+ * If not ((X==NULL)&&(Y==NULL)) || (0==strcmp(X,Y)), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_pstr_eq(X, Y) _ck_assert_str(X, ==, Y, 1, 0)
+
+/**
+ * Check two strings to determine if 0!=strcmp(X,Y) or one of them is undefined
+ *
+ * If either X or Y is NULL the test passes, however if both are NULL
+ * the test fails.
+ * If not (X!=NULL)&&(Y!=NULL)&&(0!=strcmp(X,Y)), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_pstr_ne(X, Y) _ck_assert_str(X, !=, Y, 0, 1)
+
+/* Memory location comparison macros with improved output compared to ck_assert() */
+/* OP might be any operator that can be used in '0 OP memcmp(X,Y,L)' comparison */
+/* The x and y parameter swap in memcmp() is needed to handle >, >=, <, <= operators */
+/* Output is limited to CK_MAX_ASSERT_MEM_PRINT_SIZE bytes */
+#ifndef CK_MAX_ASSERT_MEM_PRINT_SIZE
+#define CK_MAX_ASSERT_MEM_PRINT_SIZE 64
+#endif
 
-  Log file setting is an initialize only operation -- it should be
-  done immediatly after SRunner creation, and the log file can't be
-  changed after being set.
+/* Memory location comparison macros with improved output compared to ck_assert() */
+/* OP might be any operator that can be used in '0 OP memcmp(X,Y,L)' comparison */
+/* The x and y parameter swap in memcmp() is needed to handle >, >=, <, <= operators */
+/* Output is limited to CK_MAX_ASSERT_MEM_PRINT_SIZE bytes */
+#ifndef CK_MAX_ASSERT_MEM_PRINT_SIZE
+#define CK_MAX_ASSERT_MEM_PRINT_SIZE 64
+#endif
+
+#define _ck_assert_mem(X, OP, Y, L) do { \
+  const uint8_t* _ck_x = (const uint8_t*)(X); \
+  const uint8_t* _ck_y = (const uint8_t*)(Y); \
+  size_t _ck_l = (L); \
+  char _ck_x_str[CK_MAX_ASSERT_MEM_PRINT_SIZE * 2 + 1]; \
+  char _ck_y_str[CK_MAX_ASSERT_MEM_PRINT_SIZE * 2 + 1]; \
+  static const char _ck_hexdigits[] = "0123456789abcdef"; \
+  size_t _ck_i; \
+  size_t _ck_maxl = (_ck_l > CK_MAX_ASSERT_MEM_PRINT_SIZE) ? CK_MAX_ASSERT_MEM_PRINT_SIZE : _ck_l; \
+  for (_ck_i = 0; _ck_i < _ck_maxl; _ck_i++) { \
+    _ck_x_str[_ck_i * 2  ]   = _ck_hexdigits[(_ck_x[_ck_i] >> 4) & 0xF]; \
+    _ck_y_str[_ck_i * 2  ]   = _ck_hexdigits[(_ck_y[_ck_i] >> 4) & 0xF]; \
+    _ck_x_str[_ck_i * 2 + 1] = _ck_hexdigits[_ck_x[_ck_i] & 0xF]; \
+    _ck_y_str[_ck_i * 2 + 1] = _ck_hexdigits[_ck_y[_ck_i] & 0xF]; \
+  } \
+  _ck_x_str[_ck_i * 2] = 0; \
+  _ck_y_str[_ck_i * 2] = 0; \
+  if (_ck_maxl != _ck_l) { \
+    _ck_x_str[_ck_i * 2 - 2] = '.'; \
+    _ck_y_str[_ck_i * 2 - 2] = '.'; \
+    _ck_x_str[_ck_i * 2 - 1] = '.'; \
+    _ck_y_str[_ck_i * 2 - 1] = '.'; \
+  } \
+  ck_assert_msg(0 OP memcmp(_ck_y, _ck_x, _ck_l), \
+    "Assertion '%s' failed: %s == \"%s\", %s == \"%s\"", #X" "#OP" "#Y, #X, _ck_x_str, #Y, _ck_y_str); \
+} while (0)
+/**
+ * Check two memory locations to determine if 0==memcmp(X,Y,L)
+ *
+ * If not 0==memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_eq(X, Y, L) _ck_assert_mem(X, ==, Y, L)
+/**
+ * Check two memory locations to determine if 0!=memcmp(X,Y,L)
+ *
+ * If not 0!=memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_ne(X, Y, L) _ck_assert_mem(X, !=, Y, L)
+/**
+ * Check two memory locations to determine if 0<memcmp(X,Y,L), (e.g. memcmp(X,Y,L)>0)
+ *
+ * If not 0<memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_lt(X, Y, L) _ck_assert_mem(X, <, Y, L)
+/**
+ * Check two memory locations to determine if 0<=memcmp(X,Y,L) (e.g. memcmp(X,Y,L)>=0)
+ *
+ * If not 0<=memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_le(X, Y, L) _ck_assert_mem(X, <=, Y, L)
+/**
+ * Check two memory locations to determine if 0<memcmp(X,Y,L) (e.g. memcmp(X,Y,L)>0)
+ *
+ * If not 0<memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_gt(X, Y, L) _ck_assert_mem(X, >, Y, L)
+/**
+ * Check two memory locations to determine if 0>=memcmp(X,Y,L) (e.g. memcmp(X,Y,L)<=0)
+ *
+ * If not 0>=memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_ge(X, Y, L) _ck_assert_mem(X, >=, Y, L)
+
+/* Pointer comparison macros with improved output compared to ck_assert(). */
+/* OP may only be == or !=  */
+#define _ck_assert_ptr(X, OP, Y) do { \
+  const void* _ck_x = (X); \
+  const void* _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %#x, %s == %#x", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
+} while (0)
+
+/* Pointer against NULL comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP may only be == or !=  */
+#define _ck_assert_ptr_null(X, OP) do { \
+  const void* _ck_x = (X); \
+  ck_assert_msg(_ck_x OP NULL, \
+  "Assertion '%s' failed: %s == %#x", \
+  #X" "#OP" NULL", \
+  #X, _ck_x); \
+} while (0)
+
+/**
+ * Check if two pointers are equal.
+ *
+ * If the two passed pointers are not equal, the test
+ * fails.
+ *
+ * @param X pointer
+ * @param Y pointer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_ptr_eq(X, Y) _ck_assert_ptr(X, ==, Y)
+
+/**
+ * Check if two pointers are not.
+ *
+ * If the two passed pointers are equal, the test fails.
+ *
+ * @param X pointer
+ * @param Y pointer to compare against X
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_ptr_ne(X, Y) _ck_assert_ptr(X, !=, Y)
+
+/**
+ * Check if a pointer is equal to NULL.
+ *
+ * If X != NULL, the test fails.
+ *
+ * @param X pointer to compare against NULL
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ptr_null(X) _ck_assert_ptr_null(X, ==)
+
+/**
+ * Check if a pointer is not equal to NULL.
+ *
+ * If X == NULL, the test fails.
+ *
+ * @param X pointer to compare against NULL
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ptr_nonnull(X) _ck_assert_ptr_null(X, !=)
+
+/**
+ * Mark the last point reached in a unit test.
+ *
+ * If the test throws a signal or exits, the location noted with the
+ * failure is the last location of a ck_assert*() or ck_abort() call.
+ * Use mark_point() to record intermediate locations (useful for tracking down
+ * crashes or exits).
+ *
+ * @since 0.6.0
+*/
+#define mark_point() _mark_point(__FILE__,__LINE__)
+
+/* Non macro version of #mark_point */
+CK_DLL_EXP void CK_EXPORT _mark_point(const char *file, int line);
+
+/**
+ * Enum describing the possible results of a test
+ */
+enum test_result
+{
+    CK_TEST_RESULT_INVALID,     /**< Default value; should not encounter this */
+    CK_PASS,                    /**< Test passed */
+    CK_FAILURE,                 /**< Test completed but failed */
+    CK_ERROR                    /**< Test failed to complete
+                                   (unexpected signal or non-zero early exit) */
+};
+
+/**
+ * Enum specifying the verbosity of output a SRunner should produce
+ */
+enum print_output
+{
+    CK_SILENT,                  /**< No output */
+    CK_MINIMAL,                 /**< Only summary output */
+    CK_NORMAL,                  /**< All failed tests */
+    CK_VERBOSE,                 /**< All tests */
+    CK_ENV,                     /**< Look at environment var CK_VERBOSITY
+                                     for what verbosity to use, which can be
+                                     either "silent", "minimal", "normal",
+                                     or "verbose". If the environment variable
+                                     is not set, then CK_NORMAL will be used.*/
+#if 0
+    CK_SUBUNIT,                 /**< Run as a subunit child process */
+#endif
+    CK_LAST                     /**< Not a valid option */
+};
+
+/**
+ * Holds state for a running of a test suite
+ */
+typedef struct SRunner SRunner;
+
+/**
+ * Opaque type for a test failure
+ */
+typedef struct TestResult TestResult;
+
+/**
+ * Enum representing the types of contexts for a test
+ */
+enum ck_result_ctx
+{
+    CK_CTX_INVALID,             /**< Default value; should not encounter this */
+    CK_CTX_SETUP,               /**< Setup before a test */
+    CK_CTX_TEST,                /**< Body of test itself */
+    CK_CTX_TEARDOWN             /**< Teardown after a test */
+};
+
+/**
+ * Retrieve type of result that the given test result represents.
+ *
+ * This is a member of test_result, and can represent a
+ * pass, failure, or error.
+ *
+ * @param tr test result to retrieve result from
+ *
+ * @return result of given test
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP int CK_EXPORT tr_rtype(TestResult * tr);
+
+/**
+ * Retrieve context in which the result occurred for the given test result.
+ *
+ * The types of contents include the test setup, teardown, or the
+ * body of the test itself.
+ *
+ * @param tr test result to retrieve context from
+ *
+ * @return context to which the given test result applies
+ *
+ * @since 0.8.0
+ */
+CK_DLL_EXP enum ck_result_ctx CK_EXPORT tr_ctx(TestResult * tr);
+
+/**
+ * Retrieve failure message from test result, if applicable.
+ *
+ * @return pointer to a message, if one exists. NULL otherwise.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP const char *CK_EXPORT tr_msg(TestResult * tr);
+
+/**
+ * Retrieve line number at which a failure occurred, if applicable.
+ *
+ * @return If the test resulted in a failure, returns the line number
+ *          that the failure occurred on; otherwise returns -1.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP int CK_EXPORT tr_lno(TestResult * tr);
+
+/**
+ * Retrieve file name at which a failure occurred, if applicable.
+ *
+ * @return If the test resulted in a failure, returns a string
+ *          containing the name of the file where the failure
+ *          occurred; otherwise returns NULL.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP const char *CK_EXPORT tr_lfile(TestResult * tr);
+
+/**
+ * Retrieve test case name in which a failure occurred, if applicable.
+ *
+ * @return If the test resulted in a failure, returns a string
+ *          containing the name of the test suite where the failure
+ *          occurred; otherwise returns NULL.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP const char *CK_EXPORT tr_tcname(TestResult * tr);
+
+/**
+ * Creates a suite runner for the given suite.
+ *
+ * Once created, additional suites can be added to the
+ * suite runner using srunner_add_suite(), and the suite runner can be
+ * run with srunner_run_all(). Once finished, the suite runner
+ * must be freed with srunner_free().
+ *
+ * @param s suite to generate a suite runner for
+ *
+ * @return suite runner for the given suite
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP SRunner *CK_EXPORT srunner_create(Suite * s);
+
+/**
+ * Add an additional suite to a suite runner.
+ *
+ * The first suite in a suite runner is always added in srunner_create().
+ * This call adds additional suites to a suite runner.
+ *
+ * @param sr suite runner to add the given suite
+ * @param s suite to add to the given suite runner
+ *
+ * @since 0.7.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_add_suite(SRunner * sr, Suite * s);
+
+/**
+ * Frees a suite runner, including all contained suite and test cases.
+ *
+ * This call is responsible for freeing all resources related to a
+ * suite runner and all contained suites and test cases. Suite and
+ * test cases need not be freed individually, as this call handles that.
+ *
+ * @param sr suite runner to free
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_free(SRunner * sr);
+
+/**
+ * Runs a suite runner and all contained suite, printing results to
+ * stdout as specified by the print_mode.
+ *
+ * In addition to running all suites, if the suite runner has been
+ * configured to output to a log, that is also performed.
+ *
+ * Note that if the CK_RUN_CASE, CK_RUN_SUITE, CK_INCLUDE_TAGS and/or
+ * CK_EXCLUDE_TAGS environment variables are defined, then only the
+ * named suites or test cases will run.
+ *
+ * @param sr suite runner to run all suites from
+ * @param print_mode the verbosity in which to report results to stdout
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_run_all(SRunner * sr,
+                                          enum print_output print_mode);
+
+/**
+ * Run a specific suite or test case from a suite runner, printing results
+ * to stdout as specified by the print_mode.
+ *
+ * In addition to running any applicable suites or test cases, if the
+ * suite runner has been configured to output to a log, that is also
+ * performed.
+ *
+ * Note that if the sname and tcname parameters are passed as null
+ * then the function will fallback to using the environment variables
+ * CK_RUN_SUITE and CK_RUN_CASE respectively in order to select the
+ * suite/cases.
+ * 
+ * Similarly if the CK_INCLUDE_TAGS and/or CK_EXCLUDE_TAGS environment
+ * variables are defined then these will further filter the test cases
+ * (see srunner_run_tagged, below).
+ *
+ * @param sr suite runner where the given suite or test case must be
+ * @param sname suite name to run. A NULL means use the value of the
+ * environment variable CK_RUN_SUITE if set, otherwise run "any/every
+ * suite".
+ * @param tcname test case name to run. A NULL means use the value of
+ * the environment variable CK_RUN_CASE if set, otherwise run
+ * "any/every case".
+ * @param print_mode the verbosity in which to report results to stdout
+ *
+ * @since 0.9.9
+ */
+CK_DLL_EXP void CK_EXPORT srunner_run(SRunner * sr, const char *sname,
+                                      const char *tcname,
+                                      enum print_output print_mode);
+
+
+/**
+ * Run a specific suite or test case or testcases with specific tags
+ * from a suite runner, printing results to stdout as specified by the
+ * print_mode.
+ *
+ * In addition to running any applicable suites or test cases, if the
+ * suite runner has been configured to output to a log, that is also
+ * performed.
+ *
+ * Note that if sname, tcname, include_tags, exclude_tags parameters
+ * are passed as NULL then if the environment variables CK_RUN_SUITE,
+ * CK_RUN_CASE, CK_INCLUDE_TAGS, CK_EXCLUDE_TAGS are defined then these
+ * values will be used instead.
+ *
+ * @param sr suite runner where the given suite or test case must be
+ * @param sname suite name to run. A NULL means use the value of the
+ * environment variable CK_RUN_SUITE if set, otherwise run "any/every
+ * suite".
+ * @param tcname test case name to run. A NULL means use the value of
+ * the environment variable CK_RUN_CASE if set, otherwise run
+ * "any/every case".
+ * @param include_tags space separate list of tags. Only run test
+ * cases that share one of these tags. A NULL means use the value of
+ * the environment variable CK_INCLUDE_TAGS if set, otherwise run
+ * "any/every test case".
+ * @param exclude_tags space separate list of tags. Only run test
+ * cases that do not share one of these tags even if they are selected
+ * by an included tag. A NULL means use the value of the environment
+ * variable CK_EXCLUDE_TAGS if set, otherwise run "any/every test
+ * case".
+ * @param print_mode the verbosity in which to report results to stdout
+ *
+ * @since 0.11.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_run_tagged(SRunner * sr, const char *sname,
+                                            const char *tcname,
+                                            const char *include_tags,
+                                            const char *exclude_tags,
+                                            enum print_output print_mode);
+
+/**
+ * Retrieve the number of failed tests executed by a suite runner.
+ *
+ * This value represents both test failures and errors.
+ *
+ * @param sr suite runner to query for all failed tests
+ *
+ * @return number of test failures and errors found by the suite runner
+ *
+ * @since 0.6.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_ntests_failed(SRunner * sr);
+
+/**
+ * Retrieve the total number of tests run by a suite runner.
+ *
+ * @param sr suite runner to query for all tests run
+ *
+ * @return number of all tests run by the suite runner
+ *
+ * @since 0.6.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_ntests_run(SRunner * sr);
+
+/**
+ * Return an array of results for all failures found by a suite runner.
+ *
+ * Number of results is equal to srunner_nfailed_tests().
+ *
+ * Information about individual results can be queried using:
+ * tr_rtype(), tr_ctx(), tr_msg(), tr_lno(), tr_lfile(), and tr_tcname().
+ *
+ * Memory is malloc'ed and must be freed; however free the entire structure
+ * instead of individual test cases.
+ *
+ * @param sr suite runner to retrieve results from
+ *
+ * @return array of TestResult objects
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP TestResult **CK_EXPORT srunner_failures(SRunner * sr);
+
+/**
+ * Return an array of results for all tests run by a suite runner.
+ *
+ * Number of results is equal to srunner_ntests_run(), and excludes
+ * failures due to setup function failure.
+ *
+ * Information about individual results can be queried using:
+ * tr_rtype(), tr_ctx(), tr_msg(), tr_lno(), tr_lfile(), and tr_tcname().
+ *
+ * Memory is malloc'ed and must be freed; however free the entire structure
+ * instead of individual test cases.
+ *
+ * @param sr suite runner to retrieve results from
+ *
+ * @return array of TestResult objects
+ *
+ * @since 0.6.1
 */
-void CK_EXPORT srunner_set_log (SRunner *sr, const char *fname);
+CK_DLL_EXP TestResult **CK_EXPORT srunner_results(SRunner * sr);
+
+/**
+ * Print the results contained in an SRunner to stdout.
+ *
+ * @param sr suite runner to print results for to stdout
+ * @param print_mode the print_output (verbosity) to use to report
+ *         the result
+ *
+ * @since 0.7.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_print(SRunner * sr,
+                                        enum print_output print_mode);
 
-/* Does the SRunner have a log file? */
-int CK_EXPORT srunner_has_log (SRunner *sr);
+/**
+ * Set the suite runner to output the result in log format to the
+ * given file.
+ *
+ * Note: log file setting is an initialize only operation -- it should
+ * be done immediately after SRunner creation, and the log file can't be
+ * changed after being set.
+ *
+ * This setting does not conflict with the other log output types;
+ * all logging types can occur concurrently if configured.
+ *
+ * @param sr suite runner to log results of in log format
+ * @param fname file name to output log results to
+ *
+ * @since 0.7.1
+*/
+CK_DLL_EXP void CK_EXPORT srunner_set_log(SRunner * sr, const char *fname);
 
-/* Return the name of the log file, or NULL if none */
-const char * CK_EXPORT srunner_log_fname (SRunner *sr);
+/**
+ * Checks if the suite runner is assigned a file for log output.
+ *
+ * @param sr suite runner to check
+ *
+ * @return 1 iff the suite runner currently is configured to output
+ *         in log format; 0 otherwise
+ *
+ * @since 0.7.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_has_log(SRunner * sr);
 
-/* Set a xml file to which to write during test running.
+/**
+ * Retrieves the name of the currently assigned file
+ * for log output, if any exists.
+ *
+ * @return the name of the log file, or NULL if none is configured
+ *
+ * @since 0.7.1
+ */
+CK_DLL_EXP const char *CK_EXPORT srunner_log_fname(SRunner * sr);
 
-  XML file setting is an initialize only operation -- it should be
-  done immediatly after SRunner creation, and the XML file can't be
-  changed after being set.
+/**
+ * Set the suite runner to output the result in XML format to the
+ * given file.
+ *
+ * Note: XML file setting is an initialize only operation -- it should
+ * be done immediately after SRunner creation, and the XML file can't be
+ * changed after being set.
+ *
+ * This setting does not conflict with the other log output types;
+ * all logging types can occur concurrently if configured.
+ *
+ * @param sr suite runner to log results of in XML format
+ * @param fname file name to output XML results to
+ *
+ * @since 0.9.1
 */
-void CK_EXPORT srunner_set_xml (SRunner *sr, const char *fname);
+CK_DLL_EXP void CK_EXPORT srunner_set_xml(SRunner * sr, const char *fname);
+
+/**
+ * Checks if the suite runner is assigned a file for XML output.
+ *
+ * @param sr suite runner to check
+ *
+ * @return 1 iff the suite runner currently is configured to output
+ *         in XML format; 0 otherwise
+ *
+ * @since 0.9.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_has_xml(SRunner * sr);
+
+/**
+ * Retrieves the name of the currently assigned file
+ * for XML output, if any exists.
+ *
+ * @return the name of the XML file, or NULL if none is configured
+ *
+ * @since 0.9.1
+ */
+CK_DLL_EXP const char *CK_EXPORT srunner_xml_fname(SRunner * sr);
 
-/* Does the SRunner have an XML log file? */
-int CK_EXPORT srunner_has_xml (SRunner *sr);
+/**
+ * Set the suite runner to output the result in TAP format to the
+ * given file.
+ *
+ * Note: TAP file setting is an initialize only operation -- it should
+ * be done immediately after SRunner creation, and the TAP file can't be
+ * changed after being set.
+ *
+ * This setting does not conflict with the other log output types;
+ * all logging types can occur concurrently if configured.
+ *
+ * @param sr suite runner to log results of in TAP format
+ * @param fname file name to output TAP results to
+ *
+ * @since 0.9.12
+*/
+CK_DLL_EXP void CK_EXPORT srunner_set_tap(SRunner * sr, const char *fname);
 
-/* Return the name of the XML file, or NULL if none */
-const char * CK_EXPORT srunner_xml_fname (SRunner *sr);
+/**
+ * Checks if the suite runner is assigned a file for TAP output.
+ *
+ * @param sr suite runner to check
+ *
+ * @return 1 iff the suite runner currently is configured to output
+ *         in TAP format; 0 otherwise
+ *
+ * @since 0.9.12
+ */
+CK_DLL_EXP int CK_EXPORT srunner_has_tap(SRunner * sr);
 
+/**
+ * Retrieves the name of the currently assigned file
+ * for TAP output, if any exists.
+ *
+ * @return the name of the TAP file, or NULL if none is configured
+ *
+ * @since 0.9.12
+ */
+CK_DLL_EXP const char *CK_EXPORT srunner_tap_fname(SRunner * sr);
 
-/* Control forking */
-enum fork_status {
-  CK_FORK_GETENV, /* look in the environment for CK_FORK */
-  CK_FORK,        /* call fork to run tests */
-  CK_NOFORK       /* don't call fork */
+/**
+ * Enum describing the current fork usage.
+ */
+enum fork_status
+{
+    CK_FORK_GETENV,             /**< look in the environment for CK_FORK */
+    CK_FORK,                    /**< call fork to run tests */
+    CK_NOFORK                   /**< don't call fork */
 };
-/* Get the current fork status */
-enum fork_status CK_EXPORT srunner_fork_status (SRunner *sr);
 
-/* Set the current fork status */
-void CK_EXPORT srunner_set_fork_status (SRunner *sr, enum fork_status fstat); 
-  
-/* Fork in a test and make sure messaging and tests work. */
-pid_t CK_EXPORT check_fork(void);
+/**
+ * Retrieve the current fork status for the given suite runner
+ *
+ * @param sr suite runner to check fork status of
+ *
+ * @since 0.8.0
+ */
+CK_DLL_EXP enum fork_status CK_EXPORT srunner_fork_status(SRunner * sr);
 
-/* Wait for the pid and exit. If pid is zero, just exit. */
-void CK_EXPORT check_waitpid_and_exit(pid_t pid);
+/**
+ * Set the fork status for a given suite runner.
+ *
+ * The default fork status is CK_FORK_GETENV, which will look
+ * for the CK_FORK environment variable, which can be set to
+ * "yes" or "no". If the environment variable is not present,
+ * CK_FORK will be used if fork() is available on the system,
+ * otherwise CK_NOFORK is used.
+ *
+ * If set to CK_FORK or CK_NOFORK, the environment variable
+ * if defined is ignored.
+ *
+ * If Check is compiled without support for fork(), attempting
+ * to set the status to CK_FORK is ignored.
+ *
+ * @param sr suite runner to assign the fork status to
+ * @param fstat fork status to assign
+ *
+ * @since 0.8.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_set_fork_status(SRunner * sr,
+                                                  enum fork_status fstat);
 
-#ifdef __cplusplus 
+/**
+ * Invoke fork() during a test and assign the child to the same
+ * process group that the rest of the test case uses.
+ *
+ * One can invoke fork() directly during a test; however doing so
+ * may not guarantee that any children processes are destroyed once
+ * the test finishes. Once a test has completed, all processes in
+ * the process group will be killed; using this wrapper will prevent
+ * orphan processes.
+ *
+ * If Check is compiled without fork() support this call simply
+ * return -1 and does nothing.
+ *
+ * @return On success, the PID of the child process is returned in
+ *          the parent, and 0 is returned in the child.  On failure,
+ *          a value of -1 is returned to the parent process and no
+ *          child process is created.
+ *
+ * @since 0.9.3
+ */
+CK_DLL_EXP pid_t CK_EXPORT check_fork(void);
+
+/**
+ * Wait for the pid and exit.
+ *
+ * This is to be used in conjunction with check_fork(). When called,
+ * will wait for the given process to terminate. If the process
+ * exited without error, exit(EXIT_SUCCESS) is invoked; otherwise
+ * exit(EXIT_FAILURE) is invoked.
+ *
+ * If Check is compiled without support for fork(), this invokes
+ * exit(EXIT_FAILURE).
+ *
+ * @param pid process to wait for, created by check_fork()
+ *
+ * @since 0.9.3
+ */
+CK_DLL_EXP void CK_EXPORT check_waitpid_and_exit(pid_t pid) CK_ATTRIBUTE_NORETURN;
+
+/**
+ * Set the maximal assertion message size.
+ *
+ * This protects the code against unintentional extremely large assertion messages
+ * (values of up to 4GB were seen in the wild).
+ * The usual size for a message is less than 80 bytes.
+ *
+ * If the environment variable CK_MAX_MSG_SIZE is defined to a positive value, it is used.
+ * Otherwise, if a positive maximal message size is set via this function, it is used.
+ * Otherwise, the maximal message size is one assigned at compile time (4K bytes).
+ *
+ * @param max_msg_size the maximal assertion message size.
+ *
+ * @since 0.12.0
+ */
+CK_DLL_EXP void CK_EXPORT check_set_max_msg_size(size_t max_msg_size);
+
+#ifdef __cplusplus
 CK_CPPEND
 #endif
 
index 231fdbb..712caef 100644 (file)
@@ -1,7 +1,7 @@
 /*-*- mode:C; -*- */
 /*
  * Check: a unit test framework for C
- * Copyright (C) 2001, 2002, Arien Malec
+ * Copyright (C) 2001, 2002 Arien Malec
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,8 +15,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_H
 
 #include <stddef.h>
 #include <string.h>
+#include <math.h>
+#include <float.h>
 
-/* Check: a unit test framework for C
-
-   Check is a unit test framework for C. It features a simple
-   interface for defining unit tests, putting little in the way of the
-   developer. Tests are run in a separate address space, so Check can
-   catch both assertion failures and code errors that cause
-   segmentation faults or other signals. The output from unit tests
-   can be used within source code editors and IDEs.
-
-   Unit tests are created with the START_TEST/END_TEST macro
-   pair. The fail_unless and fail macros are used for creating
-   checks within unit tests; the mark_point macro is useful for
-   trapping the location of signals and/or early exits.
-
-
-   Test cases are created with tcase_create, unit tests are added
-   with tcase_add_test
-
-
-   Suites are created with suite_create; test cases are added
-   with suite_add_tcase
-
-   Suites are run through an SRunner, which is created with
-   srunner_create. Additional suites can be added to an SRunner with
-   srunner_add_suite. An SRunner is freed with srunner_free, which also
-   frees all suites added to the runner. 
-
-   Use srunner_run_all to run a suite and print results.
+#include <check_stdint.h>
 
+/*
    Macros and functions starting with _ (underscore) are internal and
    may change without notice. You have been warned!.
-
 */
 
 
@@ -77,341 +52,2236 @@ CK_CPPSTART
 #if GCC_VERSION_AT_LEAST(2,95)
 #define CK_ATTRIBUTE_UNUSED __attribute__ ((unused))
 #else
-#define CK_ATTRIBUTE_UNUSED              
+#define CK_ATTRIBUTE_UNUSED
 #endif /* GCC 2.95 */
 
+#if GCC_VERSION_AT_LEAST(2,5)
+#define CK_ATTRIBUTE_NORETURN __attribute__ ((noreturn))
+#else
+#define CK_ATTRIBUTE_NORETURN
+#endif /* GCC 2.5 */
+
 #include <sys/types.h>
 
-/* Used to create the linker script for hiding lib-local symbols. Shall
-   be put directly in front of the exported symbol. */
+#if defined(_MSC_VER)
+/* define pid_t for Windows, as it is needed later */
+#define pid_t int
+#endif /* _MSC_VER */
+
+/*
+ * Used to create the linker script for hiding lib-local symbols. Shall
+ * be put directly in front of the exported symbol.
+ */
 #define CK_EXPORT
 
+/*
+ * Used for MSVC to create the export attribute
+ * CK_DLL_EXP is defined during the compilation of the library
+ * on the command line.
+ */
+#ifndef CK_DLL_EXP
+#define CK_DLL_EXP
+#endif
+
 /* check version numbers */
-  
+
 #define CHECK_MAJOR_VERSION (@CHECK_MAJOR_VERSION@)
 #define CHECK_MINOR_VERSION (@CHECK_MINOR_VERSION@)
 #define CHECK_MICRO_VERSION (@CHECK_MICRO_VERSION@)
 
-extern int CK_EXPORT check_major_version;
-extern int CK_EXPORT check_minor_version;
-extern int CK_EXPORT check_micro_version;
+CK_DLL_EXP extern int CK_EXPORT check_major_version;
+CK_DLL_EXP extern int CK_EXPORT check_minor_version;
+CK_DLL_EXP extern int CK_EXPORT check_micro_version;
 
 #ifndef NULL
 #define NULL ((void*)0)
 #endif
 
-/* opaque type for a test case
-
-   A TCase represents a test case.  Create with tcase_create, free
-   with tcase_free.  For the moment, test cases can only be run
-   through a suite
+/**
+ * Type for a test case
+ *
+ * A TCase represents a test case.  Create with tcase_create, free
+ * with tcase_free.  For the moment, test cases can only be run
+ * through a suite
 */
-typedef struct TCase TCase; 
+typedef struct TCase TCase;
 
-/* type for a test function */
+/**
+ * Type for a test function
+ */
 typedef void (*TFun) (int);
 
-/* type for a setup/teardown function */
+/**
+ * Type for a setup/teardown function
+ */
 typedef void (*SFun) (void);
-/* Opaque type for a test suite */
+
+/**
+ * Type for a test suite
+ */
 typedef struct Suite Suite;
-/* Creates a test suite with the given name */
-Suite * CK_EXPORT suite_create (const char *name);
 
-/* Add a test case to a suite */
-void CK_EXPORT suite_add_tcase (Suite *s, TCase *tc);
+/**
+ * Creates a test suite with the given name.
+ *
+ * Create a suite, which will contain test cases. Once
+ * created, use suite_add_tcase() to add test cases.
+ * When finished, create a suite runner from the
+ * suite using srunner_create()
+ *
+ * @param name name of the suite
+ *
+ * @return suite
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP Suite *CK_EXPORT suite_create(const char *name);
+
+/**
+ * Determines whether a given test suite contains a case named after a
+ * given string.
+ *
+ * @param s suite to check
+ * @param tcname test case to look for
+ *
+ * @return 1 iff the given test case is within the given suite;
+ *          0 otherwise
+ *
+ * @since 0.9.9
+ */
+CK_DLL_EXP int CK_EXPORT suite_tcase(Suite * s, const char *tcname);
+
+/**
+ * Add a test case to a suite.
+ *
+ * Note that if the TCase has already been added attempting
+ * to add it again will be ignored.
+ *
+ * @param s suite to add test case to
+ * @param tc test case to add to suite
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP void CK_EXPORT suite_add_tcase(Suite * s, TCase * tc);
 
-/* Create a test case */
-TCase * CK_EXPORT tcase_create (const char *name);
+/**
+ * Create a test case.
+ *
+ * Once created, tests can be added with the tcase_add_test()
+ * function, and the test case assigned to a suite with the
+ * suite_add_tcase() function.
+ *
+ * @param name name of the test case
+ *
+ * @return test case containing no tests
+ *
+ * @since 0.6.0
+ * */
+CK_DLL_EXP TCase *CK_EXPORT tcase_create(const char *name);
 
-/* Add a test function to a test case (macro version) */
+/**
+ * Associate a test case with certain tags.
+ * Replaces any existing tags with the new set.
+ *
+ * @param tc the test case
+ *
+ * @param tags string containing arbitrary tags separated by spaces.
+ *        This will be copied. Passing NULL clears all tags.
+ *
+ * @since 0.11.0
+ * */
+CK_DLL_EXP void CK_EXPORT tcase_set_tags(TCase * tc,
+                                        const char *tags);
+/**
+ * Add a test function to a test case
+ *
+ * @param tc test case to add test to
+ * @param tf test function to add to test case
+ *
+ * @since 0.6.0
+ * */
 #define tcase_add_test(tc,tf) tcase_add_test_raise_signal(tc,tf,0)
 
-/* Add a test function with signal handling to a test case (macro version) */
+/**
+ * Add a test function with signal handling to a test case
+ *
+ * The added test is expected to terminate by throwing the given signal
+ *
+ * @param tc test case to add test to
+ * @param tf test function to add to test case
+ * @param signal expected signal for test function to throw in order for
+ *                the test to be considered passing
+ *
+ * @since 0.9.2
+ * */
 #define tcase_add_test_raise_signal(tc,tf,signal) \
    _tcase_add_test((tc),(tf),"" # tf "",(signal), 0, 0, 1)
 
-/* Add a test function with an expected exit value to a test case (macro version) */
+/**
+ * Add a test function with an expected exit value to a test case
+ *
+ * The added test is expected to terminate by exiting with the given value
+ *
+ * @param tc test case to add test to
+ * @param tf test function to add to test case
+ * @param expected_exit_value exit value for test function to return in
+ *                             order for the test to be considered passing
+ *
+ * @since 0.9.7
+ */
 #define tcase_add_exit_test(tc, tf, expected_exit_value) \
   _tcase_add_test((tc),(tf),"" # tf "",0,(expected_exit_value),0,1)
 
-/* Add a looping test function to a test case (macro version)
-
-   The test will be called in a for(i = s; i < e; i++) loop with each
-   iteration being executed in a new context. The loop variable 'i' is
-   available in the test.
+/**
+ * Add a looping test function to a test case
+ *
+ * The test will be called in a for(i = s; i < e; i++) loop with each
+ * iteration being executed in a new context. The loop variable 'i' is
+ * available in the test.
+ *
+ * @param tc test case to add test to
+ * @param tf function to add to test case
+ * @param s starting index for value "i" in test
+ * @param e ending index for value "i" in test
+ *
+ * @since 0.9.4
  */
 #define tcase_add_loop_test(tc,tf,s,e) \
   _tcase_add_test((tc),(tf),"" # tf "",0,0,(s),(e))
-/* Signal version of loop test.  
-   FIXME: add a test case; this is untested as part of Check's tests.
+
+/**
+ * Add a looping test function with signal handling to a test case
+ *
+ * The test will be called in a for(i = s; i < e; i++) loop with each
+ * iteration being executed in a new context. The loop variable 'i' is
+ * available in the test.
+ *
+ * The added test is expected to terminate by throwing the given signal
+ *
+ * @param tc test case to add test to
+ * @param tf function to add to test case
+ * @param signal expected signal for test function to throw in order for
+ *                the test to be considered passing
+ * @param s starting index for value "i" in test
+ * @param e ending index for value "i" in test
+ *
+ * @since 0.9.5
  */
 #define tcase_add_loop_test_raise_signal(tc,tf,signal,s,e) \
   _tcase_add_test((tc),(tf),"" # tf "",(signal),0,(s),(e))
 
-/* allowed exit value version of loop test. */
+/**
+ * Add a looping test function with an expected exit value to a test case
+ *
+ * The test will be called in a for(i = s; i < e; i++) loop with each
+ * iteration being executed in a new context. The loop variable 'i' is
+ * available in the test.
+ *
+ * The added test is expected to terminate by exiting with the given value
+ *
+ * @param tc test case to add test to
+ * @param tf function to add to test case
+ * @param expected_exit_value exit value for test function to return in
+ *                             order for the test to be considered passing
+ * @param s starting index for value "i" in test
+ * @param e ending index for value "i" in test
+ *
+ * @since 0.9.7
+ */
 #define tcase_add_loop_exit_test(tc,tf,expected_exit_value,s,e) \
   _tcase_add_test((tc),(tf),"" # tf "",0,(expected_exit_value),(s),(e))
 
 /* Add a test function to a test case
   (function version -- use this when the macro won't work
 */
-void CK_EXPORT _tcase_add_test (TCase *tc, TFun tf, const char *fname, int _signal, int allowed_exit_value, int start, int end);
-
-/* Add unchecked fixture setup/teardown functions to a test case
+CK_DLL_EXP void CK_EXPORT _tcase_add_test(TCase * tc, TFun tf,
+                                          const char *fname, int _signal,
+                                          int allowed_exit_value, int start,
+                                          int end);
 
-   If unchecked fixture functions are run at the start and end of the
-   test case, and not before and after unit tests. Note that unchecked
-   setup/teardown functions are not run in a separate address space,
-   like test functions, and so must not exit or signal (e.g.,
-   segfault)
+/**
+ * Add unchecked fixture setup/teardown functions to a test case
+ *
+ * Unchecked fixture functions are run at the start and end of the
+ * test case, and not before and after unit tests. Further,
+ * unchecked fixture functions are not run in a separate address space,
+ * like test functions, and so must not exit or signal (e.g.,
+ * segfault).
+ *
+ * Also, when run in CK_NOFORK mode, unchecked fixture functions may
+ * lead to different unit test behavior if unit tests change data
+ * setup by the fixture functions.
+ *
+ * Note that if a setup function fails, the remaining setup functions
+ * will be omitted, as will the test case and the teardown functions.
+ * If a teardown function fails the remaining teardown functins will be
+ * omitted.
+ *
+ * @param tc test case to add unchecked fixture setup/teardown to
+ * @param setup function to add to be executed before the test case;
+ *               if NULL no setup function is added
+ * @param teardown function to add to be executed after the test case;
+ *               if NULL no teardown function is added
+ * @since 0.8.0
+ */
+CK_DLL_EXP void CK_EXPORT tcase_add_unchecked_fixture(TCase * tc, SFun setup,
+                                                      SFun teardown);
 
-   Also, when run in CK_NOFORK mode, unchecked fixture functions may
-   lead to different unit test behavior IF unit tests change data
-   setup by the fixture functions.
+/**
+ * Add checked fixture setup/teardown functions to a test case
+ *
+ * Checked fixture functions are run before and after each unit test inside
+ * of the address space of the test. Thus, if using CK_FORK
+ * mode the separate process running the unit test will survive signals
+ * or unexpected exits in the fixture function. Also, if the setup
+ * function is idempotent, unit test behavior will be the same in
+ * CK_FORK and CK_NOFORK modes.
+ *
+ * However, since fixture functions are run before and after each unit
+ * test, they should not be expensive code.
+ *
+ * Note that if a setup function fails, the remaining setup functions
+ * will be omitted, as will the test and the teardown functions. If a
+ * teardown function fails the remaining teardown functins will be
+ * omitted.
+ *
+ * @param tc test case to add checked fixture setup/teardown to
+ * @param setup function to add to be executed before each unit test in
+ *               the test case;  if NULL no setup function is added
+ * @param teardown function to add to be executed after each unit test in
+ *               the test case; if NULL no teardown function is added
+ *
+ * @since 0.8.0
 */
-void CK_EXPORT tcase_add_unchecked_fixture (TCase *tc, SFun setup, SFun teardown);
-
-/* Add fixture setup/teardown functions to a test case
-
-   Checked fixture functions are run before and after unit
-   tests. Unlike unchecked fixture functions, checked fixture
-   functions are run in the same separate address space as the test
-   program, and thus the test function will survive signals or
-   unexpected exits in the fixture function. Also, IF the setup
-   function is idempotent, unit test behavior will be the same in
-   CK_FORK and CK_NOFORK modes.
+CK_DLL_EXP void CK_EXPORT tcase_add_checked_fixture(TCase * tc, SFun setup,
+                                                    SFun teardown);
 
-   However, since fixture functions are run before and after each unit
-   test, they should not be expensive code.
-
-*/ 
-void CK_EXPORT tcase_add_checked_fixture (TCase *tc, SFun setup, SFun teardown);
+/**
+ * Set the timeout for all tests in a test case.
+ *
+ * A test that lasts longer than the timeout (in seconds) will be killed
+ * and thus fail with an error.
+ *
+ * If not set, the default timeout is one assigned at compile time. If
+ * the environment variable CK_DEFAULT_TIMEOUT is defined and no timeout
+ * is set, the value in the environment variable is used.
+ *
+ * If Check is compile without fork() support this call is ignored,
+ * as timeouts are not possible.
+ *
+ * @param tc test case to assign timeout to
+ * @param timeout to use, in seconds. If the value contains a decimal
+ *                 portion, but no high resolution timer is available,
+ *                 the value is rounded up to the nearest second.
+ *
+ * @since 0.9.2
+ */
+CK_DLL_EXP void CK_EXPORT tcase_set_timeout(TCase * tc, double timeout);
 
-/* Set the timeout for all tests in a test case. A test that lasts longer
-   than the timeout (in seconds) will be killed and thus fail with an error.
-   The timeout can also be set globaly with the environment variable
-   CK_DEFAULT_TIMEOUT, the specific setting always takes precedence.
-*/
-void CK_EXPORT tcase_set_timeout (TCase *tc, int timeout);
 /* Internal function to mark the start of a test function */
-void CK_EXPORT tcase_fn_start (const char *fname, const char *file, int line);
+CK_DLL_EXP void CK_EXPORT tcase_fn_start(const char *fname, const char *file,
+                                         int line);
+
+/**
+ * Retreive the name of the current running test. This is the name
+ * of the test passed to START_TEST. This is only valid when called
+ * from a running test. The value return outside of a running test is
+ * undefined.
+ *
+ * @since 0.11.0
+ */
+CK_DLL_EXP const char* CK_EXPORT tcase_name(void);
 
-/* Start a unit test with START_TEST(unit_name), end with END_TEST
-   One must use braces within a START_/END_ pair to declare new variables
-*/ 
+/**
+ * Start a unit test with START_TEST(unit_name), end with END_TEST.
+ *
+ * One must use braces within a START_/END_ pair to declare new variables
+ *
+ * @since 0.6.0
+ */
 #define START_TEST(__testname)\
 static void __testname (int _i CK_ATTRIBUTE_UNUSED)\
 {\
   tcase_fn_start (""# __testname, __FILE__, __LINE__);
 
-/* End a unit test */
+/**
+ *  End a unit test
+ *
+ * @since 0.6.0
+ */
 #define END_TEST }
 
-/* Fail the test case unless expr is true */
-/* The space before the comma sign before ## is essential to be compatible
-   with gcc 2.95.3 and earlier.
-*/
-#define fail_unless(expr, ...)\
-        _fail_unless(expr, __FILE__, __LINE__,\
-        "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
-
-/* Fail the test case if expr is true */
-/* The space before the comma sign before ## is essential to be compatible
-   with gcc 2.95.3 and earlier.
-*/
+/*
+ * Fail the test case unless expr is false
+ *
+ * This call is deprecated.
+ */
+#define fail_unless ck_assert_msg
 
-/* FIXME: these macros may conflict with C89 if expr is 
-   FIXME:   strcmp (str1, str2) due to excessive string length. */
+/*
+ * Fail the test case if expr is false
+ *
+ * This call is deprecated.
+ *
+ * NOTE: The space before the comma sign before ## is essential to be compatible
+ * with gcc 2.95.3 and earlier.
+ * FIXME: these macros may conflict with C89 if expr is
+ * FIXME:   strcmp (str1, str2) due to excessive string length.
+ */
 #define fail_if(expr, ...)\
-        _fail_unless(!(expr), __FILE__, __LINE__,\
-        "Failure '"#expr"' occured" , ## __VA_ARGS__, NULL)
-
-/* Always fail */
-#define fail(...) _fail_unless(0, __FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
-
-/* Non macro version of #fail_unless, with more complicated interface */
-void CK_EXPORT _fail_unless (int result, const char *file,
-                             int line, const char *expr, ...);
-
-/* New check fail API. */
-#define ck_abort() ck_abort_msg(NULL)
-#define ck_abort_msg fail
-#define ck_assert(C) ck_assert_msg(C, NULL)
-#define ck_assert_msg fail_unless
-
-/* Integer comparsion macros with improved output compared to fail_unless(). */
-/* O may be any comparion operator. */
-#define _ck_assert_int(X, O, Y) ck_assert_msg((X) O (Y), "Assertion '"#X#O#Y"' failed: "#X"==%d, "#Y"==%d", X, Y) 
-#define ck_assert_int_eq(X, Y) _ck_assert_int(X, ==, Y) 
-#define ck_assert_int_ne(X, Y) _ck_assert_int(X, !=, Y) 
-
-/* String comparsion macros with improved output compared to fail_unless() */
-#define _ck_assert_str(C, X, O, Y) ck_assert_msg(C, "Assertion '"#X#O#Y"' failed: "#X"==\"%s\", "#Y"==\"%s\"", X, Y) 
-#define ck_assert_str_eq(X, Y) _ck_assert_str(!strcmp(X, Y), X, ==, Y)
-#define ck_assert_str_ne(X, Y) _ck_assert_str(strcmp(X, Y), X, !=, Y)
-
+  (expr) ? \
+     _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__, NULL) \
+     : _mark_point(__FILE__, __LINE__)
 
-/* Mark the last point reached in a unit test
-   (useful for tracking down where a segfault, etc. occurs)
-*/
-#define mark_point() _mark_point(__FILE__,__LINE__)
-
-/* Non macro version of #mark_point */
-void CK_EXPORT _mark_point (const char *file, int line);
-
-/* Result of a test */
-enum test_result {
-  CK_TEST_RESULT_INVALID, /* Default value; should not encounter this */
-  CK_PASS, /* Test passed*/
-  CK_FAILURE, /* Test completed but failed */
-  CK_ERROR /* Test failed to complete
-             (unexpected signal or non-zero early exit) */ 
-};
+/*
+ * Fail the test
+ *
+ * This call is deprecated.
+ */
+#define fail ck_abort_msg
 
-/* Specifies the how much output an SRunner should produce */
-enum print_output {
-  CK_SILENT, /* No output */
-  CK_MINIMAL, /* Only summary output */
-  CK_NORMAL, /* All failed tests */
-  CK_VERBOSE, /* All tests */
-  CK_ENV, /* Look at environment var */
-#if @ENABLE_SUBUNIT@
-  CK_SUBUNIT, /* Run as a subunit child process */
+/*
+ * This is called whenever an assertion fails.
+ * Note that it only has the noreturn modifier when
+ * using fork. If fork is unavailable, the function
+ * calls longjmp() when a test assertion fails. Marking
+ * the function as noreturn causes gcc to make assumptions
+ * which are not valid, as longjmp() is like a return.
+ */
+#if @HAVE_FORK@
+CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
+                                            const char *expr,
+                                            ...) CK_ATTRIBUTE_NORETURN;
+#else
+CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
+                                            const char *expr, ...);
 #endif
-  CK_LAST
-};
-
-/* Holds state for a running of a test suite */
-typedef struct SRunner SRunner;
-
-/* Opaque type for a test failure */
-typedef struct TestResult TestResult;
 
-/* accessors for tr fields */
-enum ck_result_ctx {
-  CK_CTX_INVALID, /* Default value; should not encounter this */
-  CK_CTX_SETUP,
-  CK_CTX_TEST,
-  CK_CTX_TEARDOWN
-};
+/**
+ * Fail the test if expression is false
+ *
+ * @param expr expression to evaluate
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert(expr) ck_assert_msg(expr, NULL)
 
-/* Type of result */
-int CK_EXPORT tr_rtype (TestResult *tr);
-/* Context in which the result occurred */ 
-enum ck_result_ctx CK_EXPORT tr_ctx (TestResult *tr); 
-/* Failure message */
-const char * CK_EXPORT tr_msg (TestResult *tr);
-/* Line number at which failure occured */
-int CK_EXPORT tr_lno (TestResult *tr);
-/* File name at which failure occured */
-const char * CK_EXPORT tr_lfile (TestResult *tr);
-/* Test case in which unit test was run */
-const char * CK_EXPORT tr_tcname (TestResult *tr);
-
-/* Creates an SRunner for the given suite */
-SRunner * CK_EXPORT srunner_create (Suite *s);
-
-/* Adds a Suite to an SRunner */
-void CK_EXPORT srunner_add_suite (SRunner *sr, Suite *s);
-
-/* Frees an SRunner, all suites added to it and all contained test cases */
-void CK_EXPORT srunner_free (SRunner *sr);
-
-/* Test running */
-
-/* Runs an SRunner, printing results as specified (see enum print_output) */
-void CK_EXPORT srunner_run_all (SRunner *sr, enum print_output print_mode);
-
-/* Next functions are valid only after the suite has been
-   completely run, of course */
-
-/* Number of failed tests in a run suite. Includes failures + errors */
-int CK_EXPORT srunner_ntests_failed (SRunner *sr);
-
-/* Total number of tests run in a run suite */
-int CK_EXPORT srunner_ntests_run (SRunner *sr);
-
-/* Return an array of results for all failures
-  
-   Number of failures is equal to srunner_nfailed_tests.  Memory for
-   the array is malloc'ed and must be freed, but individual TestResults
-   must not
+/* The space before the comma sign before ## is essential to be compatible
+   with gcc 2.95.3 and earlier.
 */
-TestResult ** CK_EXPORT srunner_failures (SRunner *sr);
+/**
+ * Fail the test if the expression is false; print message on failure
+ *
+ * @param expr expression to evaluate
+ * @param ... message to print (in printf format) if expression is false
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_msg(expr, ...) \
+  (expr) ? \
+     _mark_point(__FILE__, __LINE__) : \
+     _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
 
-/* Return an array of results for all run tests
+/**
+ * Unconditionally fail the test
+ *
+ * @note Once called, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_abort() ck_abort_msg(NULL)
+/**
+ * Unconditionally fail the test; print a message
+ *
+ * @param ... message to print (in printf format)
+ *
+ * @note Once called, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
+
+/* Signed and unsigned integer comparison macros with improved output compared to ck_assert(). */
+/* OP may be any comparison operator. */
+#define _ck_assert_int(X, OP, Y) do { \
+  intmax_t _ck_x = (X); \
+  intmax_t _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %jd, %s == %jd", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
+} while (0)
+
+/**
+ * Check two signed integers to determine if X==Y
+ *
+ * If not X==Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_int_eq(X, Y) _ck_assert_int(X, ==, Y)
+/**
+ * Check two signed integers to determine if X!=Y
+ *
+ * If not X!=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_int_ne(X, Y) _ck_assert_int(X, !=, Y)
+/**
+ * Check two signed integers to determine if X<Y
+ *
+ * If not X<Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_lt(X, Y) _ck_assert_int(X, <, Y)
+/**
+ * Check two signed integers to determine if X<=Y
+ *
+ * If not X<=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_le(X, Y) _ck_assert_int(X, <=, Y)
+/**
+ * Check two signed integers to determine if X>Y
+ *
+ * If not X>Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_gt(X, Y) _ck_assert_int(X, >, Y)
+/**
+ * Check two signed integers to determine if X>=Y
+ *
+ * If not X>=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_int_ge(X, Y) _ck_assert_int(X, >=, Y)
+
+#define _ck_assert_uint(X, OP, Y) do { \
+  uintmax_t _ck_x = (X); \
+  uintmax_t _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %ju, %s == %ju", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
+} while (0)
+/**
+ * Check two unsigned integers to determine if X==Y
+ *
+ * If not X==Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_eq(X, Y) _ck_assert_uint(X, ==, Y)
+/**
+ * Check two unsigned integers to determine if X!=Y
+ *
+ * If not X!=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_ne(X, Y) _ck_assert_uint(X, !=, Y)
+/**
+ * Check two unsigned integers to determine if X<Y
+ *
+ * If not X<Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_lt(X, Y) _ck_assert_uint(X, <, Y)
+/**
+ * Check two unsigned integers to determine if X<=Y
+ *
+ * If not X<=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_le(X, Y) _ck_assert_uint(X, <=, Y)
+/**
+ * Check two unsigned integers to determine if X>Y
+ *
+ * If not X>Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_gt(X, Y) _ck_assert_uint(X, >, Y)
+/**
+ * Check two unsigned integers to determine if X>=Y
+ *
+ * If not X>=Y, the test fails.
+ *
+ * @param X signed integer
+ * @param Y signed integer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_uint_ge(X, Y) _ck_assert_uint(X, >=, Y)
+
+/* Number of digits after the decimal point to output via printf */
+#ifndef CK_FLOATING_DIG
+# define CK_FLOATING_DIG 6
+#endif /* CK_FLOATING_DIG */
+
+/* Floating point number comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP may be any comparison operator, TP is type, TM is type modifier. */
+#define _ck_assert_floating(X, OP, Y, TP, TM) do { \
+  TP _ck_x = (X); \
+  TP _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, \
+  "Assertion '%s' failed: %s == %.*" TM "g, %s == %.*" TM "g", \
+  #X" "#OP" "#Y, \
+  #X, (int)CK_FLOATING_DIG, _ck_x, \
+  #Y, (int)CK_FLOATING_DIG, _ck_y); \
+} while (0)
+
+/* Check floating point number is finise. */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_finite(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(isfinite(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is finite", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Check floating point number is infinise. */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_infinite(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(isinf(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is infinite", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Check floating point number is "Not a Number". */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_nan(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(isnan(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is NaN", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Check floating point number is not "Not a Number". */
+/* TP is type, TM is type modifier. */
+#define _ck_assert_floating_nonnan(X, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  ck_assert_msg(!isnan(_ck_x), \
+    "Assertion '%s' failed: %s == %.*" TM "g", \
+    #X" is not NaN", \
+    #X, (int)CK_FLOATING_DIG, _ck_x); \
+} while (0)
+
+/* Floating point tolerance comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP, D can have values: >, -1; <, 1. */
+#define _ck_assert_floating_op_tol(X, OP, Y, T, D, TP, TM) do { \
+  TP _ck_x = (X); \
+  TP _ck_y = (Y); \
+  TP _ck_t = (T); \
+  ck_assert_msg((_ck_x - _ck_y) OP _ck_t * (D), \
+  "Assertion '%s' failed: %s == %.*" TM "g, %s == %.*" TM "g, %s == %.*" TM "g", \
+  #X" "#OP"= "#Y", error < "#T, \
+  #X, (int)CK_FLOATING_DIG, _ck_x, \
+  #Y, (int)CK_FLOATING_DIG, _ck_y, \
+  #T, (int)CK_FLOATING_DIG, _ck_t); \
+} while (0)
+
+/* Floating point tolerance comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP can have values: <; >=. */
+#define _ck_assert_floating_absdiff_op_tol(X, Y, OP, T, TP, TM) \
+do { \
+  TP _ck_x = (X); \
+  TP _ck_y = (Y); \
+  TP _ck_t = (T); \
+  ck_assert_msg(fabsl(_ck_y - _ck_x) OP _ck_t, \
+    "Assertion '%s' failed: %s == %.*" TM "g, %s == %.*" TM "g, %s == %.*" TM "g", \
+    "fabsl("#Y" - "#X") "#OP" "#T, \
+    #X, (int)CK_FLOATING_DIG, _ck_x, \
+    #Y, (int)CK_FLOATING_DIG, _ck_y, \
+    #T, (int)CK_FLOATING_DIG, _ck_t); \
+} while (0)
+
+/**
+ * Check two single precision floating point numbers to determine if X == Y
+ *
+ * If not X == Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_eq(X, Y) _ck_assert_floating(X, ==, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X != Y
+ *
+ * If not X != Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ne(X, Y) _ck_assert_floating(X, !=, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X < Y
+ *
+ * If not X < Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_lt(X, Y) _ck_assert_floating(X, <, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X <= Y
+ *
+ * If not X <= Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_le(X, Y) _ck_assert_floating(X, <=, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X > Y
+ *
+ * If not X > Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_gt(X, Y) _ck_assert_floating(X, >, Y, float, "")
+/**
+ * Check two single precision floating point numbers to determine if X >= Y
+ *
+ * If not X >= Y, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ge(X, Y) _ck_assert_floating(X, >=, Y, float, "")
 
-   Number of results is equal to srunner_ntests_run, and excludes
-   failures due to setup function failure.
+/**
+ * Check two single precision floating point numbers to determine if X≈Y
+ * with specified tolerance
+ *
+ * If not X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_eq_tol(X, Y, T)  _ck_assert_floating_absdiff_op_tol(X, Y, <, T, float, "")
 
-   Memory is malloc'ed and must be freed, but individual TestResults
-   must not
-*/  
-TestResult ** CK_EXPORT srunner_results (SRunner *sr);
+/**
+ * Check two single precision floating point numbers to determine if not X≈Y
+ * with specified tolerance
+ *
+ * If X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ne_tol(X, Y, T) _ck_assert_floating_absdiff_op_tol(X, Y, >=, T, float, "")
 
-/* Printing */
+/**
+ * Check two single precision floating point numbers to determine if X>≈Y
+ * with specified tolerance
+ *
+ * If not X >≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_ge_tol(X, Y, T) _ck_assert_floating_op_tol(X, >, Y, T, -1, float, "")
+
+/**
+ * Check two single precision floating point numbers to determine if X<≈Y
+ * with specified tolerance
+ *
+ * If not X <≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (float)
+ * @param Y floating point number (float) to compare against X
+ * @param T tolerance (float)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_le_tol(X, Y, T) _ck_assert_floating_op_tol(X, <, Y, T, 1, float, "")
+
+/**
+ * Check that a single precision floating point number is finite; i.e. is
+ * not +infinity, -infinity, or "Not a Number" (NaN)
+ *
+ * If X is +INFINITY or X is -INFINITY, or X is NaN, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_finite(X) _ck_assert_floating_finite(X, float, "")
+
+/**
+ * Check that a single precision floating point number is infinite,
+ * either +infinity or -infinity
+ *
+ * If X is not +INFINITY and X is not -INFINITY, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_infinite(X) _ck_assert_floating_infinite(X, float, "")
+
+/**
+ * Check that a single precision floating point number
+ * is "Not a Number" (NaN)
+ *  
+ * If X is not NaN, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_nan(X) _ck_assert_floating_nan(X, float, "")
+
+/**
+ * Check that a single precision floating point number is
+ * not "Not a Number" (NaN)
+ *
+ * If X is NaN, the test fails.
+ *
+ * @param X floating point number (float) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_float_nonnan(X) _ck_assert_floating_nonnan(X, float, "")
 
-/* Print the results contained in an SRunner */
-void CK_EXPORT srunner_print (SRunner *sr, enum print_output print_mode);
-  
-  
-/* Set a log file to which to write during test running.
+/**
+ * Check two double precision floating point numbers to determine if X == Y
+ *
+ * If not X == Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_eq(X, Y) _ck_assert_floating(X, ==, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X != Y
+ *
+ * If not X != Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ne(X, Y) _ck_assert_floating(X, !=, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X < Y
+ *
+ * If not X < Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_lt(X, Y) _ck_assert_floating(X, <, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X <= Y
+ *
+ * If not X <= Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_le(X, Y) _ck_assert_floating(X, <=, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X > Y
+ *
+ * If not X > Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_gt(X, Y) _ck_assert_floating(X, >, Y, double, "")
+/**
+ * Check two double precision floating point numbers to determine if X >= Y
+ *
+ * If not X >= Y, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ge(X, Y) _ck_assert_floating(X, >=, Y, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if X≈Y
+ * with specified tolerance
+ *
+ * If not X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_eq_tol(X, Y, T)  _ck_assert_floating_absdiff_op_tol(X, Y, <, T, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if not X≈Y
+ * with specified tolerance
+ *
+ * If X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ne_tol(X, Y, T) _ck_assert_floating_absdiff_op_tol(X, Y, >=, T, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if X>≈Y
+ * with specified tolerance
+ *
+ * If not X >≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_ge_tol(X, Y, T) _ck_assert_floating_op_tol(X, >, Y, T, -1, double, "")
+
+/**
+ * Check two double precision floating point numbers to determine if X<≈Y
+ * with specified tolerance
+ *
+ * If not X <≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (double)
+ * @param Y floating point number (double) to compare against X
+ * @param T tolerance (double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_le_tol(X, Y, T) _ck_assert_floating_op_tol(X, <, Y, T, 1, double, "")
+
+/**
+ * Check that a double precision floating point number is finite; i.e. is
+ * not +infinity, -infinity, or "Not a Number" (NaN)
+ *
+ * If X is +INFINITY or X is -INFINITY, or X is NaN, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_finite(X) _ck_assert_floating_finite(X, double, "")
+
+/**
+ * Check that a double precision floating point number is infinite,
+ * either +infinity or -infinity
+ *
+ * If X is not +INFINITY and X is not -INFINITY, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_infinite(X) _ck_assert_floating_infinite(X, double, "")
+
+/**
+ * Check that a double precision floating point number
+ * is "Not a Number" (NaN)
+ *  
+ * If X is not NaN, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_nan(X) _ck_assert_floating_nan(X, double, "")
+
+/**
+ * Check that a double precision floating point number is
+ * not "Not a Number" (NaN)
+ *
+ * If X is NaN, the test fails.
+ *
+ * @param X floating point number (double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_double_nonnan(X) _ck_assert_floating_nonnan(X, double, "")
+
+/** 
+ * Check two double precision floating point numbers to determine if X == Y
+ *
+ * If not X == Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_eq(X, Y) _ck_assert_floating(X, ==, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X != Y
+ *
+ * If not X != Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ne(X, Y) _ck_assert_floating(X, !=, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X < Y
+ *
+ * If not X < Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_lt(X, Y) _ck_assert_floating(X, <, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X <= Y
+ *
+ * If not X <= Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_le(X, Y) _ck_assert_floating(X, <=, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X > Y
+ *
+ * If not X > Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_gt(X, Y) _ck_assert_floating(X, >, Y, long double, "L")
+/**
+ * Check two double precision floating point numbers to determine if X >= Y
+ *
+ * If not X >= Y, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ge(X, Y) _ck_assert_floating(X, >=, Y, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if X≈Y
+ * with specified tolerance
+ *
+ * If not X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_eq_tol(X, Y, T)  _ck_assert_floating_absdiff_op_tol(X, Y, <, T, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if not X≈Y
+ * with specified tolerance
+ *
+ * If X â‰ˆ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ne_tol(X, Y, T) _ck_assert_floating_absdiff_op_tol(X, Y, >=, T, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if X>≈Y
+ * with specified tolerance
+ *
+ * If not X >≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_ge_tol(X, Y, T) _ck_assert_floating_op_tol(X, >, Y, T, -1, long double, "L")
+
+/**
+ * Check two double precision floating point numbers to determine if X<≈Y
+ * with specified tolerance
+ *
+ * If not X <≈ Y with error < T, the test fails.
+ *
+ * @param X floating point number (long double)
+ * @param Y floating point number (long double) to compare against X
+ * @param T tolerance (long double)
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_le_tol(X, Y, T) _ck_assert_floating_op_tol(X, <, Y, T, 1, long double, "L")
+
+/**
+ * Check that a double precision floating point number is finite; i.e. is
+ * not +infinity, -infinity, or "Not a Number" (NaN)
+ *
+ * If X is +INFINITY or X is -INFINITY, or X is NaN, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_finite(X) _ck_assert_floating_finite(X, long double, "L")
+
+/**
+ * Check that a double precision floating point number is infinite,
+ * either +infinity or -infinity
+ *
+ * If X is not +INFINITY and X is not -INFINITY, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_infinite(X) _ck_assert_floating_infinite(X, long double, "L")
+
+/**
+ * Check that a double precision floating point number
+ * is "Not a Number" (NaN)
+ *  
+ * If X is not NaN, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_nan(X) _ck_assert_floating_nan(X, long double, "L")
+
+/**
+ * Check that a double precision floating point number is
+ * not "Not a Number" (NaN)
+ *
+ * If X is NaN, the test fails.
+ *
+ * @param X floating point number (long double) to be checked
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ldouble_nonnan(X) _ck_assert_floating_nonnan(X, long double, "L")
+
+/* String comparison macros with improved output compared to ck_assert() */
+/* OP might be any operator that can be used in '0 OP strcmp(X,Y)' comparison. */
+/* String pointer could be compared againts NULL with == (NULLEQ = 1) and != (NULLNE = 1) operators. */
+/* The x and y parameter swap in strcmp() is needed to handle >, >=, <, <= operators. */
+/* If the x or y parameter is NULL its value will be printed without quotes. */
+#define _ck_assert_str(X, OP, Y, NULLEQ, NULLNE) do { \
+  const char* _ck_x = (X); \
+  const char* _ck_y = (Y); \
+  const char* _ck_x_s; \
+  const char* _ck_y_s; \
+  const char* _ck_x_q; \
+  const char* _ck_y_q; \
+  if (_ck_x != NULL) { \
+    _ck_x_q = "\""; \
+    _ck_x_s = _ck_x; \
+  } else { \
+    _ck_x_q = ""; \
+    _ck_x_s = "(null)"; \
+  } \
+  if (_ck_y != NULL) { \
+    _ck_y_q = "\""; \
+    _ck_y_s = _ck_y; \
+  } else { \
+    _ck_y_q = ""; \
+    _ck_y_s = "(null)"; \
+  } \
+  ck_assert_msg( \
+    (NULLEQ && (_ck_x == NULL) && (_ck_y == NULL)) || \
+    (NULLNE && ((_ck_x == NULL) || (_ck_y == NULL)) && (_ck_x != _ck_y)) || \
+    ((_ck_x != NULL) && (_ck_y != NULL) && (0 OP strcmp(_ck_y, _ck_x))), \
+    "Assertion '%s' failed: %s == %s%s%s, %s == %s%s%s", \
+    #X" "#OP" "#Y, \
+    #X, _ck_x_q, _ck_x_s, _ck_x_q, \
+    #Y, _ck_y_q, _ck_y_s, _ck_y_q); \
+} while (0)
+
+/**
+ * Check two strings to determine if 0==strcmp(X,Y)
+ *
+ * If X or Y is NULL the test failes.
+ * If (0==strcmp(X,Y)), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_str_eq(X, Y) _ck_assert_str(X, ==, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0!=strcmp(X,Y)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0!=strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.6
+ */
+#define ck_assert_str_ne(X, Y) _ck_assert_str(X, !=, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0<strcmp(X,Y), (e.g. strcmp(X,Y)>0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0<strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_lt(X, Y) _ck_assert_str(X, <, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0<=strcmp(X,Y) (e.g. strcmp(X,Y)>=0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0<=strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_le(X, Y) _ck_assert_str(X, <=, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0<strcmp(X,Y) (e.g. strcmp(X,Y)>0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0<strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_gt(X, Y) _ck_assert_str(X, >, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0>=strcmp(X,Y) (e.g. strcmp(X,Y)<=0)
+ *
+ * If X or Y is NULL the test fails.
+ * If not 0>=strcmp(X,Y), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_str_ge(X, Y) _ck_assert_str(X, >=, Y, 0, 0)
+
+/**
+ * Check two strings to determine if 0==strcmp(X,Y) or if both are undefined 
+ *
+ * If both X and Y are NULL the test passes. However, if only one is NULL
+ * the test fails.
+ * If not ((X==NULL)&&(Y==NULL)) || (0==strcmp(X,Y)), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_pstr_eq(X, Y) _ck_assert_str(X, ==, Y, 1, 0)
+
+/**
+ * Check two strings to determine if 0!=strcmp(X,Y) or one of them is undefined
+ *
+ * If either X or Y is NULL the test passes, however if both are NULL
+ * the test fails.
+ * If not (X!=NULL)&&(Y!=NULL)&&(0!=strcmp(X,Y)), the test fails.
+ *
+ * @param X string
+ * @param Y string to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_pstr_ne(X, Y) _ck_assert_str(X, !=, Y, 0, 1)
+
+/* Memory location comparison macros with improved output compared to ck_assert() */
+/* OP might be any operator that can be used in '0 OP memcmp(X,Y,L)' comparison */
+/* The x and y parameter swap in memcmp() is needed to handle >, >=, <, <= operators */
+/* Output is limited to CK_MAX_ASSERT_MEM_PRINT_SIZE bytes */
+#ifndef CK_MAX_ASSERT_MEM_PRINT_SIZE
+#define CK_MAX_ASSERT_MEM_PRINT_SIZE 64
+#endif
 
-  Log file setting is an initialize only operation -- it should be
-  done immediatly after SRunner creation, and the log file can't be
-  changed after being set.
+/* Memory location comparison macros with improved output compared to ck_assert() */
+/* OP might be any operator that can be used in '0 OP memcmp(X,Y,L)' comparison */
+/* The x and y parameter swap in memcmp() is needed to handle >, >=, <, <= operators */
+/* Output is limited to CK_MAX_ASSERT_MEM_PRINT_SIZE bytes */
+#ifndef CK_MAX_ASSERT_MEM_PRINT_SIZE
+#define CK_MAX_ASSERT_MEM_PRINT_SIZE 64
+#endif
+
+#define _ck_assert_mem(X, OP, Y, L) do { \
+  const uint8_t* _ck_x = (const uint8_t*)(X); \
+  const uint8_t* _ck_y = (const uint8_t*)(Y); \
+  size_t _ck_l = (L); \
+  char _ck_x_str[CK_MAX_ASSERT_MEM_PRINT_SIZE * 2 + 1]; \
+  char _ck_y_str[CK_MAX_ASSERT_MEM_PRINT_SIZE * 2 + 1]; \
+  static const char _ck_hexdigits[] = "0123456789abcdef"; \
+  size_t _ck_i; \
+  size_t _ck_maxl = (_ck_l > CK_MAX_ASSERT_MEM_PRINT_SIZE) ? CK_MAX_ASSERT_MEM_PRINT_SIZE : _ck_l; \
+  for (_ck_i = 0; _ck_i < _ck_maxl; _ck_i++) { \
+    _ck_x_str[_ck_i * 2  ]   = _ck_hexdigits[(_ck_x[_ck_i] >> 4) & 0xF]; \
+    _ck_y_str[_ck_i * 2  ]   = _ck_hexdigits[(_ck_y[_ck_i] >> 4) & 0xF]; \
+    _ck_x_str[_ck_i * 2 + 1] = _ck_hexdigits[_ck_x[_ck_i] & 0xF]; \
+    _ck_y_str[_ck_i * 2 + 1] = _ck_hexdigits[_ck_y[_ck_i] & 0xF]; \
+  } \
+  _ck_x_str[_ck_i * 2] = 0; \
+  _ck_y_str[_ck_i * 2] = 0; \
+  if (_ck_maxl != _ck_l) { \
+    _ck_x_str[_ck_i * 2 - 2] = '.'; \
+    _ck_y_str[_ck_i * 2 - 2] = '.'; \
+    _ck_x_str[_ck_i * 2 - 1] = '.'; \
+    _ck_y_str[_ck_i * 2 - 1] = '.'; \
+  } \
+  ck_assert_msg(0 OP memcmp(_ck_y, _ck_x, _ck_l), \
+    "Assertion '%s' failed: %s == \"%s\", %s == \"%s\"", #X" "#OP" "#Y, #X, _ck_x_str, #Y, _ck_y_str); \
+} while (0)
+/**
+ * Check two memory locations to determine if 0==memcmp(X,Y,L)
+ *
+ * If not 0==memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_eq(X, Y, L) _ck_assert_mem(X, ==, Y, L)
+/**
+ * Check two memory locations to determine if 0!=memcmp(X,Y,L)
+ *
+ * If not 0!=memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_ne(X, Y, L) _ck_assert_mem(X, !=, Y, L)
+/**
+ * Check two memory locations to determine if 0<memcmp(X,Y,L), (e.g. memcmp(X,Y,L)>0)
+ *
+ * If not 0<memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_lt(X, Y, L) _ck_assert_mem(X, <, Y, L)
+/**
+ * Check two memory locations to determine if 0<=memcmp(X,Y,L) (e.g. memcmp(X,Y,L)>=0)
+ *
+ * If not 0<=memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_le(X, Y, L) _ck_assert_mem(X, <=, Y, L)
+/**
+ * Check two memory locations to determine if 0<memcmp(X,Y,L) (e.g. memcmp(X,Y,L)>0)
+ *
+ * If not 0<memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_gt(X, Y, L) _ck_assert_mem(X, >, Y, L)
+/**
+ * Check two memory locations to determine if 0>=memcmp(X,Y,L) (e.g. memcmp(X,Y,L)<=0)
+ *
+ * If not 0>=memcmp(X,Y,L), the test fails.
+ *
+ * @param X memory location
+ * @param Y memory location to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_mem_ge(X, Y, L) _ck_assert_mem(X, >=, Y, L)
+
+/* Pointer comparison macros with improved output compared to ck_assert(). */
+/* OP may only be == or !=  */
+#define _ck_assert_ptr(X, OP, Y) do { \
+  const void* _ck_x = (X); \
+  const void* _ck_y = (Y); \
+  ck_assert_msg(_ck_x OP _ck_y, "Assertion '%s' failed: %s == %#x, %s == %#x", #X" "#OP" "#Y, #X, _ck_x, #Y, _ck_y); \
+} while (0)
+
+/* Pointer against NULL comparison macros with improved output
+ * compared to ck_assert(). */
+/* OP may only be == or !=  */
+#define _ck_assert_ptr_null(X, OP) do { \
+  const void* _ck_x = (X); \
+  ck_assert_msg(_ck_x OP NULL, \
+  "Assertion '%s' failed: %s == %#x", \
+  #X" "#OP" NULL", \
+  #X, _ck_x); \
+} while (0)
+
+/**
+ * Check if two pointers are equal.
+ *
+ * If the two passed pointers are not equal, the test
+ * fails.
+ *
+ * @param X pointer
+ * @param Y pointer to compare against X
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_ptr_eq(X, Y) _ck_assert_ptr(X, ==, Y)
+
+/**
+ * Check if two pointers are not.
+ *
+ * If the two passed pointers are equal, the test fails.
+ *
+ * @param X pointer
+ * @param Y pointer to compare against X
+ *
+ * @since 0.9.10
+ */
+#define ck_assert_ptr_ne(X, Y) _ck_assert_ptr(X, !=, Y)
+
+/**
+ * Check if a pointer is equal to NULL.
+ *
+ * If X != NULL, the test fails.
+ *
+ * @param X pointer to compare against NULL
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ptr_null(X) _ck_assert_ptr_null(X, ==)
+
+/**
+ * Check if a pointer is not equal to NULL.
+ *
+ * If X == NULL, the test fails.
+ *
+ * @param X pointer to compare against NULL
+ *
+ * @note If the check fails, the remaining of the test is aborted
+ *
+ * @since 0.11.0
+ */
+#define ck_assert_ptr_nonnull(X) _ck_assert_ptr_null(X, !=)
+
+/**
+ * Mark the last point reached in a unit test.
+ *
+ * If the test throws a signal or exits, the location noted with the
+ * failure is the last location of a ck_assert*() or ck_abort() call.
+ * Use mark_point() to record intermediate locations (useful for tracking down
+ * crashes or exits).
+ *
+ * @since 0.6.0
+*/
+#define mark_point() _mark_point(__FILE__,__LINE__)
+
+/* Non macro version of #mark_point */
+CK_DLL_EXP void CK_EXPORT _mark_point(const char *file, int line);
+
+/**
+ * Enum describing the possible results of a test
+ */
+enum test_result
+{
+    CK_TEST_RESULT_INVALID,     /**< Default value; should not encounter this */
+    CK_PASS,                    /**< Test passed */
+    CK_FAILURE,                 /**< Test completed but failed */
+    CK_ERROR                    /**< Test failed to complete
+                                   (unexpected signal or non-zero early exit) */
+};
+
+/**
+ * Enum specifying the verbosity of output a SRunner should produce
+ */
+enum print_output
+{
+    CK_SILENT,                  /**< No output */
+    CK_MINIMAL,                 /**< Only summary output */
+    CK_NORMAL,                  /**< All failed tests */
+    CK_VERBOSE,                 /**< All tests */
+    CK_ENV,                     /**< Look at environment var CK_VERBOSITY
+                                     for what verbosity to use, which can be
+                                     either "silent", "minimal", "normal",
+                                     or "verbose". If the environment variable
+                                     is not set, then CK_NORMAL will be used.*/
+#if @ENABLE_SUBUNIT@
+    CK_SUBUNIT,                 /**< Run as a subunit child process */
+#endif
+    CK_LAST                     /**< Not a valid option */
+};
+
+/**
+ * Holds state for a running of a test suite
+ */
+typedef struct SRunner SRunner;
+
+/**
+ * Opaque type for a test failure
+ */
+typedef struct TestResult TestResult;
+
+/**
+ * Enum representing the types of contexts for a test
+ */
+enum ck_result_ctx
+{
+    CK_CTX_INVALID,             /**< Default value; should not encounter this */
+    CK_CTX_SETUP,               /**< Setup before a test */
+    CK_CTX_TEST,                /**< Body of test itself */
+    CK_CTX_TEARDOWN             /**< Teardown after a test */
+};
+
+/**
+ * Retrieve type of result that the given test result represents.
+ *
+ * This is a member of test_result, and can represent a
+ * pass, failure, or error.
+ *
+ * @param tr test result to retrieve result from
+ *
+ * @return result of given test
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP int CK_EXPORT tr_rtype(TestResult * tr);
+
+/**
+ * Retrieve context in which the result occurred for the given test result.
+ *
+ * The types of contents include the test setup, teardown, or the
+ * body of the test itself.
+ *
+ * @param tr test result to retrieve context from
+ *
+ * @return context to which the given test result applies
+ *
+ * @since 0.8.0
+ */
+CK_DLL_EXP enum ck_result_ctx CK_EXPORT tr_ctx(TestResult * tr);
+
+/**
+ * Retrieve failure message from test result, if applicable.
+ *
+ * @return pointer to a message, if one exists. NULL otherwise.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP const char *CK_EXPORT tr_msg(TestResult * tr);
+
+/**
+ * Retrieve line number at which a failure occurred, if applicable.
+ *
+ * @return If the test resulted in a failure, returns the line number
+ *          that the failure occurred on; otherwise returns -1.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP int CK_EXPORT tr_lno(TestResult * tr);
+
+/**
+ * Retrieve file name at which a failure occurred, if applicable.
+ *
+ * @return If the test resulted in a failure, returns a string
+ *          containing the name of the file where the failure
+ *          occurred; otherwise returns NULL.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP const char *CK_EXPORT tr_lfile(TestResult * tr);
+
+/**
+ * Retrieve test case name in which a failure occurred, if applicable.
+ *
+ * @return If the test resulted in a failure, returns a string
+ *          containing the name of the test suite where the failure
+ *          occurred; otherwise returns NULL.
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP const char *CK_EXPORT tr_tcname(TestResult * tr);
+
+/**
+ * Creates a suite runner for the given suite.
+ *
+ * Once created, additional suites can be added to the
+ * suite runner using srunner_add_suite(), and the suite runner can be
+ * run with srunner_run_all(). Once finished, the suite runner
+ * must be freed with srunner_free().
+ *
+ * @param s suite to generate a suite runner for
+ *
+ * @return suite runner for the given suite
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP SRunner *CK_EXPORT srunner_create(Suite * s);
+
+/**
+ * Add an additional suite to a suite runner.
+ *
+ * The first suite in a suite runner is always added in srunner_create().
+ * This call adds additional suites to a suite runner.
+ *
+ * @param sr suite runner to add the given suite
+ * @param s suite to add to the given suite runner
+ *
+ * @since 0.7.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_add_suite(SRunner * sr, Suite * s);
+
+/**
+ * Frees a suite runner, including all contained suite and test cases.
+ *
+ * This call is responsible for freeing all resources related to a
+ * suite runner and all contained suites and test cases. Suite and
+ * test cases need not be freed individually, as this call handles that.
+ *
+ * @param sr suite runner to free
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_free(SRunner * sr);
+
+/**
+ * Runs a suite runner and all contained suite, printing results to
+ * stdout as specified by the print_mode.
+ *
+ * In addition to running all suites, if the suite runner has been
+ * configured to output to a log, that is also performed.
+ *
+ * Note that if the CK_RUN_CASE, CK_RUN_SUITE, CK_INCLUDE_TAGS and/or
+ * CK_EXCLUDE_TAGS environment variables are defined, then only the
+ * named suites or test cases will run.
+ *
+ * @param sr suite runner to run all suites from
+ * @param print_mode the verbosity in which to report results to stdout
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_run_all(SRunner * sr,
+                                          enum print_output print_mode);
+
+/**
+ * Run a specific suite or test case from a suite runner, printing results
+ * to stdout as specified by the print_mode.
+ *
+ * In addition to running any applicable suites or test cases, if the
+ * suite runner has been configured to output to a log, that is also
+ * performed.
+ *
+ * Note that if the sname and tcname parameters are passed as null
+ * then the function will fallback to using the environment variables
+ * CK_RUN_SUITE and CK_RUN_CASE respectively in order to select the
+ * suite/cases.
+ * 
+ * Similarly if the CK_INCLUDE_TAGS and/or CK_EXCLUDE_TAGS environment
+ * variables are defined then these will further filter the test cases
+ * (see srunner_run_tagged, below).
+ *
+ * @param sr suite runner where the given suite or test case must be
+ * @param sname suite name to run. A NULL means use the value of the
+ * environment variable CK_RUN_SUITE if set, otherwise run "any/every
+ * suite".
+ * @param tcname test case name to run. A NULL means use the value of
+ * the environment variable CK_RUN_CASE if set, otherwise run
+ * "any/every case".
+ * @param print_mode the verbosity in which to report results to stdout
+ *
+ * @since 0.9.9
+ */
+CK_DLL_EXP void CK_EXPORT srunner_run(SRunner * sr, const char *sname,
+                                      const char *tcname,
+                                      enum print_output print_mode);
+
+
+/**
+ * Run a specific suite or test case or testcases with specific tags
+ * from a suite runner, printing results to stdout as specified by the
+ * print_mode.
+ *
+ * In addition to running any applicable suites or test cases, if the
+ * suite runner has been configured to output to a log, that is also
+ * performed.
+ *
+ * Note that if sname, tcname, include_tags, exclude_tags parameters
+ * are passed as NULL then if the environment variables CK_RUN_SUITE,
+ * CK_RUN_CASE, CK_INCLUDE_TAGS, CK_EXCLUDE_TAGS are defined then these
+ * values will be used instead.
+ *
+ * @param sr suite runner where the given suite or test case must be
+ * @param sname suite name to run. A NULL means use the value of the
+ * environment variable CK_RUN_SUITE if set, otherwise run "any/every
+ * suite".
+ * @param tcname test case name to run. A NULL means use the value of
+ * the environment variable CK_RUN_CASE if set, otherwise run
+ * "any/every case".
+ * @param include_tags space separate list of tags. Only run test
+ * cases that share one of these tags. A NULL means use the value of
+ * the environment variable CK_INCLUDE_TAGS if set, otherwise run
+ * "any/every test case".
+ * @param exclude_tags space separate list of tags. Only run test
+ * cases that do not share one of these tags even if they are selected
+ * by an included tag. A NULL means use the value of the environment
+ * variable CK_EXCLUDE_TAGS if set, otherwise run "any/every test
+ * case".
+ * @param print_mode the verbosity in which to report results to stdout
+ *
+ * @since 0.11.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_run_tagged(SRunner * sr, const char *sname,
+                                            const char *tcname,
+                                            const char *include_tags,
+                                            const char *exclude_tags,
+                                            enum print_output print_mode);
+
+/**
+ * Retrieve the number of failed tests executed by a suite runner.
+ *
+ * This value represents both test failures and errors.
+ *
+ * @param sr suite runner to query for all failed tests
+ *
+ * @return number of test failures and errors found by the suite runner
+ *
+ * @since 0.6.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_ntests_failed(SRunner * sr);
+
+/**
+ * Retrieve the total number of tests run by a suite runner.
+ *
+ * @param sr suite runner to query for all tests run
+ *
+ * @return number of all tests run by the suite runner
+ *
+ * @since 0.6.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_ntests_run(SRunner * sr);
+
+/**
+ * Return an array of results for all failures found by a suite runner.
+ *
+ * Number of results is equal to srunner_nfailed_tests().
+ *
+ * Information about individual results can be queried using:
+ * tr_rtype(), tr_ctx(), tr_msg(), tr_lno(), tr_lfile(), and tr_tcname().
+ *
+ * Memory is malloc'ed and must be freed; however free the entire structure
+ * instead of individual test cases.
+ *
+ * @param sr suite runner to retrieve results from
+ *
+ * @return array of TestResult objects
+ *
+ * @since 0.6.0
+ */
+CK_DLL_EXP TestResult **CK_EXPORT srunner_failures(SRunner * sr);
+
+/**
+ * Return an array of results for all tests run by a suite runner.
+ *
+ * Number of results is equal to srunner_ntests_run(), and excludes
+ * failures due to setup function failure.
+ *
+ * Information about individual results can be queried using:
+ * tr_rtype(), tr_ctx(), tr_msg(), tr_lno(), tr_lfile(), and tr_tcname().
+ *
+ * Memory is malloc'ed and must be freed; however free the entire structure
+ * instead of individual test cases.
+ *
+ * @param sr suite runner to retrieve results from
+ *
+ * @return array of TestResult objects
+ *
+ * @since 0.6.1
 */
-void CK_EXPORT srunner_set_log (SRunner *sr, const char *fname);
+CK_DLL_EXP TestResult **CK_EXPORT srunner_results(SRunner * sr);
+
+/**
+ * Print the results contained in an SRunner to stdout.
+ *
+ * @param sr suite runner to print results for to stdout
+ * @param print_mode the print_output (verbosity) to use to report
+ *         the result
+ *
+ * @since 0.7.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_print(SRunner * sr,
+                                        enum print_output print_mode);
 
-/* Does the SRunner have a log file? */
-int CK_EXPORT srunner_has_log (SRunner *sr);
+/**
+ * Set the suite runner to output the result in log format to the
+ * given file.
+ *
+ * Note: log file setting is an initialize only operation -- it should
+ * be done immediately after SRunner creation, and the log file can't be
+ * changed after being set.
+ *
+ * This setting does not conflict with the other log output types;
+ * all logging types can occur concurrently if configured.
+ *
+ * @param sr suite runner to log results of in log format
+ * @param fname file name to output log results to
+ *
+ * @since 0.7.1
+*/
+CK_DLL_EXP void CK_EXPORT srunner_set_log(SRunner * sr, const char *fname);
 
-/* Return the name of the log file, or NULL if none */
-const char * CK_EXPORT srunner_log_fname (SRunner *sr);
+/**
+ * Checks if the suite runner is assigned a file for log output.
+ *
+ * @param sr suite runner to check
+ *
+ * @return 1 iff the suite runner currently is configured to output
+ *         in log format; 0 otherwise
+ *
+ * @since 0.7.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_has_log(SRunner * sr);
 
-/* Set a xml file to which to write during test running.
+/**
+ * Retrieves the name of the currently assigned file
+ * for log output, if any exists.
+ *
+ * @return the name of the log file, or NULL if none is configured
+ *
+ * @since 0.7.1
+ */
+CK_DLL_EXP const char *CK_EXPORT srunner_log_fname(SRunner * sr);
 
-  XML file setting is an initialize only operation -- it should be
-  done immediatly after SRunner creation, and the XML file can't be
-  changed after being set.
+/**
+ * Set the suite runner to output the result in XML format to the
+ * given file.
+ *
+ * Note: XML file setting is an initialize only operation -- it should
+ * be done immediately after SRunner creation, and the XML file can't be
+ * changed after being set.
+ *
+ * This setting does not conflict with the other log output types;
+ * all logging types can occur concurrently if configured.
+ *
+ * @param sr suite runner to log results of in XML format
+ * @param fname file name to output XML results to
+ *
+ * @since 0.9.1
 */
-void CK_EXPORT srunner_set_xml (SRunner *sr, const char *fname);
+CK_DLL_EXP void CK_EXPORT srunner_set_xml(SRunner * sr, const char *fname);
+
+/**
+ * Checks if the suite runner is assigned a file for XML output.
+ *
+ * @param sr suite runner to check
+ *
+ * @return 1 iff the suite runner currently is configured to output
+ *         in XML format; 0 otherwise
+ *
+ * @since 0.9.1
+ */
+CK_DLL_EXP int CK_EXPORT srunner_has_xml(SRunner * sr);
+
+/**
+ * Retrieves the name of the currently assigned file
+ * for XML output, if any exists.
+ *
+ * @return the name of the XML file, or NULL if none is configured
+ *
+ * @since 0.9.1
+ */
+CK_DLL_EXP const char *CK_EXPORT srunner_xml_fname(SRunner * sr);
 
-/* Does the SRunner have an XML log file? */
-int CK_EXPORT srunner_has_xml (SRunner *sr);
+/**
+ * Set the suite runner to output the result in TAP format to the
+ * given file.
+ *
+ * Note: TAP file setting is an initialize only operation -- it should
+ * be done immediately after SRunner creation, and the TAP file can't be
+ * changed after being set.
+ *
+ * This setting does not conflict with the other log output types;
+ * all logging types can occur concurrently if configured.
+ *
+ * @param sr suite runner to log results of in TAP format
+ * @param fname file name to output TAP results to
+ *
+ * @since 0.9.12
+*/
+CK_DLL_EXP void CK_EXPORT srunner_set_tap(SRunner * sr, const char *fname);
 
-/* Return the name of the XML file, or NULL if none */
-const char * CK_EXPORT srunner_xml_fname (SRunner *sr);
+/**
+ * Checks if the suite runner is assigned a file for TAP output.
+ *
+ * @param sr suite runner to check
+ *
+ * @return 1 iff the suite runner currently is configured to output
+ *         in TAP format; 0 otherwise
+ *
+ * @since 0.9.12
+ */
+CK_DLL_EXP int CK_EXPORT srunner_has_tap(SRunner * sr);
 
+/**
+ * Retrieves the name of the currently assigned file
+ * for TAP output, if any exists.
+ *
+ * @return the name of the TAP file, or NULL if none is configured
+ *
+ * @since 0.9.12
+ */
+CK_DLL_EXP const char *CK_EXPORT srunner_tap_fname(SRunner * sr);
 
-/* Control forking */
-enum fork_status {
-  CK_FORK_GETENV, /* look in the environment for CK_FORK */
-  CK_FORK,        /* call fork to run tests */
-  CK_NOFORK       /* don't call fork */
+/**
+ * Enum describing the current fork usage.
+ */
+enum fork_status
+{
+    CK_FORK_GETENV,             /**< look in the environment for CK_FORK */
+    CK_FORK,                    /**< call fork to run tests */
+    CK_NOFORK                   /**< don't call fork */
 };
-/* Get the current fork status */
-enum fork_status CK_EXPORT srunner_fork_status (SRunner *sr);
 
-/* Set the current fork status */
-void CK_EXPORT srunner_set_fork_status (SRunner *sr, enum fork_status fstat); 
-  
-/* Fork in a test and make sure messaging and tests work. */
-pid_t CK_EXPORT check_fork(void);
+/**
+ * Retrieve the current fork status for the given suite runner
+ *
+ * @param sr suite runner to check fork status of
+ *
+ * @since 0.8.0
+ */
+CK_DLL_EXP enum fork_status CK_EXPORT srunner_fork_status(SRunner * sr);
 
-/* Wait for the pid and exit. If pid is zero, just exit. */
-void CK_EXPORT check_waitpid_and_exit(pid_t pid);
+/**
+ * Set the fork status for a given suite runner.
+ *
+ * The default fork status is CK_FORK_GETENV, which will look
+ * for the CK_FORK environment variable, which can be set to
+ * "yes" or "no". If the environment variable is not present,
+ * CK_FORK will be used if fork() is available on the system,
+ * otherwise CK_NOFORK is used.
+ *
+ * If set to CK_FORK or CK_NOFORK, the environment variable
+ * if defined is ignored.
+ *
+ * If Check is compiled without support for fork(), attempting
+ * to set the status to CK_FORK is ignored.
+ *
+ * @param sr suite runner to assign the fork status to
+ * @param fstat fork status to assign
+ *
+ * @since 0.8.0
+ */
+CK_DLL_EXP void CK_EXPORT srunner_set_fork_status(SRunner * sr,
+                                                  enum fork_status fstat);
 
-#ifdef __cplusplus 
+/**
+ * Invoke fork() during a test and assign the child to the same
+ * process group that the rest of the test case uses.
+ *
+ * One can invoke fork() directly during a test; however doing so
+ * may not guarantee that any children processes are destroyed once
+ * the test finishes. Once a test has completed, all processes in
+ * the process group will be killed; using this wrapper will prevent
+ * orphan processes.
+ *
+ * If Check is compiled without fork() support this call simply
+ * return -1 and does nothing.
+ *
+ * @return On success, the PID of the child process is returned in
+ *          the parent, and 0 is returned in the child.  On failure,
+ *          a value of -1 is returned to the parent process and no
+ *          child process is created.
+ *
+ * @since 0.9.3
+ */
+CK_DLL_EXP pid_t CK_EXPORT check_fork(void);
+
+/**
+ * Wait for the pid and exit.
+ *
+ * This is to be used in conjunction with check_fork(). When called,
+ * will wait for the given process to terminate. If the process
+ * exited without error, exit(EXIT_SUCCESS) is invoked; otherwise
+ * exit(EXIT_FAILURE) is invoked.
+ *
+ * If Check is compiled without support for fork(), this invokes
+ * exit(EXIT_FAILURE).
+ *
+ * @param pid process to wait for, created by check_fork()
+ *
+ * @since 0.9.3
+ */
+CK_DLL_EXP void CK_EXPORT check_waitpid_and_exit(pid_t pid) CK_ATTRIBUTE_NORETURN;
+
+/**
+ * Set the maximal assertion message size.
+ *
+ * This protects the code against unintentional extremely large assertion messages
+ * (values of up to 4GB were seen in the wild).
+ * The usual size for a message is less than 80 bytes.
+ *
+ * If the environment variable CK_MAX_MSG_SIZE is defined to a positive value, it is used.
+ * Otherwise, if a positive maximal message size is set via this function, it is used.
+ * Otherwise, the maximal message size is one assigned at compile time (4K bytes).
+ *
+ * @param max_msg_size the maximal assertion message size.
+ *
+ * @since 0.12.0
+ */
+CK_DLL_EXP void CK_EXPORT check_set_max_msg_size(size_t max_msg_size);
+
+#ifdef __cplusplus
 CK_CPPEND
 #endif
 
index 5ed0c1d..865e7d5 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
+#include <setjmp.h>
 
 #include "check_error.h"
 
+/**
+ * Storage for setjmp/longjmp context information used in NOFORK mode
+ */
+jmp_buf error_jmp_buffer;
+
 
 /* FIXME: including a colon at the end is a bad way to indicate an error */
-void eprintf (const char *fmt, const char *file, int line, ...)
+void eprintf(const char *fmt, const char *file, int line, ...)
 {
-  va_list args;
-  fflush(stderr);
+    va_list args;
+
+    fflush(stderr);
 
-  fprintf(stderr,"%s:%d: ",file,line);
-  va_start(args, line);
-  vfprintf(stderr, fmt, args);
-  va_end(args);
+    fprintf(stderr, "%s:%d: ", file, line);
+    va_start(args, line);
+    vfprintf(stderr, fmt, args);
+    va_end(args);
 
-  /*include system error information if format ends in colon */
-  if (fmt[0] != '\0' && fmt[strlen(fmt)-1] == ':')
-    fprintf(stderr, " %s", strerror(errno));
-  fprintf(stderr, "\n");
+    /*include system error information if format ends in colon */
+    if(fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':')
+        fprintf(stderr, " %s", strerror(errno));
+    fprintf(stderr, "\n");
 
-  exit(2);
+    exit(2);
 }
 
-void *emalloc (size_t n)
+void *emalloc(size_t n)
 {
-  void *p;
-  p = malloc(n);
-  if (p == NULL)
-    eprintf("malloc of %u bytes failed:", __FILE__, __LINE__ - 2, n);
-  return p;
+    void *p;
+
+    p = malloc(n);
+    if(p == NULL)
+        eprintf("malloc of %u bytes failed:", __FILE__, __LINE__ - 2, n);
+    return p;
 }
 
-void *erealloc (void * ptr, size_t n)
+void *erealloc(void *ptr, size_t n)
 {
-  void *p;
-  p = realloc (ptr, n);
-  if (p == NULL)
-    eprintf("realloc of %u bytes failed:", __FILE__, __LINE__ - 2, n);
-  return p;
+    void *p;
+
+    p = realloc(ptr, n);
+    if(p == NULL)
+        eprintf("realloc of %u bytes failed:", __FILE__, __LINE__ - 2, n);
+    return p;
 }
index 2e1e211..c2c8d34 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef ERROR_H
 #define ERROR_H
 
+#include "../lib/libcompat.h"
+#include <setjmp.h>
+
+extern jmp_buf error_jmp_buffer;
+
 /* Include stdlib.h beforehand */
 
 /* Print error message and die
    If fmt ends in colon, include system error information */
-void eprintf (const char *fmt, const char *file, int line,...);
+void eprintf(const char *fmt, const char *file, int line,
+             ...) CK_ATTRIBUTE_NORETURN;
 /* malloc or die */
 void *emalloc(size_t n);
 void *erealloc(void *, size_t n);
 
-#endif /*ERROR_H*/
+#endif /*ERROR_H */
index 907950c..bddd186 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Check: a unit test framework for C
- * Copyright (C) 2001,2002 Arien Malec
+ * Copyright (C) 2001, 2002 Arien Malec
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_IMPL_H
 #define CHECK_IMPL_H
 
-
 /* This header should be included by any module that needs
    to know the implementation details of the check structures
-   Include stdio.h & list.h before this header
+   Include stdio.h, time.h, & list.h before this header
 */
 
-typedef struct TF {
-  TFun fn;
-  int loop_start;
-  int loop_end;
-  const char *name;
-  int signal;
-  unsigned char allowed_exit_value;
+#define US_PER_SEC 1000000
+#define NANOS_PER_SECONDS 1000000000
+
+/** calculate the difference in useconds out of two "struct timespec"s */
+#define DIFF_IN_USEC(begin, end) \
+  ( (((end).tv_sec - (begin).tv_sec) * US_PER_SEC) + \
+    ((end).tv_nsec/1000) - ((begin).tv_nsec/1000) )
+
+typedef struct TF
+{
+    TFun fn;
+    int loop_start;
+    int loop_end;
+    const char *name;
+    int signal;
+    signed char allowed_exit_value;
 } TF;
 
-struct Suite {
-  const char *name;
-  List *tclst; /* List of test cases */
+struct Suite
+{
+    const char *name;
+    List *tclst;                /* List of test cases */
 };
 
-typedef struct Fixture 
+typedef struct Fixture
 {
-  int ischecked;
-  SFun fun;
+    int ischecked;
+    SFun fun;
 } Fixture;
 
-struct TCase {
-  const char *name;
-  int timeout;
-  List *tflst; /* list of test functions */
-  List *unch_sflst;
-  List *unch_tflst;
-  List *ch_sflst;
-  List *ch_tflst;
+struct TCase
+{
+    const char *name;
+    struct timespec timeout;
+    List *tflst;                /* list of test functions */
+    List *unch_sflst;
+    List *unch_tflst;
+    List *ch_sflst;
+    List *ch_tflst;
+    List *tags;
 };
 
-typedef struct TestStats {
-  int n_checked;
-  int n_failed;
-  int n_errors;
+typedef struct TestStats
+{
+    int n_checked;
+    int n_failed;
+    int n_errors;
 } TestStats;
 
-struct TestResult {
-  enum test_result rtype;     /* Type of result */
-  enum ck_result_ctx ctx;     /* When the result occurred */
-  char *file;    /* File where the test occured */
-  int line;      /* Line number where the test occurred */
-  int iter;      /* The iteration value for looping tests */
-  const char *tcname;  /* Test case that generated the result */
-  const char *tname;  /* Test that generated the result */
-  char *msg;     /* Failure message */
+struct TestResult
+{
+    enum test_result rtype;     /* Type of result */
+    enum ck_result_ctx ctx;     /* When the result occurred */
+    char *file;                 /* File where the test occured */
+    int line;                   /* Line number where the test occurred */
+    int iter;                   /* The iteration value for looping tests */
+    int duration;               /* duration of this test in microseconds */
+    const char *tcname;         /* Test case that generated the result */
+    const char *tname;          /* Test that generated the result */
+    char *msg;                  /* Failure message */
 };
 
 TestResult *tr_create(void);
-void tr_reset(TestResult *tr);
-
-enum cl_event {
-  CLINITLOG_SR,
-  CLENDLOG_SR,
-  CLSTART_SR,
-  CLSTART_S,
-  CLEND_SR,
-  CLEND_S,
-  CLSTART_T, /* A test case is about to run */
-  CLEND_T
+void tr_reset(TestResult * tr);
+void tr_free(TestResult * tr);
+
+enum cl_event
+{
+    CLINITLOG_SR,               /* Initialize log file */
+    CLENDLOG_SR,                /* Tests are complete */
+    CLSTART_SR,                 /* Suite runner start */
+    CLSTART_S,                  /* Suite start */
+    CLEND_SR,                   /* Suite runner end */
+    CLEND_S,                    /* Suite end */
+    CLSTART_T,                  /* A test case is about to run */
+    CLEND_T                     /* Test case end */
 };
 
-typedef void (*LFun) (SRunner *, FILE*, enum print_output,
-                     void *, enum cl_event);
+typedef void (*LFun) (SRunner *, FILE *, enum print_output,
+                      void *, enum cl_event);
 
-typedef struct Log {
-  FILE *lfile;
-  LFun lfun;
-  int close;
-  enum print_output mode;
+typedef struct Log
+{
+    FILE *lfile;
+    LFun lfun;
+    int close;
+    enum print_output mode;
 } Log;
 
-struct SRunner {
-  List *slst; /* List of Suite objects */
-  TestStats *stats; /* Run statistics */
-  List *resultlst; /* List of unit test results */
-  const char *log_fname; /* name of log file */
-  const char *xml_fname; /* name of xml output file */
-  List *loglst; /* list of Log objects */
-  enum fork_status fstat; /* controls if suites are forked or not
-                            NOTE: Don't use this value directly,
-                            instead use srunner_fork_status */
+struct SRunner
+{
+    List *slst;                 /* List of Suite objects */
+    TestStats *stats;           /* Run statistics */
+    List *resultlst;            /* List of unit test results */
+    const char *log_fname;      /* name of log file */
+    const char *xml_fname;      /* name of xml output file */
+    const char *tap_fname;      /* name of tap output file */
+    List *loglst;               /* list of Log objects */
+    enum fork_status fstat;     /* controls if suites are forked or not
+                                   NOTE: Don't use this value directly,
+                                   instead use srunner_fork_status */
 };
 
 
 void set_fork_status(enum fork_status fstat);
-enum fork_status cur_fork_status (void);
+enum fork_status cur_fork_status(void);
+
+clockid_t check_get_clockid(void);
+
+unsigned int tcase_matching_tag(TCase *tc, List *check_for);
+List *tag_string_to_list(const char *tags_string);
 
 #endif /* CHECK_IMPL_H */
index e4a4385..d93f51c 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
 #include "check_error.h"
 
 
-enum {
-  LINIT = 1,
-  LGROW = 2
+enum
+{
+    LINIT = 1,
+    LGROW = 2
 };
 
-struct List {
-  int n_elts;
-  int max_elts;
-  int current; /* pointer to the current node */
-  int last; /* pointer to the node before END */
-  const void **data;
+struct List
+{
+    unsigned int n_elts;
+    unsigned int max_elts;
+    int current;                /* pointer to the current node */
+    int last;                   /* pointer to the node before END */
+    void **data;
 };
 
-static void maybe_grow (List *lp)
+static void maybe_grow(List * lp)
 {
-  if (lp->n_elts >= lp->max_elts) {
-    lp->max_elts *= LGROW;
-    lp->data = erealloc (lp->data, lp->max_elts * sizeof(lp->data[0]));
-  }
+    if(lp->n_elts >= lp->max_elts)
+    {
+        lp->max_elts *= LGROW;
+        lp->data = (void **)erealloc(lp->data, lp->max_elts * sizeof(lp->data[0]));
+    }
 }
 
-List *check_list_create (void)
+List *check_list_create(void)
 {
-  List *lp;
-  lp = emalloc (sizeof(List));
-  lp->n_elts = 0;
-  lp->max_elts = LINIT;
-  lp->data = emalloc(sizeof(lp->data[0]) * LINIT);
-  lp->current = lp->last = -1;
-  return lp;
+    List *lp;
+
+    lp = (List *)emalloc(sizeof(List));
+    lp->n_elts = 0;
+    lp->max_elts = LINIT;
+    lp->data = (void **)emalloc(sizeof(lp->data[0]) * LINIT);
+    lp->current = lp->last = -1;
+    return lp;
 }
 
-void list_add_front (List *lp, const void *val)
+void check_list_add_front(List * lp, void *val)
 {
-  if (lp == NULL)
-    return;
-  maybe_grow(lp);
-  memmove(lp->data + 1, lp->data, lp->n_elts * sizeof lp->data[0]);
-  lp->last++;
-  lp->n_elts++;
-  lp->current = 0;
-  lp->data[lp->current] = val;
+    if(lp == NULL)
+        return;
+    maybe_grow(lp);
+    memmove(lp->data + 1, lp->data, lp->n_elts * sizeof lp->data[0]);
+    lp->last++;
+    lp->n_elts++;
+    lp->current = 0;
+    lp->data[lp->current] = val;
 }
 
-void list_add_end (List *lp, const void *val)
+void check_list_add_end(List * lp, void *val)
 {
-  if (lp == NULL)
-    return;
-  maybe_grow(lp);
-  lp->last++;
-  lp->n_elts++;
-  lp->current = lp->last;
-  lp->data[lp->current] = val;
+    if(lp == NULL)
+        return;
+    maybe_grow(lp);
+    lp->last++;
+    lp->n_elts++;
+    lp->current = lp->last;
+    lp->data[lp->current] = val;
 }
 
-int list_at_end (List *lp)
+int check_list_at_end(List * lp)
 {
-  if (lp->current == -1)
-    return 1;
-  else
+    if(lp->current == -1)
+        return 1;
     return (lp->current > lp->last);
 }
 
-void list_front (List *lp)
+void check_list_front(List * lp)
 {
-  if (lp->current == -1)
-    return;
-  lp->current = 0;
+    if(lp->current == -1)
+        return;
+    lp->current = 0;
 }
 
 
-void list_free (List *lp)
+void check_list_free(List * lp)
 {
-  if (lp == NULL)
-    return;
-  
-  free(lp->data);
-  free (lp);
+    if(lp == NULL)
+        return;
+
+    free(lp->data);
+    free(lp);
 }
 
-void *list_val (List *lp)
+void *check_list_val(List * lp)
 {
-  if (lp == NULL)
-    return NULL;
-  if (lp->current == -1 || lp->current > lp->last)
-    return NULL;
-  
-  return (void*) lp->data[lp->current];
+    if(lp == NULL)
+        return NULL;
+    if(lp->current == -1 || lp->current > lp->last)
+        return NULL;
+
+    return lp->data[lp->current];
 }
 
-void list_advance (List *lp)
+void check_list_advance(List * lp)
 {
-  if (lp == NULL)
-    return;
-  if (list_at_end(lp))
-    return;
-  lp->current++;
+    if(lp == NULL)
+        return;
+    if(check_list_at_end(lp))
+        return;
+    lp->current++;
 }
 
 
-void list_apply (List *lp, void (*fp) (void *))
+void check_list_apply(List * lp, void (*fp) (void *))
 {
-  if (lp == NULL || fp == NULL)
-    return;
+    if(lp == NULL || fp == NULL)
+        return;
 
-  for (list_front(lp); !list_at_end(lp); list_advance(lp))
-    fp (list_val(lp));
-  
-}
+    for(check_list_front(lp); !check_list_at_end(lp); check_list_advance(lp))
+        fp(check_list_val(lp));
 
+}
 
-  
+int check_list_contains(List * lp, void *val)
+{
+    for(check_list_front(lp); !check_list_at_end(lp); check_list_advance(lp))
+    {
+        if(check_list_val(lp) == val)
+        {
+            return 1;
+        }
+    }
+
+    return 0;
+}
index e40f4f8..e0b5c8c 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_LIST_H
 typedef struct List List;
 
 /* Create an empty list */
-List * check_list_create (void);
+List *check_list_create(void);
 
 /* Is list at end? */
-int list_at_end (List * lp);
+int check_list_at_end(List * lp);
 
 /* Position list at front */
-void list_front(List *lp);
+void check_list_front(List * lp);
 
 /* Add a value to the front of the list,
    positioning newly added value as current value.
    More expensive than list_add_end, as it uses memmove. */
-void list_add_front (List *lp, const void *val);
+void check_list_add_front(List * lp, void *val);
 
 /* Add a value to the end of the list,
    positioning newly added value as current value */
-void list_add_end (List *lp, const void *val);
+void check_list_add_end(List * lp, void *val);
 
 /* Give the value of the current node */
-void *list_val (List * lp);
+void *check_list_val(List * lp);
 
 /* Position the list at the next node */
-void list_advance (List * lp);
+void check_list_advance(List * lp);
 
 /* Free a list, but don't free values */
-void list_free (List * lp);
+void check_list_free(List * lp);
 
-void list_apply (List *lp, void (*fp) (void *));
+void check_list_apply(List * lp, void (*fp) (void *));
+
+/* Return true if the list contains the value, false otherwise */
+int check_list_contains(List * lp, void *val);
 
 
 #endif /* CHECK_LIST_H */
index 6176675..2af8321 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <check.h>
-#if HAVE_SUBUNIT_CHILD_H
+#if ENABLE_SUBUNIT
 #include <subunit/child.h>
 #endif
 
 #include "check_print.h"
 #include "check_str.h"
 
+/*
+ * If a log file is specified to be "-", then instead of
+ * opening a file the log output is printed to stdout.
+ */
+#define STDOUT_OVERRIDE_LOG_FILE_NAME "-"
 
-static void srunner_send_evt (SRunner *sr, void *obj, enum cl_event evt);
+static void srunner_send_evt(SRunner * sr, void *obj, enum cl_event evt);
 
-void srunner_set_log (SRunner *sr, const char *fname)
+void srunner_set_log(SRunner * sr, const char *fname)
 {
-  if (sr->log_fname)
-    return;
-  sr->log_fname = fname;
+    if(sr->log_fname)
+        return;
+    sr->log_fname = fname;
 }
 
-int srunner_has_log (SRunner *sr)
+int srunner_has_log(SRunner * sr)
 {
-  return sr->log_fname != NULL;
+    return srunner_log_fname(sr) != NULL;
 }
 
-const char *srunner_log_fname (SRunner *sr)
+const char *srunner_log_fname(SRunner * sr)
 {
-  return sr->log_fname;
+    /* check if log filename have been set explicitly */
+    if(sr->log_fname != NULL)
+        return sr->log_fname;
+
+    return getenv("CK_LOG_FILE_NAME");
 }
 
 
-void srunner_set_xml (SRunner *sr, const char *fname)
+void srunner_set_xml(SRunner * sr, const char *fname)
 {
-  if (sr->xml_fname)
-    return;
-  sr->xml_fname = fname;
+    if(sr->xml_fname)
+        return;
+    sr->xml_fname = fname;
 }
 
-int srunner_has_xml (SRunner *sr)
+int srunner_has_xml(SRunner * sr)
 {
-  return sr->xml_fname != NULL;
+    return srunner_xml_fname(sr) != NULL;
 }
 
-const char *srunner_xml_fname (SRunner *sr)
+const char *srunner_xml_fname(SRunner * sr)
 {
-  return sr->xml_fname;
+    /* check if XML log filename have been set explicitly */
+    if(sr->xml_fname != NULL)
+    {
+        return sr->xml_fname;
+    }
+
+    return getenv("CK_XML_LOG_FILE_NAME");
 }
 
-void srunner_register_lfun (SRunner *sr, FILE *lfile, int close,
-                           LFun lfun, enum print_output printmode)
+void srunner_set_tap(SRunner * sr, const char *fname)
 {
-  Log *l = emalloc (sizeof(Log));
-
-  if (printmode == CK_ENV) {
-    printmode = get_env_printmode();
-  }
-
-  l->lfile = lfile;
-  l->lfun = lfun;
-  l->close = close;
-  l->mode = printmode;
-  list_add_end (sr->loglst, l);
-  return;
+    if(sr->tap_fname)
+        return;
+    sr->tap_fname = fname;
 }
 
-void log_srunner_start (SRunner *sr)
+int srunner_has_tap(SRunner * sr)
 {
-  srunner_send_evt (sr, NULL, CLSTART_SR);
+    return srunner_tap_fname(sr) != NULL;
+}
+
+const char *srunner_tap_fname(SRunner * sr)
+{
+    /* check if tap log filename have been set explicitly */
+    if(sr->tap_fname != NULL)
+    {
+        return sr->tap_fname;
+    }
+
+    return getenv("CK_TAP_LOG_FILE_NAME");
+}
+
+void srunner_register_lfun(SRunner * sr, FILE * lfile, int close,
+                           LFun lfun, enum print_output printmode)
+{
+    Log *l = (Log *)emalloc(sizeof(Log));
+
+    if(printmode == CK_ENV)
+    {
+        printmode = get_env_printmode();
+    }
+
+    l->lfile = lfile;
+    l->lfun = lfun;
+    l->close = close;
+    l->mode = printmode;
+    check_list_add_end(sr->loglst, l);
+    return;
 }
 
-void log_srunner_end (SRunner *sr)
+void log_srunner_start(SRunner * sr)
 {
-  srunner_send_evt (sr, NULL, CLEND_SR);
+    srunner_send_evt(sr, NULL, CLSTART_SR);
 }
 
-void log_suite_start (SRunner *sr, Suite *s)
+void log_srunner_end(SRunner * sr)
 {
-  srunner_send_evt (sr, s, CLSTART_S);
+    srunner_send_evt(sr, NULL, CLEND_SR);
 }
 
-void log_suite_end (SRunner *sr, Suite *s)
+void log_suite_start(SRunner * sr, Suite * s)
 {
-  srunner_send_evt (sr, s, CLEND_S);
+    srunner_send_evt(sr, s, CLSTART_S);
 }
 
-void log_test_start (SRunner *sr, TCase * tc, TF * tfun)
+void log_suite_end(SRunner * sr, Suite * s)
 {
-  char buffer[100];
-  snprintf(buffer, 99, "%s:%s", tc->name, tfun->name);
-  srunner_send_evt (sr, buffer, CLSTART_T);
+    srunner_send_evt(sr, s, CLEND_S);
 }
 
-void log_test_end (SRunner *sr, TestResult *tr)
+void log_test_start(SRunner * sr, TCase * tc, TF * tfun)
 {
-  srunner_send_evt (sr, tr, CLEND_T);
+    char buffer[100];
+
+    snprintf(buffer, 99, "%s:%s", tc->name, tfun->name);
+    srunner_send_evt(sr, buffer, CLSTART_T);
 }
 
-static void srunner_send_evt (SRunner *sr, void *obj, enum cl_event evt)
+void log_test_end(SRunner * sr, TestResult * tr)
 {
-  List *l;
-  Log *lg;
-  l = sr->loglst;
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    lg = list_val(l);
-    fflush(lg->lfile);
-    lg->lfun (sr, lg->lfile, lg->mode, obj, evt);
-    fflush(lg->lfile);
-  }
+    srunner_send_evt(sr, tr, CLEND_T);
 }
 
-void stdout_lfun (SRunner *sr, FILE *file, enum print_output printmode,
-                 void *obj, enum cl_event evt)
+static void srunner_send_evt(SRunner * sr, void *obj, enum cl_event evt)
 {
-  Suite *s;
-  
-  if (printmode == CK_ENV) {
-    printmode = get_env_printmode();
-  }
-
-  switch (evt) {
-  case CLINITLOG_SR:
-    break;
-  case CLENDLOG_SR:
-    break;
-  case CLSTART_SR:
-    if (printmode > CK_SILENT) {
-      fprintf(file, "Running suite(s):");
+    List *l;
+    Log *lg;
+
+    l = sr->loglst;
+    for(check_list_front(l); !check_list_at_end(l); check_list_advance(l))
+    {
+        lg = (Log *)check_list_val(l);
+        fflush(lg->lfile);
+        lg->lfun(sr, lg->lfile, lg->mode, obj, evt);
+        fflush(lg->lfile);
     }
-    break;
-  case CLSTART_S:
-    s = obj;
-    if (printmode > CK_SILENT) {
-      fprintf(file, " %s\n", s->name);
+}
+
+void stdout_lfun(SRunner * sr, FILE * file, enum print_output printmode,
+                 void *obj, enum cl_event evt)
+{
+    Suite *s;
+
+    switch (evt)
+    {
+        case CLINITLOG_SR:
+            break;
+        case CLENDLOG_SR:
+            break;
+        case CLSTART_SR:
+            if(printmode > CK_SILENT)
+            {
+                fprintf(file, "Running suite(s):");
+            }
+            break;
+        case CLSTART_S:
+            s = (Suite *)obj;
+            if(printmode > CK_SILENT)
+            {
+                fprintf(file, " %s\n", s->name);
+            }
+            break;
+        case CLEND_SR:
+            if(printmode > CK_SILENT)
+            {
+                /* we don't want a newline before printing here, newlines should
+                   come after printing a string, not before.  it's better to add
+                   the newline above in CLSTART_S.
+                 */
+                srunner_fprint(file, sr, printmode);
+            }
+            break;
+        case CLEND_S:
+            break;
+        case CLSTART_T:
+            break;
+        case CLEND_T:
+            break;
+        default:
+            eprintf("Bad event type received in stdout_lfun", __FILE__,
+                    __LINE__);
     }
-    break;
-  case CLEND_SR:
-    if (printmode > CK_SILENT) {
-      /* we don't want a newline before printing here, newlines should
-        come after printing a string, not before.  it's better to add
-        the newline above in CLSTART_S.
-      */
-      srunner_fprint (file, sr, printmode);
+
+
+}
+
+void lfile_lfun(SRunner * sr, FILE * file,
+                enum print_output printmode CK_ATTRIBUTE_UNUSED, void *obj,
+                enum cl_event evt)
+{
+    TestResult *tr;
+    Suite *s;
+
+    switch (evt)
+    {
+        case CLINITLOG_SR:
+            break;
+        case CLENDLOG_SR:
+            break;
+        case CLSTART_SR:
+            break;
+        case CLSTART_S:
+            s = (Suite *)obj;
+            fprintf(file, "Running suite %s\n", s->name);
+            break;
+        case CLEND_SR:
+            fprintf(file, "Results for all suites run:\n");
+            srunner_fprint(file, sr, CK_MINIMAL);
+            break;
+        case CLEND_S:
+            break;
+        case CLSTART_T:
+            break;
+        case CLEND_T:
+            tr = (TestResult *)obj;
+            tr_fprint(file, tr, CK_VERBOSE);
+            break;
+        default:
+            eprintf("Bad event type received in lfile_lfun", __FILE__,
+                    __LINE__);
     }
-    break;
-  case CLEND_S:
-    s = obj;
-    break;
-  case CLSTART_T:
-    break;
-  case CLEND_T:
-    break;
-  default:
-    eprintf("Bad event type received in stdout_lfun", __FILE__, __LINE__);
-  }
-
-  
+
+
 }
 
-void lfile_lfun (SRunner *sr, FILE *file, enum print_output printmode CK_ATTRIBUTE_UNUSED,
-                void *obj, enum cl_event evt)
+void xml_lfun(SRunner * sr CK_ATTRIBUTE_UNUSED, FILE * file,
+              enum print_output printmode CK_ATTRIBUTE_UNUSED, void *obj,
+              enum cl_event evt)
 {
-  TestResult *tr;
-  Suite *s;
-  
-  switch (evt) {
-  case CLINITLOG_SR:
-    break;
-  case CLENDLOG_SR:
-    break;
-  case CLSTART_SR:
-    break;
-  case CLSTART_S:
-    s = obj;
-    fprintf(file, "Running suite %s\n", s->name);
-    break;
-  case CLEND_SR:
-    fprintf (file, "Results for all suites run:\n");
-    srunner_fprint (file, sr, CK_MINIMAL);
-    break;
-  case CLEND_S:
-    s = obj;
-    break;
-  case CLSTART_T:
-    break;
-  case CLEND_T:
-    tr = obj;
-    tr_fprint(file, tr, CK_VERBOSE);
-    break;
-  default:
-    eprintf("Bad event type received in lfile_lfun", __FILE__, __LINE__);
-  }
-
-  
+    TestResult *tr;
+    Suite *s;
+    static struct timespec ts_start = { 0, 0 };
+    static char t[sizeof "yyyy-mm-dd hh:mm:ss"] = { 0 };
+
+    if(t[0] == 0)
+    {
+        struct timeval inittv;
+        struct tm now;
+
+        gettimeofday(&inittv, NULL);
+        clock_gettime(check_get_clockid(), &ts_start);
+        if(localtime_r((const time_t *)&(inittv.tv_sec), &now) != NULL)
+        {
+            strftime(t, sizeof("yyyy-mm-dd hh:mm:ss"), "%Y-%m-%d %H:%M:%S",
+                     &now);
+        }
+    }
+
+    switch (evt)
+    {
+        case CLINITLOG_SR:
+            fprintf(file,
+                   "<?xml version=\"1.0\"?>\n"
+                   "<?xml-stylesheet type=\"text/xsl\" "
+                   "href=\"http://check.sourceforge.net/xml/check_unittest.xslt\"?>\n"
+                   "<testsuites xmlns=\"http://check.sourceforge.net/ns\">\n"
+                   "  <datetime>%s</datetime>\n", t);
+            break;
+        case CLENDLOG_SR:
+        {
+            struct timespec ts_end = { 0, 0 };
+            unsigned long duration;
+
+            /* calculate time the test were running */
+            clock_gettime(check_get_clockid(), &ts_end);
+            duration = (unsigned long)DIFF_IN_USEC(ts_start, ts_end);
+            fprintf(file,
+                   "  <duration>%lu.%06lu</duration>\n"
+                   "</testsuites>\n",
+                    duration / US_PER_SEC, duration % US_PER_SEC);
+        }
+            break;
+        case CLSTART_SR:
+            break;
+        case CLSTART_S:
+            s = (Suite *)obj;
+            fprintf(file,
+                   "  <suite>\n"
+                   "    <title>");
+            fprint_xml_esc(file, s->name);
+            fprintf(file, "</title>\n");
+            break;
+        case CLEND_SR:
+            break;
+        case CLEND_S:
+            fprintf(file, "  </suite>\n");
+            break;
+        case CLSTART_T:
+            break;
+        case CLEND_T:
+            tr = (TestResult *)obj;
+            tr_xmlprint(file, tr, CK_VERBOSE);
+            break;
+        default:
+            eprintf("Bad event type received in xml_lfun", __FILE__,
+                    __LINE__);
+    }
+
 }
 
-void xml_lfun (SRunner *sr CK_ATTRIBUTE_UNUSED, FILE *file, enum print_output printmode CK_ATTRIBUTE_UNUSED,
-                 void *obj, enum cl_event evt)
+void tap_lfun(SRunner * sr CK_ATTRIBUTE_UNUSED, FILE * file,
+              enum print_output printmode CK_ATTRIBUTE_UNUSED, void *obj,
+              enum cl_event evt)
 {
-  TestResult *tr;
-  Suite *s;
-  static struct timeval inittv, endtv;
-  static char t[sizeof "yyyy-mm-dd hh:mm:ss"] = {0};
-
-  if (t[0] == 0)
-  {
-    struct tm now;
-    gettimeofday(&inittv, NULL);
-    localtime_r(&(inittv.tv_sec), &now);
-    strftime(t, sizeof("yyyy-mm-dd hh:mm:ss"), "%Y-%m-%d %H:%M:%S", &now);
-  }
-
-  switch (evt) {
-  case CLINITLOG_SR:
-    fprintf(file, "<?xml version=\"1.0\"?>\n");
-    fprintf(file, "<testsuites xmlns=\"http://check.sourceforge.net/ns\">\n");
-    fprintf(file, "  <datetime>%s</datetime>\n", t);
-    break;
-  case CLENDLOG_SR:
-    gettimeofday(&endtv, NULL);
-    fprintf(file, "  <duration>%f</duration>\n",
-        (endtv.tv_sec + (float)(endtv.tv_usec)/1000000) - \
-        (inittv.tv_sec + (float)(inittv.tv_usec/1000000)));
-    fprintf(file, "</testsuites>\n");
-    break;
-  case CLSTART_SR:
-    break;
-  case CLSTART_S:
-    s = obj;
-    fprintf(file, "  <suite>\n");
-    fprintf(file, "    <title>%s</title>\n", s->name);
-    break;
-  case CLEND_SR:
-    break;
-  case CLEND_S:
-    fprintf(file, "  </suite>\n");
-    s = obj;
-    break;
-  case CLSTART_T:
-    break;
-  case CLEND_T:
-    tr = obj;
-    tr_xmlprint(file, tr, CK_VERBOSE);
-    break;
-  default:
-    eprintf("Bad event type received in xml_lfun", __FILE__, __LINE__);
-  }
+    TestResult *tr;
+
+    static int num_tests_run = 0;
 
+    switch (evt)
+    {
+        case CLINITLOG_SR:
+            /* As this is a new log file, reset the number of tests executed */
+            num_tests_run = 0;
+            break;
+        case CLENDLOG_SR:
+            /* Output the test plan as the last line */
+            fprintf(file, "1..%d\n", num_tests_run);
+            fflush(file);
+            break;
+        case CLSTART_SR:
+            break;
+        case CLSTART_S:
+            break;
+        case CLEND_SR:
+            break;
+        case CLEND_S:
+            break;
+        case CLSTART_T:
+            break;
+        case CLEND_T:
+            /* Print the test result to the tap file */
+            num_tests_run += 1;
+            tr = (TestResult *)obj;
+            fprintf(file, "%s %d - %s:%s:%s: %s\n",
+                    tr->rtype == CK_PASS ? "ok" : "not ok", num_tests_run,
+                    tr->file, tr->tcname, tr->tname, tr->msg);
+            fflush(file);
+            break;
+        default:
+            eprintf("Bad event type received in tap_lfun", __FILE__,
+                    __LINE__);
+    }
 }
 
 #if ENABLE_SUBUNIT
-void subunit_lfun (SRunner *sr, FILE *file, enum print_output printmode,
-                 void *obj, enum cl_event evt)
+void subunit_lfun(SRunner * sr, FILE * file, enum print_output printmode,
+                  void *obj, enum cl_event evt)
 {
-  TestResult *tr;
-  Suite *s;
-  char const * name;
-  
-  /* assert(printmode == CK_SUBUNIT); */
-
-  switch (evt) {
-  case CLINITLOG_SR:
-    break;
-  case CLENDLOG_SR:
-    break;
-  case CLSTART_SR:
-    break;
-  case CLSTART_S:
-    s = obj;
-    break;
-  case CLEND_SR:
-    if (printmode > CK_SILENT) {
-      fprintf (file, "\n");
-      srunner_fprint (file, sr, printmode);
-    }
-    break;
-  case CLEND_S:
-    s = obj;
-    break;
-  case CLSTART_T:
-    name = obj;
-    subunit_test_start(name);
-    break;
-  case CLEND_T:
-    tr = obj;
+    TestResult *tr;
+    char const *name;
+
+    /* assert(printmode == CK_SUBUNIT); */
+
+    switch (evt)
     {
-      char *name = ck_strdup_printf ("%s:%s", tr->tcname, tr->tname);
-      char *msg = tr_short_str (tr);
-      switch (tr->rtype) {
-       case CK_PASS:
-         subunit_test_pass(name);
-         break;
-       case CK_FAILURE:
-         subunit_test_fail(name, msg);
-         break;
-       case CK_ERROR:
-         subunit_test_error(name, msg);
-         break;
-       default:
-         eprintf("Bad result type in subunit_lfun", __FILE__, __LINE__);
-        free(name);
-        free(msg);
-      }
+        case CLINITLOG_SR:
+            break;
+        case CLENDLOG_SR:
+            break;
+        case CLSTART_SR:
+            break;
+        case CLSTART_S:
+            break;
+        case CLEND_SR:
+            if(printmode > CK_SILENT)
+            {
+                fprintf(file, "\n");
+                srunner_fprint(file, sr, printmode);
+            }
+            break;
+        case CLEND_S:
+            break;
+        case CLSTART_T:
+            name = (const char *)obj;
+            subunit_test_start(name);
+            break;
+        case CLEND_T:
+            tr = (TestResult *)obj;
+            {
+                char *name = ck_strdup_printf("%s:%s", tr->tcname, tr->tname);
+                char *msg = tr_short_str(tr);
+
+                switch (tr->rtype)
+                {
+                    case CK_PASS:
+                        subunit_test_pass(name);
+                        break;
+                    case CK_FAILURE:
+                        subunit_test_fail(name, msg);
+                        break;
+                    case CK_ERROR:
+                        subunit_test_error(name, msg);
+                        break;
+                    case CK_TEST_RESULT_INVALID:
+                    default:
+                        eprintf("Bad result type in subunit_lfun", __FILE__,
+                                __LINE__);
+                        free(name);
+                        free(msg);
+                }
+            }
+            break;
+        default:
+            eprintf("Bad event type received in subunit_lfun", __FILE__,
+                    __LINE__);
     }
-    break;
-  default:
-    eprintf("Bad event type received in subunit_lfun", __FILE__, __LINE__);
-  }
 }
 #endif
 
-FILE *srunner_open_lfile (SRunner *sr)
+static FILE *srunner_open_file(const char *filename)
 {
-  FILE *f = NULL;
-  if (srunner_has_log (sr)) {
-    f = fopen(sr->log_fname, "w");
-    if (f == NULL)
-      eprintf ("Error in call to fopen while opening log file %s:", __FILE__, __LINE__ - 2,
-              sr->log_fname);
-  }
-  return f;
+    FILE *f = NULL;
+
+    if(strcmp(filename, STDOUT_OVERRIDE_LOG_FILE_NAME) == 0)
+    {
+        f = stdout;
+    }
+    else
+    {
+        f = fopen(filename, "w");
+        if(f == NULL)
+        {
+            eprintf("Error in call to fopen while opening file %s:", __FILE__,
+                    __LINE__ - 2, filename);
+        }
+    }
+    return f;
 }
 
-FILE *srunner_open_xmlfile (SRunner *sr)
+FILE *srunner_open_lfile(SRunner * sr)
 {
-  FILE *f = NULL;
-  if (srunner_has_xml (sr)) {
-    f = fopen(sr->xml_fname, "w");
-    if (f == NULL)
-      eprintf ("Error in call to fopen while opening xml file %s:", __FILE__, __LINE__ - 2,
-              sr->xml_fname);
-  }
-  return f;
+    FILE *f = NULL;
+
+    if(srunner_has_log(sr))
+    {
+        f = srunner_open_file(srunner_log_fname(sr));
+    }
+    return f;
 }
 
-void srunner_init_logging (SRunner *sr, enum print_output print_mode)
+FILE *srunner_open_xmlfile(SRunner * sr)
 {
-  FILE *f;
-  sr->loglst = check_list_create();
+    FILE *f = NULL;
+
+    if(srunner_has_xml(sr))
+    {
+        f = srunner_open_file(srunner_xml_fname(sr));
+    }
+    return f;
+}
+
+FILE *srunner_open_tapfile(SRunner * sr)
+{
+    FILE *f = NULL;
+
+    if(srunner_has_tap(sr))
+    {
+        f = srunner_open_file(srunner_tap_fname(sr));
+    }
+    return f;
+}
+
+void srunner_init_logging(SRunner * sr, enum print_output print_mode)
+{
+    FILE *f;
+
+    sr->loglst = check_list_create();
 #if ENABLE_SUBUNIT
-  if (print_mode != CK_SUBUNIT)
+    if(print_mode != CK_SUBUNIT)
 #endif
-      srunner_register_lfun (sr, stdout, 0, stdout_lfun, print_mode);
+        srunner_register_lfun(sr, stdout, 0, stdout_lfun, print_mode);
 #if ENABLE_SUBUNIT
-  else
-      srunner_register_lfun (sr, stdout, 0, subunit_lfun, print_mode);
+    else
+        srunner_register_lfun(sr, stdout, 0, subunit_lfun, print_mode);
 #endif
-  f = srunner_open_lfile (sr);
-  if (f) {
-    srunner_register_lfun (sr, f, 1, lfile_lfun, print_mode);
-  }
-  f = srunner_open_xmlfile (sr);
-  if (f) {
-    srunner_register_lfun (sr, f, 2, xml_lfun, print_mode);
-  }
-  srunner_send_evt (sr, NULL, CLINITLOG_SR);
+    f = srunner_open_lfile(sr);
+    if(f)
+    {
+        srunner_register_lfun(sr, f, f != stdout, lfile_lfun, print_mode);
+    }
+    f = srunner_open_xmlfile(sr);
+    if(f)
+    {
+        srunner_register_lfun(sr, f, f != stdout, xml_lfun, print_mode);
+    }
+    f = srunner_open_tapfile(sr);
+    if(f)
+    {
+        srunner_register_lfun(sr, f, f != stdout, tap_lfun, print_mode);
+    }
+    srunner_send_evt(sr, NULL, CLINITLOG_SR);
 }
 
-void srunner_end_logging (SRunner *sr)
+void srunner_end_logging(SRunner * sr)
 {
-  List *l;
-  int rval;
-
-  srunner_send_evt (sr, NULL, CLENDLOG_SR);
-
-  l = sr->loglst;
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    Log *lg = list_val(l);
-    if (lg->close) {
-      rval = fclose (lg->lfile);
-      if (rval != 0)
-       eprintf ("Error in call to fclose while closing log file:", __FILE__, __LINE__ - 2);
+    List *l;
+    int rval;
+
+    srunner_send_evt(sr, NULL, CLENDLOG_SR);
+
+    l = sr->loglst;
+    for(check_list_front(l); !check_list_at_end(l); check_list_advance(l))
+    {
+        Log *lg = (Log *)check_list_val(l);
+
+        if(lg->close)
+        {
+            rval = fclose(lg->lfile);
+            if(rval != 0)
+                eprintf("Error in call to fclose while closing log file:",
+                        __FILE__, __LINE__ - 2);
+        }
+        free(lg);
     }
-    free (lg);
-  }
-  list_free(l);
-  sr->loglst = NULL;
+    check_list_free(l);
+    sr->loglst = NULL;
 }
index 3ed38ee..7223b98 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Check: a unit test framework for C
- * Copyright (C) 2001,2002 Arien Malec
+ * Copyright (C) 2001, 2002 Arien Malec
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_LOG_H
 #define CHECK_LOG_H
 
-void log_srunner_start (SRunner *sr);
-void log_srunner_end (SRunner *sr);
-void log_suite_start (SRunner *sr, Suite *s);
-void log_suite_end (SRunner *sr, Suite *s);
-void log_test_end (SRunner *sr, TestResult *tr);
-void log_test_start (SRunner *sr, TCase *tc, TF *tfun);
+void log_srunner_start(SRunner * sr);
+void log_srunner_end(SRunner * sr);
+void log_suite_start(SRunner * sr, Suite * s);
+void log_suite_end(SRunner * sr, Suite * s);
+void log_test_end(SRunner * sr, TestResult * tr);
+void log_test_start(SRunner * sr, TCase * tc, TF * tfun);
 
-void stdout_lfun (SRunner *sr, FILE *file, enum print_output,
-                 void *obj, enum cl_event evt);
+void stdout_lfun(SRunner * sr, FILE * file, enum print_output,
+                 void *obj, enum cl_event evt);
 
-void lfile_lfun (SRunner *sr, FILE *file, enum print_output,
-                 void *obj, enum cl_event evt);
+void lfile_lfun(SRunner * sr, FILE * file, enum print_output,
+                void *obj, enum cl_event evt);
 
-void xml_lfun (SRunner *sr, FILE *file, enum print_output,
-                 void *obj, enum cl_event evt);
+void xml_lfun(SRunner * sr, FILE * file, enum print_output,
+              void *obj, enum cl_event evt);
 
-void subunit_lfun (SRunner *sr, FILE *file, enum print_output,
-                 void *obj, enum cl_event evt);
+void tap_lfun(SRunner * sr, FILE * file, enum print_output,
+              void *obj, enum cl_event evt);
 
-void srunner_register_lfun (SRunner *sr, FILE *lfile, int close,
-                           LFun lfun, enum print_output);
+void subunit_lfun(SRunner * sr, FILE * file, enum print_output,
+                  void *obj, enum cl_event evt);
 
-FILE *srunner_open_lfile (SRunner *sr);
-FILE *srunner_open_xmlfile (SRunner *sr);
-void srunner_init_logging (SRunner *sr, enum print_output print_mode);
-void srunner_end_logging (SRunner *sr);
+void srunner_register_lfun(SRunner * sr, FILE * lfile, int close,
+                           LFun lfun, enum print_output);
+
+FILE *srunner_open_lfile(SRunner * sr);
+FILE *srunner_open_xmlfile(SRunner * sr);
+FILE *srunner_open_tapfile(SRunner * sr);
+void srunner_init_logging(SRunner * sr, enum print_output print_mode);
+void srunner_end_logging(SRunner * sr);
 
 #endif /* CHECK_LOG_H */
index 89edbd5..9af8827 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Check: a unit test framework for C
- * Copyright (C) 2001 2002, Arien Malec
+ * Copyright (C) 2001, 2002 Arien Malec
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
@@ -31,6 +31,7 @@
 #include "check_impl.h"
 #include "check_msg.h"
 #include "check_pack.h"
+#include "check_str.h"
 
 
 /* 'Pipe' is implemented as a temporary file to overcome message
  */
 
 static FILE *send_file1;
+static char *send_file1_name;
 static FILE *send_file2;
+static char *send_file2_name;
 
-static FILE * get_pipe(void);
-static void setup_pipe (void);
-static void teardown_pipe (void);
-static TestResult *construct_test_result (RcvMsg *rmsg, int waserror);
-static void tr_set_loc_by_ctx (TestResult *tr, enum ck_result_ctx ctx,
-                              RcvMsg *rmsg);
-static FILE * get_pipe(void)
+static FILE *get_pipe(void);
+static void setup_pipe(void);
+static void teardown_pipe(void);
+static TestResult *construct_test_result(RcvMsg * rmsg, int waserror);
+static void tr_set_loc_by_ctx(TestResult * tr, enum ck_result_ctx ctx,
+                              RcvMsg * rmsg);
+static FILE *get_pipe(void)
 {
-  if (send_file2 != 0) {
-    return send_file2;
-  }
-  
-  if (send_file1 != 0) {
-    return send_file1;
-  }
-  
-  eprintf("No messaging setup", __FILE__, __LINE__);
-
-  return NULL;
+    if(send_file2 != 0)
+    {
+        return send_file2;
+    }
+
+    if(send_file1 != 0)
+    {
+        return send_file1;
+    }
+
+    eprintf("Unable to report test progress or a failure; was an ck_assert or ck_abort function called while not running tests?", __FILE__, __LINE__);
+
+    return NULL;
 }
 
 void send_failure_info(const char *msg)
 {
-  FailMsg fmsg;
+    FailMsg fmsg;
+
+    fmsg.msg = strdup(msg);
+    ppack(get_pipe(), CK_MSG_FAIL, (CheckMsg *) & fmsg);
+    free(fmsg.msg);
+}
+
+void send_duration_info(int duration)
+{
+    DurationMsg dmsg;
 
-  fmsg.msg = (char *) msg;
-  ppack(fileno(get_pipe()), CK_MSG_FAIL, (CheckMsg *) &fmsg);
+    dmsg.duration = duration;
+    ppack(get_pipe(), CK_MSG_DURATION, (CheckMsg *) & dmsg);
 }
 
-void send_loc_info(const char * file, int line)
+void send_loc_info(const char *file, int line)
 {
-  LocMsg lmsg;
+    LocMsg lmsg;
 
-  lmsg.file = (char *) file;
-  lmsg.line = line;
-  ppack(fileno(get_pipe()), CK_MSG_LOC, (CheckMsg *) &lmsg);
+    lmsg.file = strdup(file);
+    lmsg.line = line;
+    ppack(get_pipe(), CK_MSG_LOC, (CheckMsg *) & lmsg);
+    free(lmsg.file);
 }
 
 void send_ctx_info(enum ck_result_ctx ctx)
 {
-  CtxMsg cmsg;
+    CtxMsg cmsg;
 
-  cmsg.ctx = ctx;
-  ppack(fileno(get_pipe()), CK_MSG_CTX, (CheckMsg *) &cmsg);
+    cmsg.ctx = ctx;
+    ppack(get_pipe(), CK_MSG_CTX, (CheckMsg *) & cmsg);
 }
 
-TestResult *receive_test_result (int waserror)
+TestResult *receive_test_result(int waserror)
 {
-  FILE *fp;
-  RcvMsg *rmsg;
-  TestResult *result;
-
-  fp = get_pipe();
-  if (fp == NULL)
-    eprintf ("Error in call to get_pipe",__FILE__, __LINE__ - 2);
-  rewind(fp);
-  rmsg = punpack (fileno(fp));
-  teardown_pipe();
-  setup_pipe();
-
-  result = construct_test_result (rmsg, waserror);
-  rcvmsg_free(rmsg);
-  return result;
+    FILE *fp;
+    RcvMsg *rmsg;
+    TestResult *result;
+
+    fp = get_pipe();
+    if(fp == NULL)
+    {
+        eprintf("Error in call to get_pipe", __FILE__, __LINE__ - 2);
+    }
+
+    rewind(fp);
+    rmsg = punpack(fp);
+
+    if(rmsg == NULL)
+    {
+        eprintf("Error in call to punpack", __FILE__, __LINE__ - 4);
+    }
+
+    teardown_pipe();
+    setup_pipe();
+
+    result = construct_test_result(rmsg, waserror);
+    rcvmsg_free(rmsg);
+    return result;
 }
 
-static void tr_set_loc_by_ctx (TestResult *tr, enum ck_result_ctx ctx,
-                              RcvMsg *rmsg)
+static void tr_set_loc_by_ctx(TestResult * tr, enum ck_result_ctx ctx,
+                              RcvMsg * rmsg)
 {
-  if (ctx == CK_CTX_TEST) {
-    tr->file = rmsg->test_file;
-    tr->line = rmsg->test_line;
-    rmsg->test_file = NULL;
-    rmsg->test_line = -1;
-  } else {
-    tr->file = rmsg->fixture_file;
-    tr->line = rmsg->fixture_line;
-    rmsg->fixture_file = NULL;
-    rmsg->fixture_line = -1;
-  }
+    if(ctx == CK_CTX_TEST)
+    {
+        tr->file = rmsg->test_file;
+        tr->line = rmsg->test_line;
+        rmsg->test_file = NULL;
+        rmsg->test_line = -1;
+    }
+    else
+    {
+        tr->file = rmsg->fixture_file;
+        tr->line = rmsg->fixture_line;
+        rmsg->fixture_file = NULL;
+        rmsg->fixture_line = -1;
+    }
 }
 
-static TestResult *construct_test_result (RcvMsg *rmsg, int waserror)
+static TestResult *construct_test_result(RcvMsg * rmsg, int waserror)
 {
-  TestResult *tr;
+    TestResult *tr;
 
-  if (rmsg == NULL)
-    return NULL;
+    if(rmsg == NULL)
+        return NULL;
+
+    tr = tr_create();
+
+    if(rmsg->msg != NULL || waserror)
+    {
+        if(rmsg->failctx != CK_CTX_INVALID)
+        {
+            tr->ctx = rmsg->failctx;
+        }
+        else
+        {
+            tr->ctx = rmsg->lastctx;
+        }
 
-  tr = tr_create();
-
-  if (rmsg->msg != NULL || waserror) {
-    tr->ctx = (cur_fork_status () == CK_FORK) ? rmsg->lastctx : rmsg->failctx;
-    tr->msg = rmsg->msg;
-    rmsg->msg = NULL;
-    tr_set_loc_by_ctx (tr, tr->ctx, rmsg);
-  } else if (rmsg->lastctx == CK_CTX_SETUP) {
-    tr->ctx = CK_CTX_SETUP;
-    tr->msg = NULL;
-    tr_set_loc_by_ctx (tr, CK_CTX_SETUP, rmsg);  
-  } else {
-    tr->ctx = CK_CTX_TEST;
-    tr->msg = NULL;
-    tr_set_loc_by_ctx (tr, CK_CTX_TEST, rmsg);
-  }
-
-  return tr;
+        tr->msg = rmsg->msg;
+        rmsg->msg = NULL;
+        tr_set_loc_by_ctx(tr, tr->ctx, rmsg);
+    }
+    else if(rmsg->lastctx == CK_CTX_SETUP)
+    {
+        tr->ctx = CK_CTX_SETUP;
+        tr->msg = NULL;
+        tr_set_loc_by_ctx(tr, CK_CTX_SETUP, rmsg);
+    }
+    else
+    {
+        tr->ctx = CK_CTX_TEST;
+        tr->msg = NULL;
+        tr->duration = rmsg->duration;
+        tr_set_loc_by_ctx(tr, CK_CTX_TEST, rmsg);
+    }
+
+    return tr;
 }
 
 void setup_messaging(void)
 {
-  setup_pipe();
+    setup_pipe();
 }
 
 void teardown_messaging(void)
 {
-  teardown_pipe();
+    teardown_pipe();
+}
+
+/**
+ * Open a temporary file.
+ *
+ * If the file could be unlinked upon creation, the name
+ * of the file is not returned via 'name'. However, if the
+ * file could not be unlinked, the name is returned,
+ * expecting the caller to both delete the file and
+ * free the 'name' field after the file is closed.
+ */
+FILE *open_tmp_file(char **name)
+{
+    FILE *file = NULL;
+
+    *name = NULL;
+
+#if !HAVE_MKSTEMP
+    /* Windows does not like tmpfile(). This is likely because tmpfile()
+     * call unlink() on the file before returning it, to make sure the
+     * file is deleted when it is closed. The unlink() call also fails
+     * on Windows if the file is still open. */
+    /* also note that mkstemp is apparently a C90 replacement for tmpfile */
+    /* perhaps all we need to do on Windows is set TMPDIR to whatever is
+       stored in TEMP for tmpfile to work */
+    /* and finally, the "b" from "w+b" is ignored on OS X, not sure about WIN32 */
+
+    file = tmpfile();
+    if(file == NULL)
+    {
+        /*
+         * The heuristic for selecting a temporary folder is as follows:
+         * 1) If the TEMP environment variable is defined, use that directory.
+         * 2) If the P_tmpdir macro is defined, use that directory.
+         * 3) If the TMPDIR environment variable is defined, use that directory.
+         * 4) Use the platform defined temporary directory, or the current directory.
+         */
+        char *tmp = getenv("TEMP");
+        char *tmp_file = tempnam(tmp, "check_");
+
+        /*
+         * Note, tempnam is not enough to get a unique name. Between
+         * getting the name and opening the file, something else also
+         * calling tempnam() could get the same name. It has been observed
+         * on MinGW-w64 builds on Wine that this exact thing happens
+         * if multiple instances of a unit tests are running concurrently.
+         * To prevent two concurrent unit tests from getting the same file,
+         * we append the pid to the file. The pid should be unique on the
+         * system.
+         */
+        char *uniq_tmp_file = ck_strdup_printf("%s.%d", tmp_file, getpid());
+
+        file = fopen(uniq_tmp_file, "w+b");
+        *name = uniq_tmp_file;
+        free(tmp_file);
+    }
+#else
+    /*
+     * The heuristic for selecting a temporary folder is as follows:
+     * 1) If the TEMP environment variable is defined, use that directory.
+     * 2) If the P_tmpdir macro is defined, use that directory.
+     * 3) If the TMPDIR environment variable is defined, use that directory.
+     * 4) Use the current directory
+     */
+
+    int fd = -1;
+    const char *tmp_dir = getenv ("TEMP");
+#ifdef P_tmpdir
+    if (tmp_dir == NULL)
+    {
+        tmp_dir = P_tmpdir;
+    }
+#endif /*P_tmpdir*/
+    if (tmp_dir == NULL)
+    {
+        tmp_dir = getenv ("TMPDIR");
+    }
+    if (tmp_dir == NULL)
+    {
+        tmp_dir = ".";
+    }
+
+    *name = ck_strdup_printf ("%s/check_XXXXXX", tmp_dir);
+
+    if (-1 < (fd = mkstemp (*name)))
+    {
+        file = fdopen (fd, "w+b");
+        if (0 == unlink (*name) || NULL == file)
+        {
+            free (*name);
+            *name = NULL;
+        }
+    }
+#endif
+    return file;
 }
 
 static void setup_pipe(void)
 {
-  if (send_file1 != 0) {
-    if (send_file2 != 0)
-      eprintf("Only one nesting of suite runs supported", __FILE__, __LINE__);
-    send_file2 = tmpfile();
-  } else {
-    send_file1 = tmpfile();
-  }
+    if(send_file1 == NULL)
+    {
+        send_file1 = open_tmp_file(&send_file1_name);
+        if(send_file1 == NULL)
+        {
+            eprintf("Unable to create temporary file for communication; may not have permissions to do so", __FILE__, __LINE__ -3);
+        }
+        return;
+    }
+    if(send_file2 == NULL)
+    {
+        send_file2 = open_tmp_file(&send_file2_name);
+        if(send_file2 == NULL)
+        {
+            eprintf("Unable to create temporary file for communication; may not have permissions to do so", __FILE__, __LINE__ -3);
+        }
+        return;
+    }
+    eprintf("Only one nesting of suite runs supported", __FILE__, __LINE__);
 }
 
 static void teardown_pipe(void)
 {
-  if (send_file2 != 0) {
-    fclose(send_file2);
-    send_file2 = 0;
-  } else if (send_file1 != 0) {
-    fclose(send_file1);
-    send_file1 = 0;
-  } else {
-    eprintf("No messaging setup", __FILE__, __LINE__);
-  }
+    if(send_file2 != 0)
+    {
+        fclose(send_file2);
+        send_file2 = 0;
+        if(send_file2_name != NULL)
+        {
+            unlink(send_file2_name);
+            free(send_file2_name);
+            send_file2_name = NULL;
+        }
+    }
+    else if(send_file1 != 0)
+    {
+        fclose(send_file1);
+        send_file1 = 0;
+        if(send_file1_name != NULL)
+        {
+            unlink(send_file1_name);
+            free(send_file1_name);
+            send_file1_name = NULL;
+        }
+    }
+    else
+    {
+        eprintf("No messaging setup", __FILE__, __LINE__);
+    }
 }
-
index c4d7f25..c66a35a 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_MSG_NEW_H
 void send_failure_info(const char *msg);
 void send_loc_info(const char *file, int line);
 void send_ctx_info(enum ck_result_ctx ctx);
+void send_duration_info(int duration);
 
 TestResult *receive_test_result(int waserror);
 
 void setup_messaging(void);
 void teardown_messaging(void);
 
+FILE *open_tmp_file(char **name);
+
 #endif /*CHECK_MSG_NEW_H */
index 4fde572..0fe1774 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
 #include <string.h>
 #include <stdio.h>
 
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
 #include "check.h"
 #include "check_error.h"
 #include "check_list.h"
 #include "check_impl.h"
 #include "check_pack.h"
 
-#ifdef HAVE_PTHREAD
-pthread_mutex_t lock_mutex = PTHREAD_MUTEX_INITIALIZER;
-#else
+#ifndef HAVE_PTHREAD
 #define pthread_mutex_lock(arg)
 #define pthread_mutex_unlock(arg)
+#define pthread_cleanup_push(f, a) {
+#define pthread_cleanup_pop(e) }
 #endif
 
-/* typedef an unsigned int that has at least 4 bytes */
-typedef uint32_t ck_uint32;
-
+/* Maximum size for one message in the message stream. */
+static size_t ck_max_msg_size = 0;
+#ifndef DEFAULT_MAX_MSG_SIZE
+#define DEFAULT_MAX_MSG_SIZE 4096
+#endif
+/* This is used to implement a sliding window on the receiving
+ * side. When sending messages, we assure that no single message
+ * is bigger than this.
+ * The usual size for a message is less than 80 bytes.
+ * All this is done instead of the previous approach to allocate (actually
+ * continuously reallocate) one big chunk for the whole message stream.
+ * Problems were seen in the wild with up to 4 GB reallocations.
+ */
 
-static void  pack_int   (char **buf, int val);
-static int   upack_int  (char **buf);
-static void  pack_str   (char **buf, const char *str);
-static char *upack_str  (char **buf);
+void check_set_max_msg_size(size_t max_msg_size)
+{
+    ck_max_msg_size = max_msg_size;
+}
 
-static int   pack_ctx   (char **buf, CtxMsg  *cmsg);
-static int   pack_loc   (char **buf, LocMsg  *lmsg);
-static int   pack_fail  (char **buf, FailMsg *fmsg);
-static void  upack_ctx  (char **buf, CtxMsg  *cmsg);
-static void  upack_loc  (char **buf, LocMsg  *lmsg);
-static void  upack_fail (char **buf, FailMsg *fmsg);
+static size_t get_max_msg_size(void)
+{
+    size_t value = 0;
+    char *env = getenv("CK_MAX_MSG_SIZE");
+    if (env)
+        value = (size_t)strtoul(env, NULL, 10); // Cast in case size_t != unsigned long.
+    if (value == 0)
+        value = ck_max_msg_size;
+    if (value == 0)
+        value = DEFAULT_MAX_MSG_SIZE;
+    return value;
+}
 
-static void  check_type (int type, const char *file, int line);
-static enum ck_msg_type upack_type (char **buf);
-static void  pack_type  (char **buf, enum ck_msg_type type);
+/* typedef an unsigned int that has at least 4 bytes */
+typedef uint32_t ck_uint32;
 
-static int   read_buf   (int fdes, char **buf);
-static int   get_result (char *buf, RcvMsg *rmsg);
-static void  rcvmsg_update_ctx (RcvMsg *rmsg, enum ck_result_ctx ctx);
-static void  rcvmsg_update_loc (RcvMsg *rmsg, const char *file, int line);
-static RcvMsg *rcvmsg_create (void);
-void rcvmsg_free (RcvMsg *rmsg);
 
-typedef int  (*pfun)  (char **, CheckMsg *);
+static void pack_int(char **buf, int val);
+static int upack_int(char **buf);
+static void pack_str(char **buf, const char *str);
+static char *upack_str(char **buf);
+
+static int pack_ctx(char **buf, CtxMsg * cmsg);
+static int pack_loc(char **buf, LocMsg * lmsg);
+static int pack_fail(char **buf, FailMsg * fmsg);
+static int pack_duration(char **buf, DurationMsg * fmsg);
+static void upack_ctx(char **buf, CtxMsg * cmsg);
+static void upack_loc(char **buf, LocMsg * lmsg);
+static void upack_fail(char **buf, FailMsg * fmsg);
+static void upack_duration(char **buf, DurationMsg * fmsg);
+
+static void check_type(int type, const char *file, int line);
+static enum ck_msg_type upack_type(char **buf);
+static void pack_type(char **buf, enum ck_msg_type type);
+
+static int read_buf(FILE * fdes, int size, char *buf);
+static int get_result(char *buf, RcvMsg * rmsg);
+static void rcvmsg_update_ctx(RcvMsg * rmsg, enum ck_result_ctx ctx);
+static void rcvmsg_update_loc(RcvMsg * rmsg, const char *file, int line);
+static RcvMsg *rcvmsg_create(void);
+void rcvmsg_free(RcvMsg * rmsg);
+
+typedef int (*pfun) (char **, CheckMsg *);
 typedef void (*upfun) (char **, CheckMsg *);
 
-static pfun pftab [] = {
-  (pfun) pack_ctx,
-  (pfun) pack_fail,
-  (pfun) pack_loc
+static pfun pftab[] = {
+    (pfun) pack_ctx,
+    (pfun) pack_fail,
+    (pfun) pack_loc,
+    (pfun) pack_duration
 };
 
-static upfun upftab [] = {
-  (upfun) upack_ctx,
-  (upfun) upack_fail,
-  (upfun) upack_loc
+static upfun upftab[] = {
+    (upfun) upack_ctx,
+    (upfun) upack_fail,
+    (upfun) upack_loc,
+    (upfun) upack_duration
 };
 
-int pack (enum ck_msg_type type, char **buf, CheckMsg *msg)
+int pack(enum ck_msg_type type, char **buf, CheckMsg * msg)
 {
-  if (buf == NULL)
-    return -1;
-  if (msg == NULL)
-    return 0;
+    if(buf == NULL)
+        return -1;
+    if(msg == NULL)
+        return 0;
 
-  check_type (type, __FILE__, __LINE__);
+    check_type(type, __FILE__, __LINE__);
 
-  return pftab[type] (buf, msg);
+    return pftab[type] (buf, msg);
 }
 
-int upack (char *buf, CheckMsg *msg, enum ck_msg_type *type)
+int upack(char *buf, CheckMsg * msg, enum ck_msg_type *type)
 {
-  char *obuf;
-  int nread;
+    char *obuf;
+
+    if(buf == NULL)
+        return -1;
 
-  if (buf == NULL)
-    return -1;
+    obuf = buf;
 
-  obuf = buf;
+    *type = upack_type(&buf);
 
-  *type = upack_type (&buf);
+    check_type(*type, __FILE__, __LINE__);
 
-  check_type (*type, __FILE__, __LINE__);
-  
-  upftab[*type] (&buf, msg);
+    upftab[*type] (&buf, msg);
 
-  nread = buf - obuf;
-  return nread;
+    return buf - obuf;
 }
 
-static void pack_int (char **buf, int val)
+static void pack_int(char **buf, int val)
 {
-  unsigned char *ubuf = (unsigned char *) *buf;
-  ck_uint32 uval = val;
+    unsigned char *ubuf = (unsigned char *)*buf;
+    ck_uint32 uval = val;
 
-  ubuf[0] = (uval >> 24) & 0xFF;
-  ubuf[1] = (uval >> 16) & 0xFF;
-  ubuf[2] = (uval >> 8)  & 0xFF;
-  ubuf[3] = uval & 0xFF;
+    ubuf[0] = (unsigned char)((uval >> 24) & 0xFF);
+    ubuf[1] = (unsigned char)((uval >> 16) & 0xFF);
+    ubuf[2] = (unsigned char)((uval >> 8) & 0xFF);
+    ubuf[3] = (unsigned char)(uval & 0xFF);
 
-  *buf += 4;
+    *buf += 4;
 }
 
-static int upack_int (char **buf)
+static int upack_int(char **buf)
 {
-  unsigned char *ubuf = (unsigned char *) *buf;
-  ck_uint32 uval;
+    unsigned char *ubuf = (unsigned char *)*buf;
+    ck_uint32 uval;
 
-  uval = ((ubuf[0] << 24) | (ubuf[1] << 16) | (ubuf[2] << 8) | ubuf[3]);
+    uval =
+        (ck_uint32) ((ubuf[0] << 24) | (ubuf[1] << 16) | (ubuf[2] << 8) |
+                     ubuf[3]);
 
-  *buf += 4;
+    *buf += 4;
 
-  return (int) uval;
+    return (int)uval;
 }
 
-static void pack_str (char **buf, const char *val)
+static void pack_str(char **buf, const char *val)
 {
-  int strsz;
+    int strsz;
 
-  if (val == NULL)
-    strsz = 0;
-  else
-    strsz = strlen (val);
+    if(val == NULL)
+        strsz = 0;
+    else
+        strsz = strlen(val);
 
-  pack_int (buf, strsz);  
+    pack_int(buf, strsz);
 
-  if (strsz > 0) {
-    memcpy (*buf, val, strsz);
-    *buf += strsz;
-  } 
+    if(strsz > 0)
+    {
+        memcpy(*buf, val, strsz);
+        *buf += strsz;
+    }
 }
 
-static char *upack_str (char **buf)
+static char *upack_str(char **buf)
 {
-  char *val;
-  int strsz;
-
-  strsz = upack_int (buf);
-
-  if (strsz > 0) {
-    val = emalloc (strsz + 1);
-    memcpy (val, *buf, strsz);
-    val[strsz] = 0;
-    *buf += strsz;
-  } else {
-    val = emalloc (1);
-    *val = 0;
-  }
-
-  return val;
+    char *val;
+    int strsz;
+
+    strsz = upack_int(buf);
+
+    if(strsz > 0)
+    {
+        val = (char *)emalloc(strsz + 1);
+        memcpy(val, *buf, strsz);
+        val[strsz] = 0;
+        *buf += strsz;
+    }
+    else
+    {
+        val = (char *)emalloc(1);
+        *val = 0;
+    }
+
+    return val;
+}
+
+static void pack_type(char **buf, enum ck_msg_type type)
+{
+    pack_int(buf, (int)type);
 }
 
-static void pack_type (char **buf, enum ck_msg_type type)
+static enum ck_msg_type upack_type(char **buf)
 {
-  pack_int (buf, (int) type);
+    return (enum ck_msg_type)upack_int(buf);
 }
 
-static enum ck_msg_type upack_type (char **buf)
+
+static int pack_ctx(char **buf, CtxMsg * cmsg)
 {
-  return (enum ck_msg_type) upack_int (buf);
+    char *ptr;
+    int len;
+
+    len = 4 + 4;
+    *buf = ptr = (char *)emalloc(len);
+
+    pack_type(&ptr, CK_MSG_CTX);
+    pack_int(&ptr, (int)cmsg->ctx);
+
+    return len;
 }
 
-  
-static int pack_ctx (char **buf, CtxMsg *cmsg)
+static void upack_ctx(char **buf, CtxMsg * cmsg)
 {
-  char *ptr;
-  int len;
+    cmsg->ctx = (enum ck_result_ctx)upack_int(buf);
+}
+
+static int pack_duration(char **buf, DurationMsg * cmsg)
+{
+    char *ptr;
+    int len;
+
+    len = 4 + 4;
+    *buf = ptr = (char *)emalloc(len);
 
-  len = 4 + 4;
-  *buf = ptr = emalloc (len);
-  
-  pack_type (&ptr, CK_MSG_CTX);
-  pack_int (&ptr, (int) cmsg->ctx);
+    pack_type(&ptr, CK_MSG_DURATION);
+    pack_int(&ptr, cmsg->duration);
 
-  return len;
+    return len;
 }
 
-static void upack_ctx (char **buf, CtxMsg *cmsg)
+static void upack_duration(char **buf, DurationMsg * cmsg)
 {
-  cmsg->ctx = upack_int (buf);
+    cmsg->duration = upack_int(buf);
 }
 
-static int pack_loc (char **buf, LocMsg *lmsg)
+static int pack_loc(char **buf, LocMsg * lmsg)
 {
-  char *ptr;
-  int len;
+    char *ptr;
+    int len;
 
-  len = 4 + 4 + (lmsg->file ? strlen (lmsg->file) : 0) + 4;
-  *buf = ptr = emalloc (len);
+    len = 4 + 4 + (lmsg->file ? strlen(lmsg->file) : 0) + 4;
+    *buf = ptr = (char *)emalloc(len);
 
-  pack_type (&ptr, CK_MSG_LOC);
-  pack_str (&ptr, lmsg->file);
-  pack_int (&ptr, lmsg->line);
+    pack_type(&ptr, CK_MSG_LOC);
+    pack_str(&ptr, lmsg->file);
+    pack_int(&ptr, lmsg->line);
 
-  return len;
+    return len;
 }
 
-static void upack_loc (char **buf, LocMsg *lmsg)
+static void upack_loc(char **buf, LocMsg * lmsg)
 {
-  lmsg->file = upack_str (buf);
-  lmsg->line = upack_int (buf);
+    lmsg->file = upack_str(buf);
+    lmsg->line = upack_int(buf);
 }
 
-static int pack_fail (char **buf, FailMsg *fmsg)
+static int pack_fail(char **buf, FailMsg * fmsg)
 {
-  char *ptr;
-  int len;
+    char *ptr;
+    int len;
 
-  len = 4 + 4 + (fmsg->msg ? strlen (fmsg->msg) : 0);
-  *buf = ptr = emalloc (len);
+    len = 4 + 4 + (fmsg->msg ? strlen(fmsg->msg) : 0);
+    *buf = ptr = (char *)emalloc(len);
 
-  pack_type (&ptr, CK_MSG_FAIL);
-  pack_str (&ptr, fmsg->msg);
+    pack_type(&ptr, CK_MSG_FAIL);
+    pack_str(&ptr, fmsg->msg);
 
-  return len;
+    return len;
 }
 
-static void upack_fail (char **buf, FailMsg *fmsg)
+static void upack_fail(char **buf, FailMsg * fmsg)
 {
-  fmsg->msg = upack_str (buf);
+    fmsg->msg = upack_str(buf);
 }
 
-static void check_type (int type, const char *file, int line)
+static void check_type(int type, const char *file, int line)
 {
-  if (type < 0 || type >= CK_MSG_LAST)
-    eprintf ("Bad message type arg %d", file, line, type);
+    if(type < 0 || type >= CK_MSG_LAST)
+        eprintf("Bad message type arg %d", file, line, type);
 }
 
 #ifdef HAVE_PTHREAD
-pthread_mutex_t mutex_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t ck_mutex_lock = PTHREAD_MUTEX_INITIALIZER;
+static void ppack_cleanup(void *mutex)
+{
+    pthread_mutex_unlock((pthread_mutex_t *)mutex);
+}
 #endif
 
-void ppack (int fdes, enum ck_msg_type type, CheckMsg *msg)
+void ppack(FILE * fdes, enum ck_msg_type type, CheckMsg * msg)
 {
-  char *buf;
-  int n;
-  ssize_t r;
-
-  n = pack (type, &buf, msg);
-  pthread_mutex_lock(&mutex_lock);
-  r = write (fdes, buf, n);
-  pthread_mutex_unlock(&mutex_lock);
-  if (r == -1)
-    eprintf ("Error in call to write:", __FILE__, __LINE__ - 2);
-
-  free (buf);
+    char *buf = NULL;
+    int n;
+    ssize_t r;
+
+    n = pack(type, &buf, msg);
+    /* Keep it on the safe side to not send too much data. */
+    if(n > get_max_msg_size())
+        eprintf("Message string too long", __FILE__, __LINE__ - 2);
+
+    pthread_cleanup_push(ppack_cleanup, &ck_mutex_lock);
+    pthread_mutex_lock(&ck_mutex_lock);
+    r = fwrite(buf, 1, n, fdes);
+    fflush(fdes);
+    pthread_mutex_unlock(&ck_mutex_lock);
+    pthread_cleanup_pop(0);
+    if(r != n)
+        eprintf("Error in call to fwrite:", __FILE__, __LINE__ - 2);
+
+    free(buf);
 }
 
-static int read_buf (int fdes, char **buf)
+static int read_buf(FILE * fdes, int size, char *buf)
 {
-  char *readloc;
-  int n;
-  int nread = 0;
-  int size = 1;
-  int grow = 2;
-  
-  *buf = emalloc(size);
-  readloc = *buf;
-  while (1) {
-    n = read (fdes, readloc, size - nread);
-    if (n == 0)
-      break;
-    if (n == -1)
-      eprintf ("Error in call to read:", __FILE__, __LINE__ - 4);
-
-    nread += n;
-    size *= grow;
-    *buf = erealloc (*buf,size);
-    readloc = *buf + nread;
-  }
-
-  return nread;
-}    
-
-
-static int get_result (char *buf, RcvMsg *rmsg)
+    int n;
+
+    n = fread(buf, 1, size, fdes);
+
+    if(ferror(fdes))
+    {
+        eprintf("Error in call to fread:", __FILE__, __LINE__ - 4);
+    }
+
+    return n;
+}
+
+static int get_result(char *buf, RcvMsg * rmsg)
 {
-  enum ck_msg_type type;
-  CheckMsg msg;
-  int n;
-
-  n = upack (buf, &msg, &type);
-  if (n == -1)
-    eprintf ("Error in call to upack", __FILE__, __LINE__ - 2);
-  
-  if (type == CK_MSG_CTX) {
-    CtxMsg *cmsg = (CtxMsg *) &msg;
-    rcvmsg_update_ctx (rmsg, cmsg->ctx);
-  } else if (type == CK_MSG_LOC) {
-    LocMsg *lmsg = (LocMsg *) &msg;
-    if (rmsg->failctx == CK_CTX_INVALID)
+    enum ck_msg_type type;
+    CheckMsg msg;
+    int n;
+
+    n = upack(buf, &msg, &type);
+    if(n == -1)
+        eprintf("Error in call to upack", __FILE__, __LINE__ - 2);
+
+    if(type == CK_MSG_CTX)
     {
-      rcvmsg_update_loc (rmsg, lmsg->file, lmsg->line);
+        CtxMsg *cmsg = (CtxMsg *) & msg;
+
+        rcvmsg_update_ctx(rmsg, cmsg->ctx);
     }
-    free (lmsg->file);
-  } else if (type == CK_MSG_FAIL) {      
-    FailMsg *fmsg = (FailMsg *) &msg;
-    if (rmsg->msg == NULL)
+    else if(type == CK_MSG_LOC)
     {
-      rmsg->msg = emalloc (strlen (fmsg->msg) + 1);
-      strcpy (rmsg->msg, fmsg->msg);
-      rmsg->failctx = rmsg->lastctx;
+        LocMsg *lmsg = (LocMsg *) & msg;
+
+        if(rmsg->failctx == CK_CTX_INVALID)
+        {
+            rcvmsg_update_loc(rmsg, lmsg->file, lmsg->line);
+        }
+        free(lmsg->file);
     }
-    else
+    else if(type == CK_MSG_FAIL)
     {
-      /* Skip subsequent failure messages, only happens for CK_NOFORK */
+        FailMsg *fmsg = (FailMsg *) & msg;
+
+        if(rmsg->msg == NULL)
+        {
+            rmsg->msg = strdup(fmsg->msg);
+            rmsg->failctx = rmsg->lastctx;
+        }
+        else
+        {
+            /* Skip subsequent failure messages, only happens for CK_NOFORK */
+        }
+        free(fmsg->msg);
     }
-    free (fmsg->msg);
-  } else
-    check_type (type, __FILE__, __LINE__);
+    else if(type == CK_MSG_DURATION)
+    {
+        DurationMsg *cmsg = (DurationMsg *) & msg;
 
-  return n;
+        rmsg->duration = cmsg->duration;
+    }
+    else
+        check_type(type, __FILE__, __LINE__);
+
+    return n;
 }
 
-static void reset_rcv_test (RcvMsg *rmsg)
+static void reset_rcv_test(RcvMsg * rmsg)
 {
-  rmsg->test_line = -1;
-  rmsg->test_file = NULL;
+    rmsg->test_line = -1;
+    rmsg->test_file = NULL;
 }
 
-static void reset_rcv_fixture (RcvMsg *rmsg)
+static void reset_rcv_fixture(RcvMsg * rmsg)
 {
-  rmsg->fixture_line = -1;
-  rmsg->fixture_file = NULL;
+    rmsg->fixture_line = -1;
+    rmsg->fixture_file = NULL;
 }
 
-static RcvMsg *rcvmsg_create (void)
+static RcvMsg *rcvmsg_create(void)
 {
-  RcvMsg *rmsg;
-
-  rmsg = emalloc (sizeof (RcvMsg));
-  rmsg->lastctx = CK_CTX_INVALID;
-  rmsg->failctx = CK_CTX_INVALID;
-  rmsg->msg = NULL;
-  reset_rcv_test (rmsg);
-  reset_rcv_fixture (rmsg);
-  return rmsg;
+    RcvMsg *rmsg;
+
+    rmsg = (RcvMsg *)emalloc(sizeof(RcvMsg));
+    rmsg->lastctx = CK_CTX_INVALID;
+    rmsg->failctx = CK_CTX_INVALID;
+    rmsg->msg = NULL;
+    rmsg->duration = -1;
+    reset_rcv_test(rmsg);
+    reset_rcv_fixture(rmsg);
+    return rmsg;
 }
 
-void rcvmsg_free (RcvMsg *rmsg)
+void rcvmsg_free(RcvMsg * rmsg)
 {
-  free(rmsg->fixture_file);
-  free(rmsg->test_file);
-  free(rmsg->msg);
-  free(rmsg);
+    free(rmsg->fixture_file);
+    free(rmsg->test_file);
+    free(rmsg->msg);
+    free(rmsg);
 }
 
-static void rcvmsg_update_ctx (RcvMsg *rmsg, enum ck_result_ctx ctx)
+static void rcvmsg_update_ctx(RcvMsg * rmsg, enum ck_result_ctx ctx)
 {
-  if (rmsg->lastctx != CK_CTX_INVALID)
-  {
-    free(rmsg->fixture_file);
-    reset_rcv_fixture (rmsg);
-  }
-  rmsg->lastctx = ctx;
+    if(rmsg->lastctx != CK_CTX_INVALID)
+    {
+        free(rmsg->fixture_file);
+        reset_rcv_fixture(rmsg);
+    }
+    rmsg->lastctx = ctx;
 }
 
-static void rcvmsg_update_loc (RcvMsg *rmsg, const char *file, int line)
+static void rcvmsg_update_loc(RcvMsg * rmsg, const char *file, int line)
 {
-  int flen = strlen(file);
-  
-  if (rmsg->lastctx == CK_CTX_TEST) {
-    free(rmsg->test_file);
-    rmsg->test_line = line;
-    rmsg->test_file = emalloc (flen + 1);
-    strcpy (rmsg->test_file, file);
-  } else {
-    free(rmsg->fixture_file);
-    rmsg->fixture_line = line;
-    rmsg->fixture_file = emalloc (flen + 1);
-    strcpy (rmsg->fixture_file, file);
-  }
+    if(rmsg->lastctx == CK_CTX_TEST)
+    {
+        free(rmsg->test_file);
+        rmsg->test_line = line;
+        rmsg->test_file = strdup(file);
+    }
+    else
+    {
+        free(rmsg->fixture_file);
+        rmsg->fixture_line = line;
+        rmsg->fixture_file = strdup(file);
+    }
 }
-  
-RcvMsg *punpack (int fdes)
+
+RcvMsg *punpack(FILE * fdes)
 {
-  int nread, n;
-  char *buf;
-  char *obuf;
-  RcvMsg *rmsg;
-
-  nread = read_buf (fdes, &buf);
-  obuf = buf;
-  rmsg = rcvmsg_create ();
-  
-  while (nread > 0) {
-    n = get_result (buf, rmsg);
-    nread -= n;
-    buf += n;
-  }
-
-  free (obuf);
-  if (rmsg->lastctx == CK_CTX_INVALID) {
-    free (rmsg);
-    rmsg = NULL;
-  }
-
-  return rmsg;
+    int nread, nparse, n;
+    char *buf;
+    RcvMsg *rmsg;
+
+    rmsg = rcvmsg_create();
+
+    /* Allcate a buffer */
+    buf = (char *)emalloc(get_max_msg_size() * 2);
+    /* Fill the buffer from the file */
+    nread = read_buf(fdes, get_max_msg_size() * 2, buf);
+    nparse = nread;
+    /* While not all parsed */
+    while(nparse > 0)
+    {
+        /* Parse one message */
+        n = get_result(buf, rmsg);
+        nparse -= n;
+        if (nparse < 0)
+            eprintf("Error in call to get_result", __FILE__, __LINE__ - 3);
+        /* Move remaining data in buffer to the beginning */
+        memmove(buf, buf + n, nparse);
+        /* If EOF has not been seen */
+        if(nread > 0)
+        {
+            /* Read more data into empty space at end of the buffer */
+            nread = read_buf(fdes, n, buf + nparse);
+            nparse += nread;
+        }
+    }
+    free(buf);
+
+    if(rmsg->lastctx == CK_CTX_INVALID)
+    {
+        free(rmsg);
+        rmsg = NULL;
+    }
+
+    return rmsg;
 }
index 0b78695..3d469d2 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_PACK_H
 #define CHECK_PACK_H
 
 
-enum ck_msg_type {
-  CK_MSG_CTX,
-  CK_MSG_FAIL,
-  CK_MSG_LOC,
-  CK_MSG_LAST
+enum ck_msg_type
+{
+    CK_MSG_CTX,
+    CK_MSG_FAIL,
+    CK_MSG_LOC,
+    CK_MSG_DURATION,
+    CK_MSG_LAST
 };
 
 typedef struct CtxMsg
 {
-  enum ck_result_ctx ctx;
+    enum ck_result_ctx ctx;
 } CtxMsg;
 
-typedef struct LocMsg 
+typedef struct LocMsg
 {
-  int line;
-  char *file;
+    int line;
+    char *file;
 } LocMsg;
 
 typedef struct FailMsg
 {
-  char *msg;
+    char *msg;
 } FailMsg;
 
+typedef struct DurationMsg
+{
+    int duration;
+} DurationMsg;
+
 typedef union
 {
-  CtxMsg  ctx_msg;
-  FailMsg fail_msg;
-  LocMsg  loc_msg;
+    CtxMsg ctx_msg;
+    FailMsg fail_msg;
+    LocMsg loc_msg;
+    DurationMsg duration_msg;
 } CheckMsg;
 
 typedef struct RcvMsg
 {
-  enum ck_result_ctx lastctx;
-  enum ck_result_ctx failctx;
-  char *fixture_file;
-  int fixture_line;
-  char *test_file;
-  int test_line;
-  char *msg;
+    enum ck_result_ctx lastctx;
+    enum ck_result_ctx failctx;
+    char *fixture_file;
+    int fixture_line;
+    char *test_file;
+    int test_line;
+    char *msg;
+    int duration;
 } RcvMsg;
 
-void rcvmsg_free (RcvMsg *rmsg);
+void rcvmsg_free(RcvMsg * rmsg);
 
-  
-int pack (enum ck_msg_type type, char **buf, CheckMsg *msg);
-int upack (char *buf, CheckMsg *msg, enum ck_msg_type *type);
 
-void ppack (int fdes, enum ck_msg_type type, CheckMsg *msg);
-RcvMsg *punpack (int fdes);
+int pack(enum ck_msg_type type, char **buf, CheckMsg * msg);
+int upack(char *buf, CheckMsg * msg, enum ck_msg_type *type);
 
+void ppack(FILE * fdes, enum ck_msg_type type, CheckMsg * msg);
+RcvMsg *punpack(FILE * fdes);
 
 #endif /*CHECK_PACK_H */
index dd9000c..35f13b6 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
 #include "check_str.h"
 #include "check_print.h"
 
-static void srunner_fprint_summary (FILE *file, SRunner *sr,
-                                   enum print_output print_mode);
-static void srunner_fprint_results (FILE *file, SRunner *sr,
-                                   enum print_output print_mode);
+static void srunner_fprint_summary(FILE * file, SRunner * sr,
+                                   enum print_output print_mode);
+static void srunner_fprint_results(FILE * file, SRunner * sr,
+                                   enum print_output print_mode);
 
 
-void srunner_print (SRunner *sr, enum print_output print_mode)
+void srunner_print(SRunner * sr, enum print_output print_mode)
 {
-  srunner_fprint (stdout, sr, print_mode);
+    srunner_fprint(stdout, sr, print_mode);
 }
 
-void srunner_fprint (FILE *file, SRunner *sr, enum print_output print_mode)
+void srunner_fprint(FILE * file, SRunner * sr, enum print_output print_mode)
 {
-  if (print_mode == CK_ENV) {
-    print_mode = get_env_printmode();
-  }
+    if(print_mode == CK_ENV)
+    {
+        print_mode = get_env_printmode();
+    }
 
-  srunner_fprint_summary (file, sr, print_mode);
-  srunner_fprint_results (file, sr, print_mode);
+    srunner_fprint_summary(file, sr, print_mode);
+    srunner_fprint_results(file, sr, print_mode);
 }
 
-static void srunner_fprint_summary (FILE *file, SRunner *sr,
-                                   enum print_output print_mode)
+static void srunner_fprint_summary(FILE * file, SRunner * sr,
+                                   enum print_output print_mode)
 {
 #if ENABLE_SUBUNIT
-  if (print_mode == CK_SUBUNIT)
-      return;
+    if(print_mode == CK_SUBUNIT)
+        return;
 #endif
 
-  if (print_mode >= CK_MINIMAL) {
-    char *str;
+    if(print_mode >= CK_MINIMAL)
+    {
+        char *str;
 
-    str = sr_stat_str (sr);
-    fprintf (file, "%s\n", str);
-    free(str);
-  }
-  return;
+        str = sr_stat_str(sr);
+        fprintf(file, "%s\n", str);
+        free(str);
+    }
+    return;
 }
 
-static void srunner_fprint_results (FILE *file, SRunner *sr,
-                                   enum print_output print_mode)
+static void srunner_fprint_results(FILE * file, SRunner * sr,
+                                   enum print_output print_mode)
 {
-  List *resultlst;
+    List *resultlst;
 
 #if ENABLE_SUBUNIT
-  if (print_mode == CK_SUBUNIT)
-      return;
+    if(print_mode == CK_SUBUNIT)
+        return;
 #endif
-  
-  resultlst = sr->resultlst;
-  
-  for (list_front(resultlst); !list_at_end(resultlst); list_advance(resultlst)) {
-    TestResult *tr = list_val(resultlst);
-    tr_fprint (file, tr, print_mode);
-  }
-  return;
+
+    resultlst = sr->resultlst;
+
+    for(check_list_front(resultlst); !check_list_at_end(resultlst);
+        check_list_advance(resultlst))
+    {
+        TestResult *tr = (TestResult *)check_list_val(resultlst);
+
+        tr_fprint(file, tr, print_mode);
+    }
+    return;
 }
 
-void tr_fprint (FILE *file, TestResult *tr, enum print_output print_mode)
+void fprint_xml_esc(FILE * file, const char *str)
 {
-  if (print_mode == CK_ENV) {
-    print_mode = get_env_printmode();
-  }
-
-  if ((print_mode >= CK_VERBOSE && tr->rtype == CK_PASS) ||
-      (tr->rtype != CK_PASS && print_mode >= CK_NORMAL)) {
-    char *trstr = tr_str (tr);
-    fprintf (file,"%s\n", trstr);
-    free(trstr);
-  }
+    /* The valid XML characters are as follows:
+     *   #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+     * Characters that are outside of ASCII must be encoded. Further, the
+     * following special characters:
+     *   " ' < > &
+     * must be encoded. We assume that the incoming string may be a multibyte
+     * character.
+     */
+
+    for(; *str != '\0'; str++)
+    {
+        char next = *str;
+
+        /* handle special characters that must be escaped */
+        if(next == '"' || next == '\'' || next == '<' || next == '>' || next == '&')
+        {
+            switch (next)
+            {
+                case '"':
+                    fputs("&quot;", file);
+                    break;
+                case '\'':
+                    fputs("&apos;", file);
+                    break;
+                case '<':
+                    fputs("&lt;", file);
+                    break;
+                case '>':
+                    fputs("&gt;", file);
+                    break;
+                case '&':
+                    fputs("&amp;", file);
+                    break;
+            }
+        }
+        /* printable ASCII */
+        else if(next >= ' ' && next <= '~')
+        {
+            fputc(next, file);
+        }
+        /* Non-printable character */
+        else if(next == 0x9 || next == 0xA || next == 0xD ||
+                next >= 0x20)
+        {
+            fprintf(file, "&#x%X;", next);
+        }
+        /* If it did not get printed, it is not a valid XML character*/
+    }
 }
 
-void tr_xmlprint (FILE *file, TestResult *tr, enum print_output print_mode CK_ATTRIBUTE_UNUSED)
+void tr_fprint(FILE * file, TestResult * tr, enum print_output print_mode)
 {
-  char result[10];
-  char *path_name;
-  char *file_name;
-  char *slash;
-
-  switch (tr->rtype) {
-  case CK_PASS:
-    strcpy(result, "success");
-    break;
-  case CK_FAILURE:
-    strcpy(result, "failure");
-    break;
-  case CK_ERROR:
-    strcpy(result, "error");
-    break;
-  case CK_TEST_RESULT_INVALID:
-  default:
-    abort ();
-    break;
-  }
-
-  slash = strrchr(tr->file, '/');
-  if (slash == NULL) {
-    path_name = (char*)".";
-    file_name = tr->file;
-  } else {
-    path_name = strdup(tr->file);
-    path_name[slash - tr->file] = 0; /* Terminate the temporary string. */
-    file_name = slash + 1;
-  }
-    
-
-  fprintf(file, "    <test result=\"%s\">\n", result);
-  fprintf(file, "      <path>%s</path>\n", path_name);
-  fprintf(file, "      <fn>%s:%d</fn>\n", file_name, tr->line);
-  fprintf(file, "      <id>%s</id>\n", tr->tname);
-  fprintf(file, "      <iteration>%d</iteration>\n", tr->iter);
-  fprintf(file, "      <description>%s</description>\n", tr->tcname);
-  fprintf(file, "      <message>%s</message>\n", tr->msg);
-  fprintf(file, "    </test>\n");
-  
-  if (slash != NULL) {
+    if(print_mode == CK_ENV)
+    {
+        print_mode = get_env_printmode();
+    }
+
+    if((print_mode >= CK_VERBOSE && tr->rtype == CK_PASS) ||
+       (tr->rtype != CK_PASS && print_mode >= CK_NORMAL))
+    {
+        char *trstr = tr_str(tr);
+
+        fprintf(file, "%s\n", trstr);
+        free(trstr);
+    }
+}
+
+void tr_xmlprint(FILE * file, TestResult * tr,
+                 enum print_output print_mode CK_ATTRIBUTE_UNUSED)
+{
+    char result[10];
+    char *path_name = NULL;
+    char *file_name = NULL;
+    char *slash = NULL;
+
+    switch (tr->rtype)
+    {
+        case CK_PASS:
+            snprintf(result, sizeof(result), "%s", "success");
+            break;
+        case CK_FAILURE:
+            snprintf(result, sizeof(result), "%s", "failure");
+            break;
+        case CK_ERROR:
+            snprintf(result, sizeof(result), "%s", "error");
+            break;
+        case CK_TEST_RESULT_INVALID:
+        default:
+            abort();
+            break;
+    }
+
+    if(tr->file)
+    {
+        slash = strrchr(tr->file, '/');
+        if(slash == NULL)
+        {
+            slash = strrchr(tr->file, '\\');
+        }
+
+        if(slash == NULL)
+        {
+            path_name = strdup(".");
+            file_name = tr->file;
+        }
+        else
+        {
+            path_name = strdup(tr->file);
+            path_name[slash - tr->file] = 0;    /* Terminate the temporary string. */
+            file_name = slash + 1;
+        }
+    }
+
+
+    fprintf(file, "    <test result=\"%s\">\n", result);
+    fprintf(file, "      <path>%s</path>\n",
+            (path_name == NULL ? "" : path_name));
+    fprintf(file, "      <fn>%s:%d</fn>\n",
+            (file_name == NULL ? "" : file_name), tr->line);
+    fprintf(file, "      <id>%s</id>\n", tr->tname);
+    fprintf(file, "      <iteration>%d</iteration>\n", tr->iter);
+    fprintf(file, "      <duration>%d.%06d</duration>\n",
+            tr->duration < 0 ? -1 : tr->duration / US_PER_SEC,
+            tr->duration < 0 ? 0 : tr->duration % US_PER_SEC);
+    fprintf(file, "      <description>");
+    fprint_xml_esc(file, tr->tcname);
+    fprintf(file, "</description>\n");
+    fprintf(file, "      <message>");
+    fprint_xml_esc(file, tr->msg);
+    fprintf(file, "</message>\n");
+    fprintf(file, "    </test>\n");
+
     free(path_name);
-  }
 }
 
-enum print_output get_env_printmode (void)
+enum print_output get_env_printmode(void)
 {
-  char *env = getenv ("CK_VERBOSITY");
-  if (env == NULL)
+    char *env = getenv("CK_VERBOSITY");
+
+    if(env == NULL)
+        return CK_NORMAL;
+    if(strcmp(env, "silent") == 0)
+        return CK_SILENT;
+    if(strcmp(env, "minimal") == 0)
+        return CK_MINIMAL;
+    if(strcmp(env, "verbose") == 0)
+        return CK_VERBOSE;
     return CK_NORMAL;
-  if (strcmp (env, "silent") == 0)
-    return CK_SILENT;
-  if (strcmp (env, "minimal") == 0)
-    return CK_MINIMAL;
-  if (strcmp (env, "verbose") == 0)
-    return CK_VERBOSE;
-  return CK_NORMAL;
 }
index f4b02da..eabd8b9 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_PRINT_H
 #define CHECK_PRINT_H
 
-void tr_fprint (FILE *file, TestResult *tr, enum print_output print_mode);
-void tr_xmlprint (FILE *file, TestResult *tr, enum print_output print_mode);
-void srunner_fprint (FILE *file, SRunner *sr, enum print_output print_mode);
-enum print_output get_env_printmode (void);
+/* escape XML special characters (" ' < > &) in str and print to file */
+void fprint_xml_esc(FILE * file, const char *str);
+void tr_fprint(FILE * file, TestResult * tr, enum print_output print_mode);
+void tr_xmlprint(FILE * file, TestResult * tr, enum print_output print_mode);
+void srunner_fprint(FILE * file, SRunner * sr, enum print_output print_mode);
+enum print_output get_env_printmode(void);
 
 
 #endif /* CHECK_PRINT_H */
index 374bf4a..da1f40f 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
 
 #include <sys/types.h>
+#include <time.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
 #include <signal.h>
+#include <setjmp.h>
 
 #include "check.h"
 #include "check_error.h"
 #include "check_msg.h"
 #include "check_log.h"
 
-enum rinfo {
-  CK_R_SIG,
-  CK_R_PASS,
-  CK_R_EXIT,
-  CK_R_FAIL_TEST,
-  CK_R_FAIL_FIXTURE
+enum rinfo
+{
+    CK_R_SIG,
+    CK_R_PASS,
+    CK_R_EXIT,
+    CK_R_FAIL_TEST,
+    CK_R_FAIL_FIXTURE
 };
 
-enum tf_type {
-  CK_FORK_TEST,
-  CK_NOFORK_TEST,
-  CK_NOFORK_FIXTURE
+enum tf_type
+{
+    CK_FORK_TEST,
+    CK_NOFORK_TEST,
+    CK_NOFORK_FIXTURE
 };
 
+
 /* all functions are defined in the same order they are declared.
    functions that depend on forking are gathered all together.
    non-static functions are at the end of the file. */
-static void srunner_run_init (SRunner *sr, enum print_output print_mode);
-static void srunner_run_end (SRunner *sr, enum print_output print_mode);
-static void srunner_iterate_suites (SRunner *sr,
-                                   enum print_output print_mode);
-static void srunner_iterate_tcase_tfuns (SRunner *sr, TCase *tc);
-static void srunner_add_failure (SRunner *sr, TestResult *tf);
-static int srunner_run_unchecked_setup (SRunner *sr, TCase *tc);
-static TestResult * tcase_run_checked_setup (SRunner *sr, TCase *tc);
-static void srunner_run_teardown (List *l);
-static void srunner_run_unchecked_teardown (TCase *tc);
-static void tcase_run_checked_teardown (TCase *tc);
-static void srunner_run_tcase (SRunner *sr, TCase *tc);
-static TestResult *tcase_run_tfun_nofork (SRunner *sr, TCase *tc, TF *tf, int i);
-static TestResult *receive_result_info_nofork (const char *tcname,
-                                               const char *tname,
-                                               int iter);
-static void set_nofork_info (TestResult *tr);
-static char *pass_msg (void);
-
-#ifdef _POSIX_VERSION
-static TestResult *tcase_run_tfun_fork (SRunner *sr, TCase *tc, TF *tf, int i);
-static TestResult *receive_result_info_fork (const char *tcname,
-                                             const char *tname,
-                                             int iter,
-                                            int status, int expected_signal,
-                                            unsigned char allowed_exit_value);
-static void set_fork_info (TestResult *tr, int status, int expected_signal,
-                          unsigned char allowed_exit_value);
-static char *signal_msg (int sig);
-static char *signal_error_msg (int signal_received, int signal_expected);
-static char *exit_msg (int exitstatus);
-static int waserror (int status, int expected_signal);
+static void srunner_run_init(SRunner * sr, enum print_output print_mode);
+static void srunner_run_end(SRunner * sr, enum print_output print_mode);
+static void srunner_iterate_suites(SRunner * sr,
+                                   const char *sname, const char *tcname,
+                                  const char *include_tags,
+                                  const char *exclude_tags,
+                                   enum print_output print_mode);
+static void srunner_iterate_tcase_tfuns(SRunner * sr, TCase * tc);
+static void srunner_add_failure(SRunner * sr, TestResult * tf);
+static TestResult * srunner_run_setup(List * func_list,
+    enum fork_status fork_usage, const char * test_name,
+    const char * setup_name);
+static int srunner_run_unchecked_setup(SRunner * sr, TCase * tc);
+static TestResult *tcase_run_checked_setup(SRunner * sr, TCase * tc);
+static void srunner_run_teardown(List * fixture_list, enum fork_status fork_usage);
+static void srunner_run_unchecked_teardown(SRunner * sr, TCase * tc);
+static void tcase_run_checked_teardown(TCase * tc);
+static void srunner_run_tcase(SRunner * sr, TCase * tc);
+static TestResult *tcase_run_tfun_nofork(SRunner * sr, TCase * tc, TF * tf,
+                                         int i);
+static TestResult *receive_result_info_nofork(const char *tcname,
+                                              const char *tname, int iter,
+                                              int duration);
+static void set_nofork_info(TestResult * tr);
+static char *pass_msg(void);
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+static TestResult *tcase_run_tfun_fork(SRunner * sr, TCase * tc, TF * tf,
+                                       int i);
+static TestResult *receive_result_info_fork(const char *tcname,
+                                            const char *tname, int iter,
+                                            int status, int expected_signal,
+                                            signed char allowed_exit_value);
+static void set_fork_info(TestResult * tr, int status, int expected_signal,
+                          signed char allowed_exit_value);
+static char *signal_msg(int sig);
+static char *signal_error_msg(int signal_received, int signal_expected);
+static char *exit_msg(int exitstatus);
+static int waserror(int status, int expected_signal);
 
 static int alarm_received;
 static pid_t group_pid;
+static struct sigaction sigint_old_action;
+static struct sigaction sigterm_old_action;
 
 static void CK_ATTRIBUTE_UNUSED sig_handler(int sig_nr)
 {
-  switch (sig_nr) {
-   case SIGALRM:
-    alarm_received = 1;
-    killpg(group_pid, SIGKILL);
-    break;
-   default:
-    eprintf("Unhandled signal: %d", __FILE__, __LINE__, sig_nr);
-    break;
-  }
+    switch (sig_nr)
+    {
+        case SIGALRM:
+            alarm_received = 1;
+            killpg(group_pid, SIGKILL);
+            break;
+        case SIGTERM:
+        case SIGINT:
+        {
+            pid_t own_group_pid;
+            int child_sig = SIGTERM;
+
+            if (sig_nr == SIGINT)
+            {
+                child_sig = SIGKILL;
+                sigaction(SIGINT, &sigint_old_action, NULL);
+            }
+            else
+            {
+                sigaction(SIGTERM, &sigterm_old_action, NULL);
+            }
+
+            killpg(group_pid, child_sig);
+
+            /* POSIX says that calling killpg(0)
+             * does not necessarily mean to call it on the callers
+             * group pid! */
+            own_group_pid = getpgrp();
+            killpg(own_group_pid, sig_nr);
+            break;
+        }
+        default:
+            eprintf("Unhandled signal: %d", __FILE__, __LINE__, sig_nr);
+            break;
+    }
 }
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
 
 #define MSG_LEN 100
 
-static void srunner_run_init (SRunner *sr, enum print_output print_mode)
+static void srunner_run_init(SRunner * sr, enum print_output print_mode)
 {
-  set_fork_status(srunner_fork_status(sr));
-  setup_messaging();
-  srunner_init_logging (sr, print_mode);
-  log_srunner_start (sr);
+    set_fork_status(srunner_fork_status(sr));
+    setup_messaging();
+    srunner_init_logging(sr, print_mode);
+    log_srunner_start(sr);
 }
 
-static void srunner_run_end (SRunner *sr, enum print_output CK_ATTRIBUTE_UNUSED print_mode)
+static void srunner_run_end(SRunner * sr,
+                            enum print_output CK_ATTRIBUTE_UNUSED print_mode)
 {
-  log_srunner_end (sr);
-  srunner_end_logging (sr);
-  teardown_messaging();
-  set_fork_status(CK_FORK);  
+    log_srunner_end(sr);
+    srunner_end_logging(sr);
+    teardown_messaging();
+    set_fork_status(CK_FORK);
 }
 
-static void srunner_iterate_suites (SRunner *sr,
-                                   enum print_output CK_ATTRIBUTE_UNUSED print_mode)
-  
-{
-  List *slst;
-  List *tcl;
-  TCase *tc;
-
-  slst = sr->slst;
-  
-  for (list_front(slst); !list_at_end(slst); list_advance(slst)) {
-    Suite *s = list_val(slst);
-    
-    log_suite_start (sr, s);
-
-    tcl = s->tclst;
-  
-    for (list_front(tcl);!list_at_end (tcl); list_advance (tcl)) {
-      tc = list_val (tcl);
-      srunner_run_tcase (sr, tc);
+static void srunner_iterate_suites(SRunner * sr,
+                                   const char *sname, const char *tcname,
+                                  const char *include_tags,
+                                  const char *exclude_tags,
+                                   enum print_output CK_ATTRIBUTE_UNUSED
+                                   print_mode)
+{
+    List *include_tag_lst;
+    List *exclude_tag_lst;
+    List *slst;
+    List *tcl;
+    TCase *tc;
+
+    slst = sr->slst;
+
+    include_tag_lst = tag_string_to_list(include_tags);
+    exclude_tag_lst = tag_string_to_list(exclude_tags);
+
+    for(check_list_front(slst); !check_list_at_end(slst);
+        check_list_advance(slst))
+    {
+        Suite *s = (Suite *)check_list_val(slst);
+
+        if(((sname != NULL) && (strcmp(sname, s->name) != 0))
+           || ((tcname != NULL) && (!suite_tcase(s, tcname))))
+            continue;
+
+        log_suite_start(sr, s);
+
+        tcl = s->tclst;
+
+        for(check_list_front(tcl); !check_list_at_end(tcl);
+            check_list_advance(tcl))
+        {
+            tc = (TCase *)check_list_val(tcl);
+
+            if((tcname != NULL) && (strcmp(tcname, tc->name) != 0))
+            {
+                continue;
+            }
+           if (include_tags != NULL)
+           {
+               if (!tcase_matching_tag(tc, include_tag_lst))
+               {
+                   continue;
+               }
+           }
+           if (exclude_tags != NULL)
+           {
+               if (tcase_matching_tag(tc, exclude_tag_lst))
+               {
+                   continue;
+               }
+           }
+
+            srunner_run_tcase(sr, tc);
+        }
+
+        log_suite_end(sr, s);
     }
-    
-    log_suite_end (sr, s);
-  }
+
+    check_list_apply(include_tag_lst, free);
+    check_list_apply(exclude_tag_lst, free);
+    check_list_free(include_tag_lst);
+    check_list_free(exclude_tag_lst);
 }
 
-static void srunner_iterate_tcase_tfuns (SRunner *sr, TCase *tc)
+static void srunner_iterate_tcase_tfuns(SRunner * sr, TCase * tc)
 {
-  List *tfl;
-  TF *tfun;
-  TestResult *tr = NULL;
+    List *tfl;
+    TF *tfun;
+    TestResult *tr = NULL;
 
-  tfl = tc->tflst;
-  
-  for (list_front(tfl); !list_at_end (tfl); list_advance (tfl)) {
-    int i;
-    tfun = list_val (tfl);
+    tfl = tc->tflst;
 
-    for (i = tfun->loop_start; i < tfun->loop_end; i++)
+    for(check_list_front(tfl); !check_list_at_end(tfl);
+        check_list_advance(tfl))
     {
-      log_test_start (sr, tc, tfun);
-      switch (srunner_fork_status(sr)) {
-      case CK_FORK:
-#ifdef _POSIX_VERSION
-        tr = tcase_run_tfun_fork (sr, tc, tfun, i);
-#else /* _POSIX_VERSION */
-        eprintf("This version does not support fork", __FILE__, __LINE__);
-#endif /* _POSIX_VERSION */
-        break;
-      case CK_NOFORK:
-        tr = tcase_run_tfun_nofork (sr, tc, tfun, i);
-        break;
-      default:
-        eprintf("Bad fork status in SRunner", __FILE__, __LINE__);
-      }
-      srunner_add_failure (sr, tr);
-      log_test_end(sr, tr);
+        int i;
+
+        tfun = (TF *)check_list_val(tfl);
+
+        for(i = tfun->loop_start; i < tfun->loop_end; i++)
+        {
+            log_test_start(sr, tc, tfun);
+            switch (srunner_fork_status(sr))
+            {
+                case CK_FORK:
+#if defined(HAVE_FORK) && HAVE_FORK==1
+                    tr = tcase_run_tfun_fork(sr, tc, tfun, i);
+#else /* HAVE_FORK */
+                    eprintf("This version does not support fork", __FILE__,
+                            __LINE__);
+#endif /* HAVE_FORK */
+                    break;
+                case CK_NOFORK:
+                    tr = tcase_run_tfun_nofork(sr, tc, tfun, i);
+                    break;
+                case CK_FORK_GETENV:
+                default:
+                    eprintf("Bad fork status in SRunner", __FILE__, __LINE__);
+            }
+
+            if(NULL != tr)
+            {
+                srunner_add_failure(sr, tr);
+                log_test_end(sr, tr);
+            }
+        }
     }
-  }
-}  
-
-static void srunner_add_failure (SRunner *sr, TestResult *tr)
-{  
-  list_add_end (sr->resultlst, tr);
-  sr->stats->n_checked++; /* count checks during setup, test, and teardown */
-  if (tr->rtype == CK_FAILURE)
-    sr->stats->n_failed++;
-  else if (tr->rtype == CK_ERROR)
-    sr->stats->n_errors++;
-  
 }
 
-static int srunner_run_unchecked_setup (SRunner *sr, TCase *tc)
+static void srunner_add_failure(SRunner * sr, TestResult * tr)
 {
-  TestResult *tr;
-  List *l;
-  Fixture *f;
-  int rval = 1;
-
-  set_fork_status(CK_NOFORK);
+    check_list_add_end(sr->resultlst, tr);
+    sr->stats->n_checked++;     /* count checks during setup, test, and teardown */
+    if(tr->rtype == CK_FAILURE)
+        sr->stats->n_failed++;
+    else if(tr->rtype == CK_ERROR)
+        sr->stats->n_errors++;
 
-  l = tc->unch_sflst;
+}
 
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    send_ctx_info(CK_CTX_SETUP);
-    f = list_val(l);
-    f->fun();
+static TestResult * srunner_run_setup(List * fixture_list, enum fork_status fork_usage,
+    const char * test_name, const char * setup_name)
+{
+    TestResult *tr = NULL;
+    Fixture *setup_fixture;
 
-    tr = receive_result_info_nofork (tc->name, "unchecked_setup", 0);
+    if(fork_usage == CK_FORK)
+    {
+        send_ctx_info(CK_CTX_SETUP);
+    }
 
-    if (tr->rtype != CK_PASS) {
-      srunner_add_failure(sr, tr);
-      rval = 0;
-      break;
+    for(check_list_front(fixture_list); !check_list_at_end(fixture_list);
+        check_list_advance(fixture_list))
+    {
+        setup_fixture = (Fixture *)check_list_val(fixture_list);
+
+        if(fork_usage == CK_NOFORK)
+        {
+            send_ctx_info(CK_CTX_SETUP);
+
+            if(0 == setjmp(error_jmp_buffer))
+            {
+                setup_fixture->fun();
+            }
+
+            /* Stop the setup and return the failure in nofork mode. */
+            tr = receive_result_info_nofork(test_name, setup_name, 0, -1);
+            if(tr->rtype != CK_PASS)
+            {
+                break;
+            }
+
+            free(tr->file);
+            free(tr->msg);
+            free(tr);
+            tr = NULL;
+        }
+        else
+        {
+            setup_fixture->fun();
+        }
     }
-    free(tr->file);
-    free(tr->msg);
-    free(tr);
-  } 
 
-  set_fork_status(srunner_fork_status(sr));
-  return rval;
+    return tr;
 }
 
-static TestResult * tcase_run_checked_setup (SRunner *sr, TCase *tc)
-{
-  TestResult *tr = NULL;
-  List *l;
-  Fixture *f;
-  enum fork_status fstat = srunner_fork_status(sr);
-  
-  l = tc->ch_sflst;
-  if (fstat == CK_FORK) {
-    send_ctx_info(CK_CTX_SETUP);
-  }
-  
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    if (fstat == CK_NOFORK) {
-      send_ctx_info(CK_CTX_SETUP);
-    }
-    f = list_val(l);
-    f->fun();
-
-    /* Stop the setup and return the failure if nofork mode. */
-    if (fstat == CK_NOFORK) {
-      tr = receive_result_info_nofork (tc->name, "checked_setup", 0);
-      if (tr->rtype != CK_PASS) {
-        break;
-      }
-
-      free(tr->file);
-      free(tr->msg);
-      free(tr);
-      tr = NULL;
+static int srunner_run_unchecked_setup(SRunner * sr, TCase * tc)
+{
+    TestResult *tr = NULL;
+    int rval = 1;
+
+    set_fork_status(CK_NOFORK);
+    tr = srunner_run_setup(tc->unch_sflst, CK_NOFORK, tc->name, "unchecked_setup");
+    set_fork_status(srunner_fork_status(sr));
+
+    if(tr != NULL && tr->rtype != CK_PASS)
+    {
+        srunner_add_failure(sr, tr);
+        rval = 0;
     }
-  }
 
-  return tr;
+    return rval;
 }
 
-static void srunner_run_teardown (List *l)
+static TestResult *tcase_run_checked_setup(SRunner * sr, TCase * tc)
 {
-  Fixture *f;
-  
-  for (list_front(l); !list_at_end(l); list_advance(l)) {
-    f = list_val(l);
-    send_ctx_info(CK_CTX_TEARDOWN);
-    f->fun ();
-  }
+    TestResult *tr = srunner_run_setup(tc->ch_sflst, srunner_fork_status(sr),
+        tc->name, "checked_setup");
+
+    return tr;
 }
 
-static void srunner_run_unchecked_teardown (TCase *tc)
+static void srunner_run_teardown(List * fixture_list, enum fork_status fork_usage)
 {
-  srunner_run_teardown(tc->unch_tflst);
+    Fixture * fixture;
+
+    for(check_list_front(fixture_list); !check_list_at_end(fixture_list);
+        check_list_advance(fixture_list))
+    {
+        fixture = (Fixture *)check_list_val(fixture_list);
+        send_ctx_info(CK_CTX_TEARDOWN);
+
+        if(fork_usage == CK_NOFORK)
+        {
+            if(0 == setjmp(error_jmp_buffer))
+            {
+                fixture->fun();
+            }
+            else
+            {
+                /* Abort the remaining teardowns */
+                break;
+            }
+        }
+        else
+        {
+            fixture->fun();
+        }
+    }
 }
 
-static void tcase_run_checked_teardown (TCase *tc)
+static void srunner_run_unchecked_teardown(SRunner * sr, TCase * tc)
 {
-  srunner_run_teardown(tc->ch_tflst);
+    srunner_run_teardown(tc->unch_tflst, srunner_fork_status(sr));
 }
 
-static void srunner_run_tcase (SRunner *sr, TCase *tc)
+static void tcase_run_checked_teardown(TCase * tc)
 {
-  if (srunner_run_unchecked_setup(sr,tc)) {
-    srunner_iterate_tcase_tfuns(sr,tc);
-    srunner_run_unchecked_teardown(tc);
-  }
+    srunner_run_teardown(tc->ch_tflst, CK_NOFORK);
 }
 
-static TestResult *tcase_run_tfun_nofork (SRunner *sr, TCase *tc, TF *tfun, int i)
-{
-  TestResult *tr;
-  
-  tr = tcase_run_checked_setup(sr, tc);
-  if (tr == NULL) {
-    tfun->fn(i);
-    tcase_run_checked_teardown(tc);
-    return receive_result_info_nofork(tc->name, tfun->name, i);
-  }
-  
-  return tr;
+static void srunner_run_tcase(SRunner * sr, TCase * tc)
+{
+    if(srunner_run_unchecked_setup(sr, tc))
+    {
+        srunner_iterate_tcase_tfuns(sr, tc);
+        srunner_run_unchecked_teardown(sr, tc);
+    }
 }
 
-static TestResult *receive_result_info_nofork (const char *tcname,
-                                               const char *tname,
-                                               int iter)
+static TestResult *tcase_run_tfun_nofork(SRunner * sr, TCase * tc, TF * tfun,
+                                         int i)
 {
-  TestResult *tr;
+    TestResult *tr;
+    struct timespec ts_start = {0, 0}, ts_end = {0, 0};
 
-  tr = receive_test_result(0);
-  if (tr == NULL)
-    eprintf("Failed to receive test result", __FILE__, __LINE__);
-  tr->tcname = tcname;
-  tr->tname = tname;
-  tr->iter = iter;
-  set_nofork_info(tr);
+    tr = tcase_run_checked_setup(sr, tc);
+    if(tr == NULL)
+    {
+        clock_gettime(check_get_clockid(), &ts_start);
+        if(0 == setjmp(error_jmp_buffer))
+        {
+            tfun->fn(i);
+        }
+        clock_gettime(check_get_clockid(), &ts_end);
+        tcase_run_checked_teardown(tc);
+        return receive_result_info_nofork(tc->name, tfun->name, i,
+                                          DIFF_IN_USEC(ts_start, ts_end));
+    }
 
-  return tr;
+    return tr;
 }
 
-static void set_nofork_info (TestResult *tr)
+static TestResult *receive_result_info_nofork(const char *tcname,
+                                              const char *tname,
+                                              int iter, int duration)
 {
-  if (tr->msg == NULL) {
-    tr->rtype = CK_PASS;
-    tr->msg = pass_msg();
-  } else {
-    tr->rtype = CK_FAILURE;
-  }
+    TestResult *tr;
+
+    tr = receive_test_result(0);
+    if(tr == NULL)
+    {
+        eprintf("Failed to receive test result", __FILE__, __LINE__);
+    }
+    else
+    {
+        tr->tcname = tcname;
+        tr->tname = tname;
+        tr->iter = iter;
+        tr->duration = duration;
+        set_nofork_info(tr);
+    }
+
+    return tr;
 }
 
-static char *pass_msg (void)
+static void set_nofork_info(TestResult * tr)
 {
-  char *msg = emalloc(sizeof("Passed"));
-  strcpy (msg, "Passed");
-  return msg;
+    if(tr->msg == NULL)
+    {
+        tr->rtype = CK_PASS;
+        tr->msg = pass_msg();
+    }
+    else
+    {
+        tr->rtype = CK_FAILURE;
+    }
 }
 
-#ifdef _POSIX_VERSION
-static TestResult *tcase_run_tfun_fork (SRunner *sr, TCase *tc, TF *tfun, int i)
-{
-  pid_t pid_w;
-  pid_t pid;
-  int status = 0;
-
-  pid = fork();
-  if (pid == -1)
-    eprintf("Error in call to fork:", __FILE__, __LINE__ - 2);
-  if (pid == 0) {
-    setpgid(0, 0);
-    group_pid = getpgrp();
-    tcase_run_checked_setup(sr, tc);
-    tfun->fn(i);
-    tcase_run_checked_teardown(tc);
-    exit(EXIT_SUCCESS);
-  } else {
-    group_pid = pid;
-  }
-
-  alarm_received = 0;
-  alarm(tc->timeout);
-  do {
-    pid_w = waitpid(pid, &status, 0);
-  } while (pid_w == -1);
-  
-  killpg(pid, SIGKILL); /* Kill remaining processes. */
-
-  return receive_result_info_fork(tc->name, tfun->name, i, status, tfun->signal,  tfun->allowed_exit_value);
+static char *pass_msg(void)
+{
+    return strdup("Passed");
+}
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+static TestResult *tcase_run_tfun_fork(SRunner * sr, TCase * tc, TF * tfun,
+                                       int i)
+{
+    pid_t pid_w;
+    pid_t pid;
+    int status = 0;
+    struct timespec ts_start = { 0, 0 }, ts_end ={ 0, 0 };
+
+    timer_t timerid;
+    struct itimerspec timer_spec;
+    TestResult *tr;
+
+
+    pid = fork();
+    if(pid == -1)
+        eprintf("Error in call to fork:", __FILE__, __LINE__ - 2);
+    if(pid == 0)
+    {
+        setpgid(0, 0);
+        group_pid = getpgrp();
+        tr = tcase_run_checked_setup(sr, tc);
+        free(tr);
+        clock_gettime(check_get_clockid(), &ts_start);
+        tfun->fn(i);
+        clock_gettime(check_get_clockid(), &ts_end);
+        tcase_run_checked_teardown(tc);
+        send_duration_info(DIFF_IN_USEC(ts_start, ts_end));
+        exit(EXIT_SUCCESS);
+    }
+    else
+    {
+        group_pid = pid;
+    }
+
+    alarm_received = 0;
+
+    if(timer_create(check_get_clockid(),
+                    NULL /* fire SIGALRM if timer expires */,
+                    &timerid) == 0)
+    {
+        /* Set the timer to fire once */
+        timer_spec.it_value = tc->timeout;
+        timer_spec.it_interval.tv_sec = 0;
+        timer_spec.it_interval.tv_nsec = 0;
+        if(timer_settime(timerid, 0, &timer_spec, NULL) == 0)
+        {
+            do
+            {
+                pid_w = waitpid(pid, &status, 0);
+            }
+            while(pid_w == -1);
+        }
+        else
+        {
+            eprintf("Error in call to timer_settime:", __FILE__, __LINE__);
+        }
+
+        /* If the timer has not fired, disable it */
+        timer_delete(timerid);
+    }
+    else
+    {
+        eprintf("Error in call to timer_create:", __FILE__, __LINE__);
+    }
+
+    killpg(pid, SIGKILL);       /* Kill remaining processes. */
+
+    return receive_result_info_fork(tc->name, tfun->name, i, status,
+                                    tfun->signal, tfun->allowed_exit_value);
 }
 
-static TestResult *receive_result_info_fork (const char *tcname,
-                                             const char *tname,
-                                             int iter,
-                                            int status, int expected_signal, 
-                                             unsigned char allowed_exit_value)
+static TestResult *receive_result_info_fork(const char *tcname,
+                                            const char *tname,
+                                            int iter,
+                                            int status, int expected_signal,
+                                            signed char allowed_exit_value)
 {
-  TestResult *tr;
+    TestResult *tr;
 
-  tr = receive_test_result(waserror(status, expected_signal));
-  if (tr == NULL)
-    eprintf("Failed to receive test result", __FILE__, __LINE__);
-  tr->tcname = tcname;
-  tr->tname = tname;
-  tr->iter = iter;
-  set_fork_info(tr, status, expected_signal, allowed_exit_value);
+    tr = receive_test_result(waserror(status, expected_signal));
+    if(tr == NULL)
+    {
+        eprintf("Failed to receive test result", __FILE__, __LINE__);
+    }
+    else
+    {
+        tr->tcname = tcname;
+        tr->tname = tname;
+        tr->iter = iter;
+        set_fork_info(tr, status, expected_signal, allowed_exit_value);
+    }
 
-  return tr;
+    return tr;
 }
 
-static void set_fork_info (TestResult *tr, int status, int signal_expected, unsigned char allowed_exit_value)
+static void set_fork_info(TestResult * tr, int status, int signal_expected,
+                          signed char allowed_exit_value)
 {
-  int was_sig = WIFSIGNALED(status);
-  int was_exit = WIFEXITED(status);
-  int exit_status = WEXITSTATUS(status);
-  int signal_received = WTERMSIG(status);
+    int was_sig = WIFSIGNALED(status);
+    int was_exit = WIFEXITED(status);
+    signed char exit_status = WEXITSTATUS(status);
+    int signal_received = WTERMSIG(status);
 
-  if (was_sig) {
-    if (signal_expected == signal_received) {
-      if (alarm_received) {
-        /* Got alarm instead of signal */
-        tr->rtype = CK_ERROR;
-        tr->msg = signal_error_msg(signal_received, signal_expected);
-      } else {
-        tr->rtype = CK_PASS;
-        tr->msg = pass_msg();
-      }
-    } else if (signal_expected != 0) {
-      /* signal received, but not the expected one */
-      tr->rtype = CK_ERROR;
-      tr->msg = signal_error_msg(signal_received, signal_expected);
-    } else {
-      /* signal received and none expected */
-      tr->rtype = CK_ERROR;
-      tr->msg = signal_msg(signal_received);
+    if(was_sig)
+    {
+        if(signal_expected == signal_received)
+        {
+            if(alarm_received)
+            {
+                /* Got alarm instead of signal */
+                tr->rtype = CK_ERROR;
+                if(tr->msg != NULL)
+                {
+                    free(tr->msg);
+                }
+                tr->msg = signal_error_msg(signal_received, signal_expected);
+            }
+            else
+            {
+                tr->rtype = CK_PASS;
+                if(tr->msg != NULL)
+                {
+                    free(tr->msg);
+                }
+                tr->msg = pass_msg();
+            }
+        }
+        else if(signal_expected != 0)
+        {
+            /* signal received, but not the expected one */
+            tr->rtype = CK_ERROR;
+            if(tr->msg != NULL)
+            {
+                free(tr->msg);
+            }
+            tr->msg = signal_error_msg(signal_received, signal_expected);
+        }
+        else
+        {
+            /* signal received and none expected */
+            tr->rtype = CK_ERROR;
+            if(tr->msg != NULL)
+            {
+                free(tr->msg);
+            }
+            tr->msg = signal_msg(signal_received);
+        }
     }
-  } else if (signal_expected == 0) {
-    if (was_exit && exit_status == allowed_exit_value) {
-      tr->rtype = CK_PASS;
-      tr->msg = pass_msg();
-    } else if (was_exit && exit_status != allowed_exit_value) {
-      if (tr->msg == NULL) { /* early exit */
-        tr->rtype = CK_ERROR;
-        tr->msg = exit_msg(exit_status);
-      } else {
-        tr->rtype = CK_FAILURE;
-      }
+    else if(signal_expected == 0)
+    {
+        if(was_exit && exit_status == allowed_exit_value)
+        {
+            tr->rtype = CK_PASS;
+            if(tr->msg != NULL)
+            {
+                free(tr->msg);
+            }
+            tr->msg = pass_msg();
+        }
+        else if(was_exit && exit_status != allowed_exit_value)
+        {
+            if(tr->msg == NULL)
+            {                   /* early exit */
+                tr->rtype = CK_ERROR;
+                tr->msg = exit_msg(exit_status);
+            }
+            else
+            {
+                tr->rtype = CK_FAILURE;
+            }
+        }
     }
-  } else { /* a signal was expected and none raised */
-    if (was_exit) {
-      tr->msg = exit_msg(exit_status);
-      if (exit_status == allowed_exit_value)
-       tr->rtype = CK_FAILURE; /* normal exit status */
-      else
-       tr->rtype = CK_FAILURE; /* early exit */
+    else
+    {                           /* a signal was expected and none raised */
+        if(was_exit)
+        {
+            if(tr->msg != NULL)
+            {
+                free(tr->msg);
+            }
+            tr->msg = exit_msg(exit_status);
+            if(exit_status == allowed_exit_value)
+            {
+                tr->rtype = CK_FAILURE; /* normal exit status */
+            }
+            else
+            {
+                tr->rtype = CK_FAILURE; /* early exit */
+            }
+        }
     }
-  }
 }
 
-static char *signal_msg (int signal)
+static char *signal_msg(int signal)
 {
-  char *msg = emalloc(MSG_LEN); /* free'd by caller */
-  if (alarm_received) {
-    snprintf(msg, MSG_LEN, "Test timeout expired");
-  } else {
-    snprintf(msg, MSG_LEN, "Received signal %d (%s)",
-             signal, strsignal(signal));
-  }
-  return msg;
+    char *msg = (char *)emalloc(MSG_LEN);       /* free'd by caller */
+
+    if(alarm_received)
+    {
+        snprintf(msg, MSG_LEN, "Test timeout expired");
+    }
+    else
+    {
+        snprintf(msg, MSG_LEN, "Received signal %d (%s)",
+                 signal, strsignal(signal));
+    }
+    return msg;
 }
 
-static char *signal_error_msg (int signal_received, int signal_expected)
-{
-  char *sig_r_str;
-  char *sig_e_str;
-  char *msg = emalloc (MSG_LEN); /* free'd by caller */
-  sig_r_str = strdup(strsignal(signal_received));
-  sig_e_str = strdup(strsignal(signal_expected));
-  if (alarm_received) {
-    snprintf (msg, MSG_LEN, "Test timeout expired, expected signal %d (%s)",
-              signal_expected, sig_e_str);
-  } else {
-    snprintf (msg, MSG_LEN, "Received signal %d (%s), expected %d (%s)",
-              signal_received, sig_r_str, signal_expected, sig_e_str);
-  }
-  free(sig_r_str);
-  free(sig_e_str);
-  return msg;
+static char *signal_error_msg(int signal_received, int signal_expected)
+{
+    char *sig_r_str;
+    char *sig_e_str;
+    char *msg = (char *)emalloc(MSG_LEN);       /* free'd by caller */
+
+    sig_r_str = strdup(strsignal(signal_received));
+    sig_e_str = strdup(strsignal(signal_expected));
+    if(alarm_received)
+    {
+        snprintf(msg, MSG_LEN,
+                 "Test timeout expired, expected signal %d (%s)",
+                 signal_expected, sig_e_str);
+    }
+    else
+    {
+        snprintf(msg, MSG_LEN, "Received signal %d (%s), expected %d (%s)",
+                 signal_received, sig_r_str, signal_expected, sig_e_str);
+    }
+    free(sig_r_str);
+    free(sig_e_str);
+    return msg;
 }
 
-static char *exit_msg (int exitval)
+static char *exit_msg(int exitval)
 {
-  char *msg = emalloc(MSG_LEN); /* free'd by caller */
-  snprintf (msg, MSG_LEN,
-            "Early exit with return value %d", exitval);
-  return msg;
+    char *msg = (char *)emalloc(MSG_LEN);       /* free'd by caller */
+
+    snprintf(msg, MSG_LEN, "Early exit with return value %d", exitval);
+    return msg;
 }
 
-static int waserror (int status, int signal_expected)
+static int waserror(int status, int signal_expected)
 {
-  int was_sig = WIFSIGNALED (status);
-  int was_exit = WIFEXITED (status);
-  int exit_status = WEXITSTATUS (status);
-  int signal_received = WTERMSIG (status);
+    int was_sig = WIFSIGNALED(status);
+    int was_exit = WIFEXITED(status);
+    int exit_status = WEXITSTATUS(status);
+    int signal_received = WTERMSIG(status);
 
-  return ((was_sig && (signal_received != signal_expected)) ||
-          (was_exit && exit_status != 0));
+    return ((was_sig && (signal_received != signal_expected)) ||
+            (was_exit && exit_status != 0));
 }
-#endif /* _POSIX_VERSION */
-
-enum fork_status srunner_fork_status (SRunner *sr)
-{
-  if (sr->fstat == CK_FORK_GETENV) {
-    char *env = getenv ("CK_FORK");
-    if (env == NULL)
-      return CK_FORK;
-    if (strcmp (env,"no") == 0)
-      return CK_NOFORK;
-    else {
-#ifdef _POSIX_VERSION
-      return CK_FORK;
-#else /* _POSIX_VERSION */
-      eprintf("This version does not support fork", __FILE__, __LINE__);
-      return CK_NOFORK;
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
+
+enum fork_status srunner_fork_status(SRunner * sr)
+{
+    if(sr->fstat == CK_FORK_GETENV)
+    {
+        char *env = getenv("CK_FORK");
+
+        if(env == NULL)
+#if defined(HAVE_FORK) && HAVE_FORK==1
+            return CK_FORK;
+#else
+            return CK_NOFORK;
+#endif
+        if(strcmp(env, "no") == 0)
+            return CK_NOFORK;
+#if defined(HAVE_FORK) && HAVE_FORK==1
+        return CK_FORK;
+#else /* HAVE_FORK */
+        /* Ignoring, as Check is not compiled with fork support. */
+        return CK_NOFORK;
+#endif /* HAVE_FORK */
     }
-  } else
     return sr->fstat;
 }
 
-void srunner_set_fork_status (SRunner *sr, enum fork_status fstat)
+void srunner_set_fork_status(SRunner * sr, enum fork_status fstat)
 {
-  sr->fstat = fstat;
+#if !defined(HAVE_FORK) || HAVE_FORK==0
+    /* If fork() is unavailable, do not allow a fork mode to be set */
+    if(fstat != CK_NOFORK)
+    {
+        /* Overriding, as Check is not compiled with fork support. */
+        fstat = CK_NOFORK;
+    }
+#endif /* ! HAVE_FORK */
+    sr->fstat = fstat;
 }
 
-void srunner_run_all (SRunner *sr, enum print_output print_mode)
+void srunner_run_all(SRunner * sr, enum print_output print_mode)
 {
-#ifdef _POSIX_VERSION
-  struct sigaction old_action;
-  struct sigaction new_action;
-#endif /* _POSIX_VERSION */
+    srunner_run(sr, NULL,       /* All test suites.  */
+                NULL,           /* All test cases.   */
+                print_mode);
+}
 
-  if (sr == NULL)
-    return;
-  if (print_mode >= CK_LAST)
+void srunner_run_tagged(SRunner * sr, const char *sname, const char *tcname,
+                       const char *include_tags, const char *exclude_tags,
+                       enum print_output print_mode)
+{
+#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)
+    static struct sigaction sigalarm_old_action;
+    static struct sigaction sigalarm_new_action;
+    static struct sigaction sigint_new_action;
+    static struct sigaction sigterm_new_action;
+#endif /* HAVE_SIGACTION && HAVE_FORK */
+
+    /*  Get the selected test suite and test case from the
+       environment.  */
+    if(!tcname)
+        tcname = getenv("CK_RUN_CASE");
+    if(!sname)
+       sname = getenv("CK_RUN_SUITE");
+    if(!include_tags)
+       include_tags = getenv("CK_INCLUDE_TAGS");
+    if(!exclude_tags)
+       exclude_tags = getenv("CK_EXCLUDE_TAGS");
+
+    if(sr == NULL)
+        return;
+    if(print_mode >= CK_LAST)
     {
-      eprintf ("Bad print_mode argument to srunner_run_all: %d",
-             __FILE__, __LINE__, print_mode);
+        eprintf("Bad print_mode argument to srunner_run_all: %d",
+                __FILE__, __LINE__, print_mode);
     }
-#ifdef _POSIX_VERSION
-  memset(&new_action, 0, sizeof new_action);
-  new_action.sa_handler = sig_handler;
-  sigaction(SIGALRM, &new_action, &old_action);
-#endif /* _POSIX_VERSION */
-  srunner_run_init (sr, print_mode);
-  srunner_iterate_suites (sr, print_mode);
-  srunner_run_end (sr, print_mode);
-#ifdef _POSIX_VERSION
-  sigaction(SIGALRM, &old_action, NULL);
-#endif /* _POSIX_VERSION */
+#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)
+    memset(&sigalarm_new_action, 0, sizeof(sigalarm_new_action));
+    sigalarm_new_action.sa_handler = sig_handler;
+    sigaction(SIGALRM, &sigalarm_new_action, &sigalarm_old_action);
+
+    memset(&sigint_new_action, 0, sizeof(sigint_new_action));
+    sigint_new_action.sa_handler = sig_handler;
+    sigaction(SIGINT, &sigint_new_action, &sigint_old_action);
+
+    memset(&sigterm_new_action, 0, sizeof(sigterm_new_action));
+    sigterm_new_action.sa_handler = sig_handler;
+    sigaction(SIGTERM, &sigterm_new_action, &sigterm_old_action);
+#endif /* HAVE_SIGACTION && HAVE_FORK */
+    srunner_run_init(sr, print_mode);
+    srunner_iterate_suites(sr, sname, tcname, include_tags, exclude_tags,
+                          print_mode);
+    srunner_run_end(sr, print_mode);
+#if defined(HAVE_SIGACTION) && defined(HAVE_FORK)
+    sigaction(SIGALRM, &sigalarm_old_action, NULL);
+    sigaction(SIGINT, &sigint_old_action, NULL);
+    sigaction(SIGTERM, &sigterm_old_action, NULL);
+#endif /* HAVE_SIGACTION && HAVE_FORK */
+}
+
+void srunner_run(SRunner * sr, const char *sname, const char *tcname,
+                 enum print_output print_mode)
+{
+    srunner_run_tagged(sr, sname, tcname, NULL, NULL, print_mode);
 }
 
-pid_t check_fork (void)
-{
-#ifdef _POSIX_VERSION
-  pid_t pid = fork();
-  /* Set the process to a process group to be able to kill it easily. */
-  setpgid(pid, group_pid);
-  return pid;
-#else /* _POSIX_VERSION */
-  eprintf("This version does not support fork", __FILE__, __LINE__);
-  return 0;
-#endif /* _POSIX_VERSION */
+pid_t check_fork(void)
+{
+#if defined(HAVE_FORK) && HAVE_FORK==1
+    pid_t pid = fork();
+
+    /* Set the process to a process group to be able to kill it easily. */
+    if(pid >= 0)
+    {
+        setpgid(pid, group_pid);
+    }
+    return pid;
+#else /* HAVE_FORK */
+    /* Ignoring, as Check is not compiled with fork support. */
+    return -1;
+#endif /* HAVE_FORK */
 }
 
-void check_waitpid_and_exit (pid_t pid CK_ATTRIBUTE_UNUSED)
+void check_waitpid_and_exit(pid_t pid CK_ATTRIBUTE_UNUSED)
 {
-#ifdef _POSIX_VERSION
-  pid_t pid_w;
-  int status;
+#if defined(HAVE_FORK) && HAVE_FORK==1
+    pid_t pid_w;
+    int status;
 
-  if (pid > 0) {
-    do {
-      pid_w = waitpid(pid, &status, 0);
-    } while (pid_w == -1);
-    if (waserror(status, 0)) {
-      exit(EXIT_FAILURE);
+    if(pid > 0)
+    {
+        do
+        {
+            pid_w = waitpid(pid, &status, 0);
+        }
+        while(pid_w == -1);
+        if(waserror(status, 0))
+        {
+            exit(EXIT_FAILURE);
+        }
     }
-  }
-  exit(EXIT_SUCCESS);
-#else /* _POSIX_VERSION */
-  eprintf("This version does not support fork", __FILE__, __LINE__);
-#endif /* _POSIX_VERSION */
-}  
+    exit(EXIT_SUCCESS);
+#else /* HAVE_FORK */
+    /* Ignoring, as Check is not compiled with fork support. */
+    exit(EXIT_FAILURE);
+#endif /* HAVE_FORK */
+}
index 9f7f3d8..2ae093f 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #include "../lib/libcompat.h"
 #include "check_impl.h"
 #include "check_str.h"
 
-static const char *tr_type_str (TestResult *tr);
-static int percent_passed (TestStats *t);
+static const char *tr_type_str(TestResult * tr);
+static int percent_passed(TestStats * t);
 
-char *tr_str (TestResult *tr) 
+char *tr_str(TestResult * tr)
 {
-  const char *exact_msg;
-  char *rstr;
-  
-  exact_msg = (tr->rtype == CK_ERROR) ? "(after this point) ": "";
-  
-  rstr = ck_strdup_printf ("%s:%d:%s:%s:%s:%d: %s%s",
-                           tr->file, tr->line,
-                           tr_type_str(tr), tr->tcname, tr->tname, tr->iter,
-                           exact_msg, tr->msg);
-
-  return rstr;
+    const char *exact_msg;
+    char *rstr;
+
+    exact_msg = (tr->rtype == CK_ERROR) ? "(after this point) " : "";
+
+    rstr = ck_strdup_printf("%s:%d:%s:%s:%s:%d: %s%s",
+                            tr->file, tr->line,
+                            tr_type_str(tr), tr->tcname, tr->tname, tr->iter,
+                            exact_msg, tr->msg);
+
+    return rstr;
 }
 
-char *tr_short_str (TestResult *tr) 
+char *tr_short_str(TestResult * tr)
 {
-  const char *exact_msg;
-  char *rstr;
-  
-  exact_msg = (tr->rtype == CK_ERROR) ? "(after this point) ": "";
-  
-  rstr = ck_strdup_printf ("%s:%d: %s%s",
-                           tr->file, tr->line,
-                           exact_msg, tr->msg);
-
-  return rstr;
+    const char *exact_msg;
+    char *rstr;
+
+    exact_msg = (tr->rtype == CK_ERROR) ? "(after this point) " : "";
+
+    rstr = ck_strdup_printf("%s:%d: %s%s",
+                            tr->file, tr->line, exact_msg, tr->msg);
+
+    return rstr;
 }
 
-char *sr_stat_str (SRunner *sr)
+char *sr_stat_str(SRunner * sr)
 {
-  char *str;
-  TestStats *ts;
-  
-  ts = sr->stats;
-  
-  str = ck_strdup_printf ("%d%%: Checks: %d, Failures: %d, Errors: %d",
-                          percent_passed (ts), ts->n_checked, ts->n_failed,
-                          ts->n_errors);
-
-  return str;
+    char *str;
+    TestStats *ts;
+
+    ts = sr->stats;
+
+    str = ck_strdup_printf("%d%%: Checks: %d, Failures: %d, Errors: %d",
+                           percent_passed(ts), ts->n_checked, ts->n_failed,
+                           ts->n_errors);
+
+    return str;
 }
 
-char *ck_strdup_printf (const char *fmt, ...)
+char *ck_strdup_printf(const char *fmt, ...)
 {
-  /* Guess we need no more than 100 bytes. */
-  int n, size = 100;
-  char *p;
-  va_list ap;
+    /* Guess we need no more than 100 bytes. */
+    int n;
+    size_t size = 100;
+    char *p;
+    va_list ap;
 
-  p = emalloc (size);
+    p = (char *)emalloc(size);
 
-  while (1)
+    while(1)
     {
-      /* Try to print in the allocated space. */
-      va_start(ap, fmt);
-      n = vsnprintf (p, size, fmt, ap);
-      va_end(ap);
-      /* If that worked, return the string. */
-      if (n > -1 && n < size)
-        return p;
-
-      /* Else try again with more space. */
-      if (n > -1)   /* C99 conform vsnprintf() */
-        size = n+1; /* precisely what is needed */
-      else          /* glibc 2.0 */
-        size *= 2;  /* twice the old size */
-
-      p = erealloc (p, size);
+        /* Try to print in the allocated space. */
+        va_start(ap, fmt);
+        n = vsnprintf(p, size, fmt, ap);
+        va_end(ap);
+        /* If that worked, return the string. */
+        if(n > -1 && n < (int)size)
+            return p;
+
+        /* Else try again with more space. */
+        if(n > -1)              /* C99 conform vsnprintf() */
+            size = (size_t) n + 1;      /* precisely what is needed */
+        else                    /* glibc 2.0 */
+            size *= 2;          /* twice the old size */
+
+        p = (char *)erealloc(p, size);
     }
 }
 
-static const char *tr_type_str (TestResult *tr)
+static const char *tr_type_str(TestResult * tr)
 {
-  const char *str = NULL;
-  if (tr->ctx == CK_CTX_TEST) {
-    if (tr->rtype == CK_PASS)
-      str = "P";
-    else if (tr->rtype == CK_FAILURE)
-      str = "F";
-    else if (tr->rtype == CK_ERROR)
-      str = "E";
-  } else
-    str = "S";
-
-  return str;
+    if(tr->ctx == CK_CTX_TEST)
+    {
+        if(tr->rtype == CK_PASS)
+            return "P";
+        if(tr->rtype == CK_FAILURE)
+            return "F";
+        if(tr->rtype == CK_ERROR)
+            return "E";
+        return NULL;
+    }
+    return "S";
 }
 
-static int percent_passed (TestStats *t)
+static int percent_passed(TestStats * t)
 {
-  if (t->n_failed == 0 && t->n_errors == 0)
-    return 100;
-  else if (t->n_checked == 0)
-    return 0;
-  else
-    return (int) ( (float) (t->n_checked - (t->n_failed + t->n_errors)) /
-                  (float) t->n_checked * 100);
+    if(t->n_failed == 0 && t->n_errors == 0)
+        return 100;
+    if(t->n_checked == 0)
+        return 0;
+    return (int)((float)(t->n_checked - (t->n_failed + t->n_errors)) /
+                 (float)t->n_checked * 100);
 }
index bd41055..b26eae2 100644 (file)
@@ -14,8 +14,8 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
  */
 
 #ifndef CHECK_STR_H
 
 /* Return a string representation of the given TestResult.  Return
    value has been malloc'd, and must be freed by the caller */
-char *tr_str (TestResult *tr);
+char *tr_str(TestResult * tr);
 
 /* Return a string representation of the given TestResult message
    without the test id or result type. This is suitable for separate
    formatting of the test and the message. Return value has been 
    malloc'd, and must be freed by the caller */
-char *tr_short_str (TestResult *tr);
+char *tr_short_str(TestResult * tr);
 
 /* Return a string representation of the given SRunner's run
    statistics (% passed, num run, passed, errors, failures). Return
    value has been malloc'd, and must be freed by the caller
-*/ 
-char *sr_stat_str (SRunner *sr);
+*/
+char *sr_stat_str(SRunner * sr);
 
-char *ck_strdup_printf (const char *fmt, ...);
+char *ck_strdup_printf(const char *fmt, ...);
 
 #endif /* CHECK_STR_H */
diff --git a/test-driver b/test-driver
new file mode 100755 (executable)
index 0000000..8e575b0
--- /dev/null
@@ -0,0 +1,148 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2013-07-13.22; # UTC
+
+# Copyright (C) 2011-2014 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, see <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error.  This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+  echo "$0: $*" >&2
+  print_usage >&2
+  exit 2
+}
+
+print_usage ()
+{
+  cat <<END
+Usage:
+  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+              [--expect-failure={yes|no}] [--color-tests={yes|no}]
+              [--enable-hard-errors={yes|no}] [--]
+              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+test_name= # Used for reporting.
+log_file=  # Where to save the output of the test script.
+trs_file=  # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+  case $1 in
+  --help) print_usage; exit $?;;
+  --version) echo "test-driver $scriptversion"; exit $?;;
+  --test-name) test_name=$2; shift;;
+  --log-file) log_file=$2; shift;;
+  --trs-file) trs_file=$2; shift;;
+  --color-tests) color_tests=$2; shift;;
+  --expect-failure) expect_failure=$2; shift;;
+  --enable-hard-errors) enable_hard_errors=$2; shift;;
+  --) shift; break;;
+  -*) usage_error "invalid option: '$1'";;
+   *) break;;
+  esac
+  shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+  usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+  usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+  red='\e[0;31m' # Red.
+  grn='\e[0;32m' # Green.
+  lgn='\e[1;32m' # Light green.
+  blu='\e[1;34m' # Blue.
+  mgn='\e[0;35m' # Magenta.
+  std='\e[m'     # No color.
+else
+  red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
+  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
+  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
+  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
+  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b3d7ab7
--- /dev/null
@@ -0,0 +1,91 @@
+#
+# Check: a unit test framework for C
+#
+# Copyright (C) 2011 Mateusz Loskot
+# Copyright (C) 2001, 2002 Arien Malec
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
+# Enable finding check.h
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src)
+
+# For the test_vars.in script, to give the unit test shell script
+# runners the location of the source files
+set(srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
+
+if(WIN32)
+  # CMake uses Unix slashes for everything, but the tests that
+  # read srcdir expect platform specific slashes. There are two
+  # slashes because the shell scripts will consume srcdir.
+  string(REPLACE "/" "\\\\" srcdir "${srcdir}")
+  set(EXEEXT ".exe")
+  set(IS_MSVC "1")
+endif(WIN32)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test_vars.in
+  ${CMAKE_CURRENT_BINARY_DIR}/test_vars)
+
+include(CTest)
+
+set(CHECK_CHECK_SOURCES
+  check_check_exit.c
+  check_check_fixture.c
+  check_check_fork.c
+  check_check_limit.c
+  check_check_log.c
+  check_check_log_internal.c
+  check_check_main.c
+  check_check_master.c
+  check_check_msg.c
+  check_check_pack.c
+  check_check_selective.c
+  check_check_sub.c
+  check_check_tags.c
+  check_list.c)
+set(CHECK_CHECK_HEADERS check_check.h)
+add_executable(check_check ${CHECK_CHECK_HEADERS} ${CHECK_CHECK_SOURCES})
+target_link_libraries(check_check check compat)
+
+set(CHECK_CHECK_EXPORT_SOURCES
+  check_check_sub.c
+  check_check_master.c
+  check_check_log.c
+  check_check_fork.c
+  check_check_export_main.c
+)
+set(CHECK_CHECK_EXPORT_HEADERS check_check.h)
+add_executable(check_check_export
+  ${CHECK_CHECK_EXPORT_HEADERS}
+  ${CHECK_CHECK_EXPORT_SOURCES})
+target_link_libraries(check_check_export check compat)
+
+set(EX_OUTPUT_SOURCES ex_output.c)
+add_executable(ex_output ${EX_OUTPUT_SOURCES})
+target_link_libraries(ex_output check compat)
+
+set(CHECK_NOFORK_SOURCES check_nofork.c)
+add_executable(check_nofork ${CHECK_NOFORK_SOURCES})
+target_link_libraries(check_nofork check compat)
+
+set(CHECK_NOFORK_TEARDOWN_SOURCES check_nofork_teardown.c)
+add_executable(check_nofork_teardown ${CHECK_NOFORK_TEARDOWN_SOURCES})
+target_link_libraries(check_nofork_teardown check compat)
+
+set(CHECK_SET_MAX_MSG_SIZE_SOURCES check_set_max_msg_size.c)
+add_executable(check_set_max_msg_size ${CHECK_SET_MAX_MSG_SIZE_SOURCES})
+target_link_libraries(check_set_max_msg_size check compat)
index 0e8ddc7..4616288 100644 (file)
@@ -4,8 +4,12 @@ TESTS = \
        check_check_export      \
        check_check             \
        test_output.sh          \
+       test_check_nofork.sh    \
+       test_check_nofork_teardown.sh    \
        test_xml_output.sh      \
-       test_log_output.sh
+       test_log_output.sh      \
+       test_set_max_msg_size.sh        \
+       test_tap_output.sh
 
 # check_thread_stress is kind of slow.
 # add this line back to TESTS to enable check_thread_stress
@@ -15,16 +19,18 @@ TESTS = \
 # XFAIL_TESTS = \
 #      check_thread_stress
 
-noinst_PROGRAMS = \
-       check_check_export \
-       check_check     \
-       check_stress    \
-       check_thread_stress \
-       ex_output       \
-       ex_xml_output   \
-       ex_log_output
+noinst_PROGRAMS =              \
+       check_check_export      \
+       check_check             \
+       check_stress            \
+       check_thread_stress     \
+       check_nofork            \
+       check_nofork_teardown \
+       check_mem_leaks         \
+       check_set_max_msg_size  \
+       ex_output
 
-EXTRA_DIST = test_output.sh test_log_output.sh test_vars.in test_xml_output.sh
+EXTRA_DIST = test_output.sh test_check_nofork.sh test_check_nofork_teardown.sh test_log_output.sh test_vars.in test_xml_output.sh test_tap_output.sh test_mem_leaks.sh test_output_strings test_set_max_msg_size.sh
 
 if NO_TIMEOUT_TESTS
 check_check_CFLAGS = -DTIMEOUT_TESTS_ENABLED=0
@@ -37,6 +43,7 @@ check_check_export_SOURCES = \
        check_check_master.c    \
        check_check_log.c       \
        check_check_fork.c      \
+       check_check_tags.c      \
        check_check_export_main.c
 check_check_export_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 
@@ -53,9 +60,27 @@ check_check_SOURCES = \
        check_check_fixture.c           \
        check_check_pack.c              \
        check_check_exit.c              \
+       check_check_selective.c         \
+       check_check_tags.c              \
        check_check_main.c
 check_check_LDADD = $(top_builddir)/src/libcheckinternal.la $(top_builddir)/lib/libcompat.la
 
+check_mem_leaks_SOURCES =      \
+       check_mem_leaks.c               \
+       check_check_log.c               \
+       check_check_fork.c              \
+       check_check_exit.c              \
+       check_check_selective.c \
+       check_check_tags.c              \
+       check_check_sub.c               \
+       check_check_master.c
+check_mem_leaks_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+check_mem_leaks_CFLAGS = -DTIMEOUT_TESTS_ENABLED=0 -DMEMORY_LEAKING_TESTS_ENABLED=0
+
+check_set_max_msg_size_SOURCES =       \
+       check_set_max_msg_size.c
+check_set_max_msg_size_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+
 check_stress_SOURCES = check_stress.c
 check_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 
@@ -63,15 +88,15 @@ check_thread_stress_SOURCES = check_thread_stress.c
 check_thread_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la @PTHREAD_LIBS@
 check_thread_stress_CFLAGS = @PTHREAD_CFLAGS@
 
-ex_output_SOURCES = ex_output.c
-ex_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+check_nofork_SOURCES = check_nofork.c
+check_nofork_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 
-ex_log_output_SOURCES = ex_log_output.c
-ex_log_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+check_nofork_teardown_SOURCES = check_nofork_teardown.c
+check_nofork_teardown_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 
-ex_xml_output_SOURCES = ex_xml_output.c
-ex_xml_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+ex_output_SOURCES = ex_output.c
+ex_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 
 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
 
-CLEANFILES = *~ *.log *.xml test_logfile
+CLEANFILES = *~ *.log *.xml *.tap test_logfile
index fd44540..10ec6b6 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 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.
+# Copyright (C) 1994-2014 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -33,26 +89,30 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 TESTS = check_check_export$(EXEEXT) check_check$(EXEEXT) \
-       test_output.sh test_xml_output.sh test_log_output.sh
+       test_output.sh test_check_nofork.sh \
+       test_check_nofork_teardown.sh test_xml_output.sh \
+       test_log_output.sh test_set_max_msg_size.sh test_tap_output.sh
 noinst_PROGRAMS = check_check_export$(EXEEXT) check_check$(EXEEXT) \
        check_stress$(EXEEXT) check_thread_stress$(EXEEXT) \
-       ex_output$(EXEEXT) ex_xml_output$(EXEEXT) \
-       ex_log_output$(EXEEXT)
+       check_nofork$(EXEEXT) check_nofork_teardown$(EXEEXT) \
+       check_mem_leaks$(EXEEXT) check_set_max_msg_size$(EXEEXT) \
+       ex_output$(EXEEXT)
 subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/test_vars.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
        $(top_srcdir)/m4/ax_c_check_flag.m4 \
-       $(top_srcdir)/m4/ax_cflags_warn_all_ansi.m4 \
-       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/ax_create_stdint_h.m4 \
+       $(top_srcdir)/m4/librt_timers.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = test_vars
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_check_check_OBJECTS = check_check-check_list.$(OBJEXT) \
        check_check-check_check_sub.$(OBJEXT) \
@@ -65,11 +125,17 @@ am_check_check_OBJECTS = check_check-check_list.$(OBJEXT) \
        check_check-check_check_fixture.$(OBJEXT) \
        check_check-check_check_pack.$(OBJEXT) \
        check_check-check_check_exit.$(OBJEXT) \
+       check_check-check_check_selective.$(OBJEXT) \
+       check_check-check_check_tags.$(OBJEXT) \
        check_check-check_check_main.$(OBJEXT)
 check_check_OBJECTS = $(am_check_check_OBJECTS)
 check_check_DEPENDENCIES = $(top_builddir)/src/libcheckinternal.la \
        $(top_builddir)/lib/libcompat.la
-check_check_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+check_check_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(check_check_CFLAGS) \
        $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 am_check_check_export_OBJECTS =  \
@@ -77,14 +143,43 @@ am_check_check_export_OBJECTS =  \
        check_check_export-check_check_master.$(OBJEXT) \
        check_check_export-check_check_log.$(OBJEXT) \
        check_check_export-check_check_fork.$(OBJEXT) \
+       check_check_export-check_check_tags.$(OBJEXT) \
        check_check_export-check_check_export_main.$(OBJEXT)
 check_check_export_OBJECTS = $(am_check_check_export_OBJECTS)
 check_check_export_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
        $(top_builddir)/lib/libcompat.la
-check_check_export_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+check_check_export_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(check_check_export_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
+am_check_mem_leaks_OBJECTS =  \
+       check_mem_leaks-check_mem_leaks.$(OBJEXT) \
+       check_mem_leaks-check_check_log.$(OBJEXT) \
+       check_mem_leaks-check_check_fork.$(OBJEXT) \
+       check_mem_leaks-check_check_exit.$(OBJEXT) \
+       check_mem_leaks-check_check_selective.$(OBJEXT) \
+       check_mem_leaks-check_check_tags.$(OBJEXT) \
+       check_mem_leaks-check_check_sub.$(OBJEXT) \
+       check_mem_leaks-check_check_master.$(OBJEXT)
+check_mem_leaks_OBJECTS = $(am_check_mem_leaks_OBJECTS)
+check_mem_leaks_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
+       $(top_builddir)/lib/libcompat.la
+check_mem_leaks_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(check_mem_leaks_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+       -o $@
+am_check_nofork_OBJECTS = check_nofork.$(OBJEXT)
+check_nofork_OBJECTS = $(am_check_nofork_OBJECTS)
+check_nofork_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
+       $(top_builddir)/lib/libcompat.la
+am_check_nofork_teardown_OBJECTS = check_nofork_teardown.$(OBJEXT)
+check_nofork_teardown_OBJECTS = $(am_check_nofork_teardown_OBJECTS)
+check_nofork_teardown_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
+       $(top_builddir)/lib/libcompat.la
+am_check_set_max_msg_size_OBJECTS = check_set_max_msg_size.$(OBJEXT)
+check_set_max_msg_size_OBJECTS = $(am_check_set_max_msg_size_OBJECTS)
+check_set_max_msg_size_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
+       $(top_builddir)/lib/libcompat.la
 am_check_stress_OBJECTS = check_stress.$(OBJEXT)
 check_stress_OBJECTS = $(am_check_stress_OBJECTS)
 check_stress_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
@@ -94,52 +189,299 @@ am_check_thread_stress_OBJECTS =  \
 check_thread_stress_OBJECTS = $(am_check_thread_stress_OBJECTS)
 check_thread_stress_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
        $(top_builddir)/lib/libcompat.la
-check_thread_stress_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+check_thread_stress_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(check_thread_stress_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-am_ex_log_output_OBJECTS = ex_log_output.$(OBJEXT)
-ex_log_output_OBJECTS = $(am_ex_log_output_OBJECTS)
-ex_log_output_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
-       $(top_builddir)/lib/libcompat.la
 am_ex_output_OBJECTS = ex_output.$(OBJEXT)
 ex_output_OBJECTS = $(am_ex_output_OBJECTS)
 ex_output_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
        $(top_builddir)/lib/libcompat.la
-am_ex_xml_output_OBJECTS = ex_xml_output.$(OBJEXT)
-ex_xml_output_OBJECTS = $(am_ex_xml_output_OBJECTS)
-ex_xml_output_DEPENDENCIES = $(top_builddir)/src/libcheck.la \
-       $(top_builddir)/lib/libcompat.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(check_check_SOURCES) $(check_check_export_SOURCES) \
-       $(check_stress_SOURCES) $(check_thread_stress_SOURCES) \
-       $(ex_log_output_SOURCES) $(ex_output_SOURCES) \
-       $(ex_xml_output_SOURCES)
+       $(check_mem_leaks_SOURCES) $(check_nofork_SOURCES) \
+       $(check_nofork_teardown_SOURCES) \
+       $(check_set_max_msg_size_SOURCES) $(check_stress_SOURCES) \
+       $(check_thread_stress_SOURCES) $(ex_output_SOURCES)
 DIST_SOURCES = $(check_check_SOURCES) $(check_check_export_SOURCES) \
-       $(check_stress_SOURCES) $(check_thread_stress_SOURCES) \
-       $(ex_log_output_SOURCES) $(ex_output_SOURCES) \
-       $(ex_xml_output_SOURCES)
+       $(check_mem_leaks_SOURCES) $(check_nofork_SOURCES) \
+       $(check_nofork_teardown_SOURCES) \
+       $(check_set_max_msg_size_SOURCES) $(check_stress_SOURCES) \
+       $(check_thread_stress_SOURCES) $(ex_output_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+am__tty_colors = { \
+  $(am__tty_colors_dummy); \
+  if test "X$(AM_COLOR_TESTS)" = Xno; then \
+    am__color_tests=no; \
+  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+    am__color_tests=yes; \
+  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+    am__color_tests=yes; \
+  fi; \
+  if test $$am__color_tests = yes; then \
+    red='\e[0;31m'; \
+    grn='\e[0;32m'; \
+    lgn='\e[1;32m'; \
+    blu='\e[1;34m'; \
+    mgn='\e[0;35m'; \
+    brg='\e[1m'; \
+    std='\e[m'; \
+  fi; \
+}
+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 = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__recheck_rx = ^[    ]*:recheck:[    ]*
+am__global_test_result_rx = ^[         ]*:global-test-result:[         ]*
+am__copy_in_global_log_rx = ^[         ]*:copy-in-global-log:[         ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+  recheck = 1; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+        { \
+          if ((getline line2 < ($$0 ".log")) < 0) \
+           recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+        { \
+          recheck = 0; \
+          break; \
+        } \
+      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+        { \
+          break; \
+        } \
+    }; \
+  if (recheck) \
+    print $$0; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+  print "fatal: making $@: " msg | "cat >&2"; \
+  exit 1; \
+} \
+function rst_section(header) \
+{ \
+  print header; \
+  len = length(header); \
+  for (i = 1; i <= len; i = i + 1) \
+    printf "="; \
+  printf "\n\n"; \
+} \
+{ \
+  copy_in_global_log = 1; \
+  global_test_result = "RUN"; \
+  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+    { \
+      if (rc < 0) \
+         fatal("failed to read from " $$0 ".trs"); \
+      if (line ~ /$(am__global_test_result_rx)/) \
+        { \
+          sub("$(am__global_test_result_rx)", "", line); \
+          sub("[       ]*$$", "", line); \
+          global_test_result = line; \
+        } \
+      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+        copy_in_global_log = 0; \
+    }; \
+  if (copy_in_global_log) \
+    { \
+      rst_section(global_test_result ": " $$0); \
+      while ((rc = (getline line < ($$0 ".log"))) != 0) \
+      { \
+        if (rc < 0) \
+          fatal("failed to read from " $$0 ".log"); \
+        print line; \
+      }; \
+      printf "\n"; \
+    }; \
+  close ($$0 ".trs"); \
+  close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+  --color-tests "$$am__color_tests" \
+  --enable-hard-errors "$$am__enable_hard_errors" \
+  --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test.  Creates the
+# directory for the log if needed.  Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup);                                     \
+$(am__vpath_adj_setup) $(am__vpath_adj)                        \
+$(am__tty_colors);                                     \
+srcdir=$(srcdir); export srcdir;                       \
+case "$@" in                                           \
+  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;   \
+    *) am__odir=.;;                                    \
+esac;                                                  \
+test "x$$am__odir" = x"." || test -d "$$am__odir"      \
+  || $(MKDIR_P) "$$am__odir" || exit $$?;              \
+if test -f "./$$f"; then dir=./;                       \
+elif test -f "$$f"; then dir=;                         \
+else dir="$(srcdir)/"; fi;                             \
+tst=$$dir$$f; log='$@';                                \
+if test -n '$(DISABLE_HARD_ERRORS)'; then              \
+  am__enable_hard_errors=no;                           \
+else                                                   \
+  am__enable_hard_errors=yes;                          \
+fi;                                                    \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    am__expect_failure=yes;;                           \
+  *)                                                   \
+    am__expect_failure=no;;                            \
+esac;                                                  \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed).  The result is saved in the shell variable
+# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+  bases='$(TEST_LOGS)'; \
+  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+  bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+       $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/test_vars.in \
+       $(top_srcdir)/depcomp $(top_srcdir)/test-driver
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+AWK_GSUB_DBL_BSLASH = @AWK_GSUB_DBL_BSLASH@
+AWK_PATH = @AWK_PATH@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -152,20 +494,25 @@ CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DSYMUTIL = @DSYMUTIL@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_REGEX = @ENABLE_REGEX@
 ENABLE_SUBUNIT = @ENABLE_SUBUNIT@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+FILTERDIFF = @FILTERDIFF@
 GCOV = @GCOV@
 GCOV_CFLAGS = @GCOV_CFLAGS@
 GCOV_LIBS = @GCOV_LIBS@
 GENHTML = @GENHTML@
 GREP = @GREP@
+HAVE_FORK = @HAVE_FORK@
+HAVE_REGEX = @HAVE_REGEX@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -176,11 +523,16 @@ LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBSUBUNIT_CFLAGS = @LIBSUBUNIT_CFLAGS@
+LIBSUBUNIT_LIBS = @LIBSUBUNIT_LIBS@
+LIBSUBUNIT_PC = @LIBSUBUNIT_PC@
 LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
 NM = @NM@
 NMEDIT = @NMEDIT@
@@ -193,8 +545,12 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -209,6 +565,7 @@ abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 acx_pthread_config = @acx_pthread_config@
@@ -242,7 +599,6 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -250,6 +606,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -258,7 +615,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-EXTRA_DIST = test_output.sh test_log_output.sh test_vars.in test_xml_output.sh
+EXTRA_DIST = test_output.sh test_check_nofork.sh test_check_nofork_teardown.sh test_log_output.sh test_vars.in test_xml_output.sh test_tap_output.sh test_mem_leaks.sh test_output_strings test_set_max_msg_size.sh
 @NO_TIMEOUT_TESTS_TRUE@check_check_CFLAGS = -DTIMEOUT_TESTS_ENABLED=0
 @NO_TIMEOUT_TESTS_TRUE@check_check_export_CFLAGS = -DTIMEOUT_TESTS_ENABLED=0
 check_check_export_SOURCES = \
@@ -267,6 +624,7 @@ check_check_export_SOURCES = \
        check_check_master.c    \
        check_check_log.c       \
        check_check_fork.c      \
+       check_check_tags.c      \
        check_check_export_main.c
 
 check_check_export_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
@@ -283,26 +641,44 @@ check_check_SOURCES = \
        check_check_fixture.c           \
        check_check_pack.c              \
        check_check_exit.c              \
+       check_check_selective.c         \
+       check_check_tags.c              \
        check_check_main.c
 
 check_check_LDADD = $(top_builddir)/src/libcheckinternal.la $(top_builddir)/lib/libcompat.la
+check_mem_leaks_SOURCES = \
+       check_mem_leaks.c               \
+       check_check_log.c               \
+       check_check_fork.c              \
+       check_check_exit.c              \
+       check_check_selective.c \
+       check_check_tags.c              \
+       check_check_sub.c               \
+       check_check_master.c
+
+check_mem_leaks_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+check_mem_leaks_CFLAGS = -DTIMEOUT_TESTS_ENABLED=0 -DMEMORY_LEAKING_TESTS_ENABLED=0
+check_set_max_msg_size_SOURCES = \
+       check_set_max_msg_size.c
+
+check_set_max_msg_size_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 check_stress_SOURCES = check_stress.c
 check_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 check_thread_stress_SOURCES = check_thread_stress.c
 check_thread_stress_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la @PTHREAD_LIBS@
 check_thread_stress_CFLAGS = @PTHREAD_CFLAGS@
+check_nofork_SOURCES = check_nofork.c
+check_nofork_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
+check_nofork_teardown_SOURCES = check_nofork_teardown.c
+check_nofork_teardown_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 ex_output_SOURCES = ex_output.c
 ex_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
-ex_log_output_SOURCES = ex_log_output.c
-ex_log_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
-ex_xml_output_SOURCES = ex_xml_output.c
-ex_xml_output_LDADD = $(top_builddir)/src/libcheck.la $(top_builddir)/lib/libcompat.la
 AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
-CLEANFILES = *~ *.log *.xml test_logfile
+CLEANFILES = *~ *.log *.xml *.tap test_logfile
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -312,10 +688,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits  tests/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnits  tests/Makefile
-.PRECIOUS: Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits tests/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnits tests/Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -332,36 +707,54 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 test_vars: $(top_builddir)/config.status $(srcdir)/test_vars.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 clean-noinstPROGRAMS:
-       @list='$(noinst_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
-check_check$(EXEEXT): $(check_check_OBJECTS) $(check_check_DEPENDENCIES) 
+       @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+check_check$(EXEEXT): $(check_check_OBJECTS) $(check_check_DEPENDENCIES) $(EXTRA_check_check_DEPENDENCIES) 
        @rm -f check_check$(EXEEXT)
-       $(check_check_LINK) $(check_check_OBJECTS) $(check_check_LDADD) $(LIBS)
-check_check_export$(EXEEXT): $(check_check_export_OBJECTS) $(check_check_export_DEPENDENCIES) 
+       $(AM_V_CCLD)$(check_check_LINK) $(check_check_OBJECTS) $(check_check_LDADD) $(LIBS)
+
+check_check_export$(EXEEXT): $(check_check_export_OBJECTS) $(check_check_export_DEPENDENCIES) $(EXTRA_check_check_export_DEPENDENCIES) 
        @rm -f check_check_export$(EXEEXT)
-       $(check_check_export_LINK) $(check_check_export_OBJECTS) $(check_check_export_LDADD) $(LIBS)
-check_stress$(EXEEXT): $(check_stress_OBJECTS) $(check_stress_DEPENDENCIES) 
+       $(AM_V_CCLD)$(check_check_export_LINK) $(check_check_export_OBJECTS) $(check_check_export_LDADD) $(LIBS)
+
+check_mem_leaks$(EXEEXT): $(check_mem_leaks_OBJECTS) $(check_mem_leaks_DEPENDENCIES) $(EXTRA_check_mem_leaks_DEPENDENCIES) 
+       @rm -f check_mem_leaks$(EXEEXT)
+       $(AM_V_CCLD)$(check_mem_leaks_LINK) $(check_mem_leaks_OBJECTS) $(check_mem_leaks_LDADD) $(LIBS)
+
+check_nofork$(EXEEXT): $(check_nofork_OBJECTS) $(check_nofork_DEPENDENCIES) $(EXTRA_check_nofork_DEPENDENCIES) 
+       @rm -f check_nofork$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(check_nofork_OBJECTS) $(check_nofork_LDADD) $(LIBS)
+
+check_nofork_teardown$(EXEEXT): $(check_nofork_teardown_OBJECTS) $(check_nofork_teardown_DEPENDENCIES) $(EXTRA_check_nofork_teardown_DEPENDENCIES) 
+       @rm -f check_nofork_teardown$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(check_nofork_teardown_OBJECTS) $(check_nofork_teardown_LDADD) $(LIBS)
+
+check_set_max_msg_size$(EXEEXT): $(check_set_max_msg_size_OBJECTS) $(check_set_max_msg_size_DEPENDENCIES) $(EXTRA_check_set_max_msg_size_DEPENDENCIES) 
+       @rm -f check_set_max_msg_size$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(check_set_max_msg_size_OBJECTS) $(check_set_max_msg_size_LDADD) $(LIBS)
+
+check_stress$(EXEEXT): $(check_stress_OBJECTS) $(check_stress_DEPENDENCIES) $(EXTRA_check_stress_DEPENDENCIES) 
        @rm -f check_stress$(EXEEXT)
-       $(LINK) $(check_stress_OBJECTS) $(check_stress_LDADD) $(LIBS)
-check_thread_stress$(EXEEXT): $(check_thread_stress_OBJECTS) $(check_thread_stress_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) $(check_stress_OBJECTS) $(check_stress_LDADD) $(LIBS)
+
+check_thread_stress$(EXEEXT): $(check_thread_stress_OBJECTS) $(check_thread_stress_DEPENDENCIES) $(EXTRA_check_thread_stress_DEPENDENCIES) 
        @rm -f check_thread_stress$(EXEEXT)
-       $(check_thread_stress_LINK) $(check_thread_stress_OBJECTS) $(check_thread_stress_LDADD) $(LIBS)
-ex_log_output$(EXEEXT): $(ex_log_output_OBJECTS) $(ex_log_output_DEPENDENCIES) 
-       @rm -f ex_log_output$(EXEEXT)
-       $(LINK) $(ex_log_output_OBJECTS) $(ex_log_output_LDADD) $(LIBS)
-ex_output$(EXEEXT): $(ex_output_OBJECTS) $(ex_output_DEPENDENCIES) 
+       $(AM_V_CCLD)$(check_thread_stress_LINK) $(check_thread_stress_OBJECTS) $(check_thread_stress_LDADD) $(LIBS)
+
+ex_output$(EXEEXT): $(ex_output_OBJECTS) $(ex_output_DEPENDENCIES) $(EXTRA_ex_output_DEPENDENCIES) 
        @rm -f ex_output$(EXEEXT)
-       $(LINK) $(ex_output_OBJECTS) $(ex_output_LDADD) $(LIBS)
-ex_xml_output$(EXEEXT): $(ex_xml_output_OBJECTS) $(ex_xml_output_DEPENDENCIES) 
-       @rm -f ex_xml_output$(EXEEXT)
-       $(LINK) $(ex_xml_output_OBJECTS) $(ex_xml_output_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(ex_output_OBJECTS) $(ex_output_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -379,291 +772,457 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_check_master.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_check_msg.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_check_pack.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_check_selective.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_check_sub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_check_tags.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check-check_list.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check_export-check_check_export_main.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check_export-check_check_fork.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check_export-check_check_log.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check_export-check_check_master.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check_export-check_check_sub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_check_export-check_check_tags.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_exit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_fork.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_log.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_master.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_selective.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_sub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_check_tags.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mem_leaks-check_mem_leaks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_nofork.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_nofork_teardown.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_set_max_msg_size.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_stress.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_thread_stress-check_thread_stress.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ex_log_output.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ex_output.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ex_xml_output.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 check_check-check_list.o: check_list.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_list.o -MD -MP -MF $(DEPDIR)/check_check-check_list.Tpo -c -o check_check-check_list.o `test -f 'check_list.c' || echo '$(srcdir)/'`check_list.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_list.Tpo $(DEPDIR)/check_check-check_list.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_list.c' object='check_check-check_list.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_list.o -MD -MP -MF $(DEPDIR)/check_check-check_list.Tpo -c -o check_check-check_list.o `test -f 'check_list.c' || echo '$(srcdir)/'`check_list.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_list.Tpo $(DEPDIR)/check_check-check_list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_list.c' object='check_check-check_list.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_list.o `test -f 'check_list.c' || echo '$(srcdir)/'`check_list.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_list.o `test -f 'check_list.c' || echo '$(srcdir)/'`check_list.c
 
 check_check-check_list.obj: check_list.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_list.obj -MD -MP -MF $(DEPDIR)/check_check-check_list.Tpo -c -o check_check-check_list.obj `if test -f 'check_list.c'; then $(CYGPATH_W) 'check_list.c'; else $(CYGPATH_W) '$(srcdir)/check_list.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_list.Tpo $(DEPDIR)/check_check-check_list.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_list.c' object='check_check-check_list.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_list.obj -MD -MP -MF $(DEPDIR)/check_check-check_list.Tpo -c -o check_check-check_list.obj `if test -f 'check_list.c'; then $(CYGPATH_W) 'check_list.c'; else $(CYGPATH_W) '$(srcdir)/check_list.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_list.Tpo $(DEPDIR)/check_check-check_list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_list.c' object='check_check-check_list.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_list.obj `if test -f 'check_list.c'; then $(CYGPATH_W) 'check_list.c'; else $(CYGPATH_W) '$(srcdir)/check_list.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_list.obj `if test -f 'check_list.c'; then $(CYGPATH_W) 'check_list.c'; else $(CYGPATH_W) '$(srcdir)/check_list.c'; fi`
 
 check_check-check_check_sub.o: check_check_sub.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_sub.o -MD -MP -MF $(DEPDIR)/check_check-check_check_sub.Tpo -c -o check_check-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_sub.Tpo $(DEPDIR)/check_check-check_check_sub.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_sub.c' object='check_check-check_check_sub.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_sub.o -MD -MP -MF $(DEPDIR)/check_check-check_check_sub.Tpo -c -o check_check-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_sub.Tpo $(DEPDIR)/check_check-check_check_sub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_sub.c' object='check_check-check_check_sub.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
 
 check_check-check_check_sub.obj: check_check_sub.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_sub.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_sub.Tpo -c -o check_check-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_sub.Tpo $(DEPDIR)/check_check-check_check_sub.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_sub.c' object='check_check-check_check_sub.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_sub.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_sub.Tpo -c -o check_check-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_sub.Tpo $(DEPDIR)/check_check-check_check_sub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_sub.c' object='check_check-check_check_sub.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
 
 check_check-check_check_master.o: check_check_master.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_master.o -MD -MP -MF $(DEPDIR)/check_check-check_check_master.Tpo -c -o check_check-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_master.Tpo $(DEPDIR)/check_check-check_check_master.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_master.c' object='check_check-check_check_master.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_master.o -MD -MP -MF $(DEPDIR)/check_check-check_check_master.Tpo -c -o check_check-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_master.Tpo $(DEPDIR)/check_check-check_check_master.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_master.c' object='check_check-check_check_master.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
 
 check_check-check_check_master.obj: check_check_master.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_master.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_master.Tpo -c -o check_check-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_master.Tpo $(DEPDIR)/check_check-check_check_master.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_master.c' object='check_check-check_check_master.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_master.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_master.Tpo -c -o check_check-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_master.Tpo $(DEPDIR)/check_check-check_check_master.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_master.c' object='check_check-check_check_master.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
 
 check_check-check_check_msg.o: check_check_msg.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_msg.o -MD -MP -MF $(DEPDIR)/check_check-check_check_msg.Tpo -c -o check_check-check_check_msg.o `test -f 'check_check_msg.c' || echo '$(srcdir)/'`check_check_msg.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_msg.Tpo $(DEPDIR)/check_check-check_check_msg.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_msg.c' object='check_check-check_check_msg.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_msg.o -MD -MP -MF $(DEPDIR)/check_check-check_check_msg.Tpo -c -o check_check-check_check_msg.o `test -f 'check_check_msg.c' || echo '$(srcdir)/'`check_check_msg.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_msg.Tpo $(DEPDIR)/check_check-check_check_msg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_msg.c' object='check_check-check_check_msg.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_msg.o `test -f 'check_check_msg.c' || echo '$(srcdir)/'`check_check_msg.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_msg.o `test -f 'check_check_msg.c' || echo '$(srcdir)/'`check_check_msg.c
 
 check_check-check_check_msg.obj: check_check_msg.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_msg.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_msg.Tpo -c -o check_check-check_check_msg.obj `if test -f 'check_check_msg.c'; then $(CYGPATH_W) 'check_check_msg.c'; else $(CYGPATH_W) '$(srcdir)/check_check_msg.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_msg.Tpo $(DEPDIR)/check_check-check_check_msg.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_msg.c' object='check_check-check_check_msg.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_msg.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_msg.Tpo -c -o check_check-check_check_msg.obj `if test -f 'check_check_msg.c'; then $(CYGPATH_W) 'check_check_msg.c'; else $(CYGPATH_W) '$(srcdir)/check_check_msg.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_msg.Tpo $(DEPDIR)/check_check-check_check_msg.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_msg.c' object='check_check-check_check_msg.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_msg.obj `if test -f 'check_check_msg.c'; then $(CYGPATH_W) 'check_check_msg.c'; else $(CYGPATH_W) '$(srcdir)/check_check_msg.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_msg.obj `if test -f 'check_check_msg.c'; then $(CYGPATH_W) 'check_check_msg.c'; else $(CYGPATH_W) '$(srcdir)/check_check_msg.c'; fi`
 
 check_check-check_check_log.o: check_check_log.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log.o -MD -MP -MF $(DEPDIR)/check_check-check_check_log.Tpo -c -o check_check-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_log.Tpo $(DEPDIR)/check_check-check_check_log.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_log.c' object='check_check-check_check_log.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log.o -MD -MP -MF $(DEPDIR)/check_check-check_check_log.Tpo -c -o check_check-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_log.Tpo $(DEPDIR)/check_check-check_check_log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log.c' object='check_check-check_check_log.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
 
 check_check-check_check_log.obj: check_check_log.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_log.Tpo -c -o check_check-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_log.Tpo $(DEPDIR)/check_check-check_check_log.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_log.c' object='check_check-check_check_log.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_log.Tpo -c -o check_check-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_log.Tpo $(DEPDIR)/check_check-check_check_log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log.c' object='check_check-check_check_log.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
 
 check_check-check_check_log_internal.o: check_check_log_internal.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log_internal.o -MD -MP -MF $(DEPDIR)/check_check-check_check_log_internal.Tpo -c -o check_check-check_check_log_internal.o `test -f 'check_check_log_internal.c' || echo '$(srcdir)/'`check_check_log_internal.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_log_internal.Tpo $(DEPDIR)/check_check-check_check_log_internal.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_log_internal.c' object='check_check-check_check_log_internal.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log_internal.o -MD -MP -MF $(DEPDIR)/check_check-check_check_log_internal.Tpo -c -o check_check-check_check_log_internal.o `test -f 'check_check_log_internal.c' || echo '$(srcdir)/'`check_check_log_internal.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_log_internal.Tpo $(DEPDIR)/check_check-check_check_log_internal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log_internal.c' object='check_check-check_check_log_internal.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log_internal.o `test -f 'check_check_log_internal.c' || echo '$(srcdir)/'`check_check_log_internal.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log_internal.o `test -f 'check_check_log_internal.c' || echo '$(srcdir)/'`check_check_log_internal.c
 
 check_check-check_check_log_internal.obj: check_check_log_internal.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log_internal.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_log_internal.Tpo -c -o check_check-check_check_log_internal.obj `if test -f 'check_check_log_internal.c'; then $(CYGPATH_W) 'check_check_log_internal.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log_internal.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_log_internal.Tpo $(DEPDIR)/check_check-check_check_log_internal.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_log_internal.c' object='check_check-check_check_log_internal.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_log_internal.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_log_internal.Tpo -c -o check_check-check_check_log_internal.obj `if test -f 'check_check_log_internal.c'; then $(CYGPATH_W) 'check_check_log_internal.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log_internal.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_log_internal.Tpo $(DEPDIR)/check_check-check_check_log_internal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log_internal.c' object='check_check-check_check_log_internal.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log_internal.obj `if test -f 'check_check_log_internal.c'; then $(CYGPATH_W) 'check_check_log_internal.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log_internal.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_log_internal.obj `if test -f 'check_check_log_internal.c'; then $(CYGPATH_W) 'check_check_log_internal.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log_internal.c'; fi`
 
 check_check-check_check_limit.o: check_check_limit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_limit.o -MD -MP -MF $(DEPDIR)/check_check-check_check_limit.Tpo -c -o check_check-check_check_limit.o `test -f 'check_check_limit.c' || echo '$(srcdir)/'`check_check_limit.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_limit.Tpo $(DEPDIR)/check_check-check_check_limit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_limit.c' object='check_check-check_check_limit.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_limit.o -MD -MP -MF $(DEPDIR)/check_check-check_check_limit.Tpo -c -o check_check-check_check_limit.o `test -f 'check_check_limit.c' || echo '$(srcdir)/'`check_check_limit.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_limit.Tpo $(DEPDIR)/check_check-check_check_limit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_limit.c' object='check_check-check_check_limit.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_limit.o `test -f 'check_check_limit.c' || echo '$(srcdir)/'`check_check_limit.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_limit.o `test -f 'check_check_limit.c' || echo '$(srcdir)/'`check_check_limit.c
 
 check_check-check_check_limit.obj: check_check_limit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_limit.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_limit.Tpo -c -o check_check-check_check_limit.obj `if test -f 'check_check_limit.c'; then $(CYGPATH_W) 'check_check_limit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_limit.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_limit.Tpo $(DEPDIR)/check_check-check_check_limit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_limit.c' object='check_check-check_check_limit.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_limit.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_limit.Tpo -c -o check_check-check_check_limit.obj `if test -f 'check_check_limit.c'; then $(CYGPATH_W) 'check_check_limit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_limit.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_limit.Tpo $(DEPDIR)/check_check-check_check_limit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_limit.c' object='check_check-check_check_limit.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_limit.obj `if test -f 'check_check_limit.c'; then $(CYGPATH_W) 'check_check_limit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_limit.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_limit.obj `if test -f 'check_check_limit.c'; then $(CYGPATH_W) 'check_check_limit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_limit.c'; fi`
 
 check_check-check_check_fork.o: check_check_fork.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fork.o -MD -MP -MF $(DEPDIR)/check_check-check_check_fork.Tpo -c -o check_check-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_fork.Tpo $(DEPDIR)/check_check-check_check_fork.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_fork.c' object='check_check-check_check_fork.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fork.o -MD -MP -MF $(DEPDIR)/check_check-check_check_fork.Tpo -c -o check_check-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_fork.Tpo $(DEPDIR)/check_check-check_check_fork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fork.c' object='check_check-check_check_fork.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
 
 check_check-check_check_fork.obj: check_check_fork.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fork.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_fork.Tpo -c -o check_check-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_fork.Tpo $(DEPDIR)/check_check-check_check_fork.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_fork.c' object='check_check-check_check_fork.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fork.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_fork.Tpo -c -o check_check-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_fork.Tpo $(DEPDIR)/check_check-check_check_fork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fork.c' object='check_check-check_check_fork.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
 
 check_check-check_check_fixture.o: check_check_fixture.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fixture.o -MD -MP -MF $(DEPDIR)/check_check-check_check_fixture.Tpo -c -o check_check-check_check_fixture.o `test -f 'check_check_fixture.c' || echo '$(srcdir)/'`check_check_fixture.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_fixture.Tpo $(DEPDIR)/check_check-check_check_fixture.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_fixture.c' object='check_check-check_check_fixture.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fixture.o -MD -MP -MF $(DEPDIR)/check_check-check_check_fixture.Tpo -c -o check_check-check_check_fixture.o `test -f 'check_check_fixture.c' || echo '$(srcdir)/'`check_check_fixture.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_fixture.Tpo $(DEPDIR)/check_check-check_check_fixture.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fixture.c' object='check_check-check_check_fixture.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fixture.o `test -f 'check_check_fixture.c' || echo '$(srcdir)/'`check_check_fixture.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fixture.o `test -f 'check_check_fixture.c' || echo '$(srcdir)/'`check_check_fixture.c
 
 check_check-check_check_fixture.obj: check_check_fixture.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fixture.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_fixture.Tpo -c -o check_check-check_check_fixture.obj `if test -f 'check_check_fixture.c'; then $(CYGPATH_W) 'check_check_fixture.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fixture.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_fixture.Tpo $(DEPDIR)/check_check-check_check_fixture.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_fixture.c' object='check_check-check_check_fixture.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_fixture.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_fixture.Tpo -c -o check_check-check_check_fixture.obj `if test -f 'check_check_fixture.c'; then $(CYGPATH_W) 'check_check_fixture.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fixture.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_fixture.Tpo $(DEPDIR)/check_check-check_check_fixture.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fixture.c' object='check_check-check_check_fixture.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fixture.obj `if test -f 'check_check_fixture.c'; then $(CYGPATH_W) 'check_check_fixture.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fixture.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_fixture.obj `if test -f 'check_check_fixture.c'; then $(CYGPATH_W) 'check_check_fixture.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fixture.c'; fi`
 
 check_check-check_check_pack.o: check_check_pack.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_pack.o -MD -MP -MF $(DEPDIR)/check_check-check_check_pack.Tpo -c -o check_check-check_check_pack.o `test -f 'check_check_pack.c' || echo '$(srcdir)/'`check_check_pack.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_pack.Tpo $(DEPDIR)/check_check-check_check_pack.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_pack.c' object='check_check-check_check_pack.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_pack.o -MD -MP -MF $(DEPDIR)/check_check-check_check_pack.Tpo -c -o check_check-check_check_pack.o `test -f 'check_check_pack.c' || echo '$(srcdir)/'`check_check_pack.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_pack.Tpo $(DEPDIR)/check_check-check_check_pack.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_pack.c' object='check_check-check_check_pack.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_pack.o `test -f 'check_check_pack.c' || echo '$(srcdir)/'`check_check_pack.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_pack.o `test -f 'check_check_pack.c' || echo '$(srcdir)/'`check_check_pack.c
 
 check_check-check_check_pack.obj: check_check_pack.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_pack.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_pack.Tpo -c -o check_check-check_check_pack.obj `if test -f 'check_check_pack.c'; then $(CYGPATH_W) 'check_check_pack.c'; else $(CYGPATH_W) '$(srcdir)/check_check_pack.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_pack.Tpo $(DEPDIR)/check_check-check_check_pack.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_pack.c' object='check_check-check_check_pack.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_pack.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_pack.Tpo -c -o check_check-check_check_pack.obj `if test -f 'check_check_pack.c'; then $(CYGPATH_W) 'check_check_pack.c'; else $(CYGPATH_W) '$(srcdir)/check_check_pack.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_pack.Tpo $(DEPDIR)/check_check-check_check_pack.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_pack.c' object='check_check-check_check_pack.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_pack.obj `if test -f 'check_check_pack.c'; then $(CYGPATH_W) 'check_check_pack.c'; else $(CYGPATH_W) '$(srcdir)/check_check_pack.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_pack.obj `if test -f 'check_check_pack.c'; then $(CYGPATH_W) 'check_check_pack.c'; else $(CYGPATH_W) '$(srcdir)/check_check_pack.c'; fi`
 
 check_check-check_check_exit.o: check_check_exit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_exit.o -MD -MP -MF $(DEPDIR)/check_check-check_check_exit.Tpo -c -o check_check-check_check_exit.o `test -f 'check_check_exit.c' || echo '$(srcdir)/'`check_check_exit.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_exit.Tpo $(DEPDIR)/check_check-check_check_exit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_exit.c' object='check_check-check_check_exit.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_exit.o -MD -MP -MF $(DEPDIR)/check_check-check_check_exit.Tpo -c -o check_check-check_check_exit.o `test -f 'check_check_exit.c' || echo '$(srcdir)/'`check_check_exit.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_exit.Tpo $(DEPDIR)/check_check-check_check_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_exit.c' object='check_check-check_check_exit.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_exit.o `test -f 'check_check_exit.c' || echo '$(srcdir)/'`check_check_exit.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_exit.o `test -f 'check_check_exit.c' || echo '$(srcdir)/'`check_check_exit.c
 
 check_check-check_check_exit.obj: check_check_exit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_exit.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_exit.Tpo -c -o check_check-check_check_exit.obj `if test -f 'check_check_exit.c'; then $(CYGPATH_W) 'check_check_exit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_exit.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_exit.Tpo $(DEPDIR)/check_check-check_check_exit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_exit.c' object='check_check-check_check_exit.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_exit.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_exit.Tpo -c -o check_check-check_check_exit.obj `if test -f 'check_check_exit.c'; then $(CYGPATH_W) 'check_check_exit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_exit.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_exit.Tpo $(DEPDIR)/check_check-check_check_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_exit.c' object='check_check-check_check_exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_exit.obj `if test -f 'check_check_exit.c'; then $(CYGPATH_W) 'check_check_exit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_exit.c'; fi`
+
+check_check-check_check_selective.o: check_check_selective.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_selective.o -MD -MP -MF $(DEPDIR)/check_check-check_check_selective.Tpo -c -o check_check-check_check_selective.o `test -f 'check_check_selective.c' || echo '$(srcdir)/'`check_check_selective.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_selective.Tpo $(DEPDIR)/check_check-check_check_selective.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_selective.c' object='check_check-check_check_selective.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_selective.o `test -f 'check_check_selective.c' || echo '$(srcdir)/'`check_check_selective.c
+
+check_check-check_check_selective.obj: check_check_selective.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_selective.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_selective.Tpo -c -o check_check-check_check_selective.obj `if test -f 'check_check_selective.c'; then $(CYGPATH_W) 'check_check_selective.c'; else $(CYGPATH_W) '$(srcdir)/check_check_selective.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_selective.Tpo $(DEPDIR)/check_check-check_check_selective.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_selective.c' object='check_check-check_check_selective.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_selective.obj `if test -f 'check_check_selective.c'; then $(CYGPATH_W) 'check_check_selective.c'; else $(CYGPATH_W) '$(srcdir)/check_check_selective.c'; fi`
+
+check_check-check_check_tags.o: check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_tags.o -MD -MP -MF $(DEPDIR)/check_check-check_check_tags.Tpo -c -o check_check-check_check_tags.o `test -f 'check_check_tags.c' || echo '$(srcdir)/'`check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_tags.Tpo $(DEPDIR)/check_check-check_check_tags.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_tags.c' object='check_check-check_check_tags.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_exit.obj `if test -f 'check_check_exit.c'; then $(CYGPATH_W) 'check_check_exit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_exit.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_tags.o `test -f 'check_check_tags.c' || echo '$(srcdir)/'`check_check_tags.c
+
+check_check-check_check_tags.obj: check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_tags.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_tags.Tpo -c -o check_check-check_check_tags.obj `if test -f 'check_check_tags.c'; then $(CYGPATH_W) 'check_check_tags.c'; else $(CYGPATH_W) '$(srcdir)/check_check_tags.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_tags.Tpo $(DEPDIR)/check_check-check_check_tags.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_tags.c' object='check_check-check_check_tags.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_tags.obj `if test -f 'check_check_tags.c'; then $(CYGPATH_W) 'check_check_tags.c'; else $(CYGPATH_W) '$(srcdir)/check_check_tags.c'; fi`
 
 check_check-check_check_main.o: check_check_main.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_main.o -MD -MP -MF $(DEPDIR)/check_check-check_check_main.Tpo -c -o check_check-check_check_main.o `test -f 'check_check_main.c' || echo '$(srcdir)/'`check_check_main.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_main.Tpo $(DEPDIR)/check_check-check_check_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_main.c' object='check_check-check_check_main.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_main.o -MD -MP -MF $(DEPDIR)/check_check-check_check_main.Tpo -c -o check_check-check_check_main.o `test -f 'check_check_main.c' || echo '$(srcdir)/'`check_check_main.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_main.Tpo $(DEPDIR)/check_check-check_check_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_main.c' object='check_check-check_check_main.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_main.o `test -f 'check_check_main.c' || echo '$(srcdir)/'`check_check_main.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_main.o `test -f 'check_check_main.c' || echo '$(srcdir)/'`check_check_main.c
 
 check_check-check_check_main.obj: check_check_main.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_main.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_main.Tpo -c -o check_check-check_check_main.obj `if test -f 'check_check_main.c'; then $(CYGPATH_W) 'check_check_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_main.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check-check_check_main.Tpo $(DEPDIR)/check_check-check_check_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_main.c' object='check_check-check_check_main.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -MT check_check-check_check_main.obj -MD -MP -MF $(DEPDIR)/check_check-check_check_main.Tpo -c -o check_check-check_check_main.obj `if test -f 'check_check_main.c'; then $(CYGPATH_W) 'check_check_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_main.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check-check_check_main.Tpo $(DEPDIR)/check_check-check_check_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_main.c' object='check_check-check_check_main.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_main.obj `if test -f 'check_check_main.c'; then $(CYGPATH_W) 'check_check_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_main.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_CFLAGS) $(CFLAGS) -c -o check_check-check_check_main.obj `if test -f 'check_check_main.c'; then $(CYGPATH_W) 'check_check_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_main.c'; fi`
 
 check_check_export-check_check_sub.o: check_check_sub.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_sub.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_sub.Tpo -c -o check_check_export-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_sub.Tpo $(DEPDIR)/check_check_export-check_check_sub.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_sub.c' object='check_check_export-check_check_sub.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_sub.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_sub.Tpo -c -o check_check_export-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_sub.Tpo $(DEPDIR)/check_check_export-check_check_sub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_sub.c' object='check_check_export-check_check_sub.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
 
 check_check_export-check_check_sub.obj: check_check_sub.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_sub.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_sub.Tpo -c -o check_check_export-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_sub.Tpo $(DEPDIR)/check_check_export-check_check_sub.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_sub.c' object='check_check_export-check_check_sub.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_sub.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_sub.Tpo -c -o check_check_export-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_sub.Tpo $(DEPDIR)/check_check_export-check_check_sub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_sub.c' object='check_check_export-check_check_sub.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
 
 check_check_export-check_check_master.o: check_check_master.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_master.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_master.Tpo -c -o check_check_export-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_master.Tpo $(DEPDIR)/check_check_export-check_check_master.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_master.c' object='check_check_export-check_check_master.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_master.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_master.Tpo -c -o check_check_export-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_master.Tpo $(DEPDIR)/check_check_export-check_check_master.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_master.c' object='check_check_export-check_check_master.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
 
 check_check_export-check_check_master.obj: check_check_master.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_master.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_master.Tpo -c -o check_check_export-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_master.Tpo $(DEPDIR)/check_check_export-check_check_master.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_master.c' object='check_check_export-check_check_master.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_master.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_master.Tpo -c -o check_check_export-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_master.Tpo $(DEPDIR)/check_check_export-check_check_master.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_master.c' object='check_check_export-check_check_master.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
 
 check_check_export-check_check_log.o: check_check_log.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_log.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_log.Tpo -c -o check_check_export-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_log.Tpo $(DEPDIR)/check_check_export-check_check_log.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_log.c' object='check_check_export-check_check_log.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_log.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_log.Tpo -c -o check_check_export-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_log.Tpo $(DEPDIR)/check_check_export-check_check_log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log.c' object='check_check_export-check_check_log.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
 
 check_check_export-check_check_log.obj: check_check_log.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_log.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_log.Tpo -c -o check_check_export-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_log.Tpo $(DEPDIR)/check_check_export-check_check_log.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_log.c' object='check_check_export-check_check_log.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_log.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_log.Tpo -c -o check_check_export-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_log.Tpo $(DEPDIR)/check_check_export-check_check_log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log.c' object='check_check_export-check_check_log.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
 
 check_check_export-check_check_fork.o: check_check_fork.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_fork.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_fork.Tpo -c -o check_check_export-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_fork.Tpo $(DEPDIR)/check_check_export-check_check_fork.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_fork.c' object='check_check_export-check_check_fork.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_fork.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_fork.Tpo -c -o check_check_export-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_fork.Tpo $(DEPDIR)/check_check_export-check_check_fork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fork.c' object='check_check_export-check_check_fork.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
 
 check_check_export-check_check_fork.obj: check_check_fork.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_fork.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_fork.Tpo -c -o check_check_export-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_fork.Tpo $(DEPDIR)/check_check_export-check_check_fork.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_fork.c' object='check_check_export-check_check_fork.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_fork.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_fork.Tpo -c -o check_check_export-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_fork.Tpo $(DEPDIR)/check_check_export-check_check_fork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fork.c' object='check_check_export-check_check_fork.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+
+check_check_export-check_check_tags.o: check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_tags.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_tags.Tpo -c -o check_check_export-check_check_tags.o `test -f 'check_check_tags.c' || echo '$(srcdir)/'`check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_tags.Tpo $(DEPDIR)/check_check_export-check_check_tags.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_tags.c' object='check_check_export-check_check_tags.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_tags.o `test -f 'check_check_tags.c' || echo '$(srcdir)/'`check_check_tags.c
+
+check_check_export-check_check_tags.obj: check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_tags.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_tags.Tpo -c -o check_check_export-check_check_tags.obj `if test -f 'check_check_tags.c'; then $(CYGPATH_W) 'check_check_tags.c'; else $(CYGPATH_W) '$(srcdir)/check_check_tags.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_tags.Tpo $(DEPDIR)/check_check_export-check_check_tags.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_tags.c' object='check_check_export-check_check_tags.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_tags.obj `if test -f 'check_check_tags.c'; then $(CYGPATH_W) 'check_check_tags.c'; else $(CYGPATH_W) '$(srcdir)/check_check_tags.c'; fi`
 
 check_check_export-check_check_export_main.o: check_check_export_main.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_export_main.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_export_main.Tpo -c -o check_check_export-check_check_export_main.o `test -f 'check_check_export_main.c' || echo '$(srcdir)/'`check_check_export_main.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_export_main.Tpo $(DEPDIR)/check_check_export-check_check_export_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_export_main.c' object='check_check_export-check_check_export_main.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_export_main.o -MD -MP -MF $(DEPDIR)/check_check_export-check_check_export_main.Tpo -c -o check_check_export-check_check_export_main.o `test -f 'check_check_export_main.c' || echo '$(srcdir)/'`check_check_export_main.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_export_main.Tpo $(DEPDIR)/check_check_export-check_check_export_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_export_main.c' object='check_check_export-check_check_export_main.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_export_main.o `test -f 'check_check_export_main.c' || echo '$(srcdir)/'`check_check_export_main.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_export_main.o `test -f 'check_check_export_main.c' || echo '$(srcdir)/'`check_check_export_main.c
 
 check_check_export-check_check_export_main.obj: check_check_export_main.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_export_main.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_export_main.Tpo -c -o check_check_export-check_check_export_main.obj `if test -f 'check_check_export_main.c'; then $(CYGPATH_W) 'check_check_export_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_export_main.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_check_export-check_check_export_main.Tpo $(DEPDIR)/check_check_export-check_check_export_main.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_check_export_main.c' object='check_check_export-check_check_export_main.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -MT check_check_export-check_check_export_main.obj -MD -MP -MF $(DEPDIR)/check_check_export-check_check_export_main.Tpo -c -o check_check_export-check_check_export_main.obj `if test -f 'check_check_export_main.c'; then $(CYGPATH_W) 'check_check_export_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_export_main.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_check_export-check_check_export_main.Tpo $(DEPDIR)/check_check_export-check_check_export_main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_export_main.c' object='check_check_export-check_check_export_main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_export_main.obj `if test -f 'check_check_export_main.c'; then $(CYGPATH_W) 'check_check_export_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_export_main.c'; fi`
+
+check_mem_leaks-check_mem_leaks.o: check_mem_leaks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_mem_leaks.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_mem_leaks.Tpo -c -o check_mem_leaks-check_mem_leaks.o `test -f 'check_mem_leaks.c' || echo '$(srcdir)/'`check_mem_leaks.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_mem_leaks.Tpo $(DEPDIR)/check_mem_leaks-check_mem_leaks.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_mem_leaks.c' object='check_mem_leaks-check_mem_leaks.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_mem_leaks.o `test -f 'check_mem_leaks.c' || echo '$(srcdir)/'`check_mem_leaks.c
+
+check_mem_leaks-check_mem_leaks.obj: check_mem_leaks.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_mem_leaks.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_mem_leaks.Tpo -c -o check_mem_leaks-check_mem_leaks.obj `if test -f 'check_mem_leaks.c'; then $(CYGPATH_W) 'check_mem_leaks.c'; else $(CYGPATH_W) '$(srcdir)/check_mem_leaks.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_mem_leaks.Tpo $(DEPDIR)/check_mem_leaks-check_mem_leaks.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_mem_leaks.c' object='check_mem_leaks-check_mem_leaks.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_mem_leaks.obj `if test -f 'check_mem_leaks.c'; then $(CYGPATH_W) 'check_mem_leaks.c'; else $(CYGPATH_W) '$(srcdir)/check_mem_leaks.c'; fi`
+
+check_mem_leaks-check_check_log.o: check_check_log.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_log.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_log.Tpo -c -o check_mem_leaks-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_log.Tpo $(DEPDIR)/check_mem_leaks-check_check_log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log.c' object='check_mem_leaks-check_check_log.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_log.o `test -f 'check_check_log.c' || echo '$(srcdir)/'`check_check_log.c
+
+check_mem_leaks-check_check_log.obj: check_check_log.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_log.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_log.Tpo -c -o check_mem_leaks-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_log.Tpo $(DEPDIR)/check_mem_leaks-check_check_log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_log.c' object='check_mem_leaks-check_check_log.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_log.obj `if test -f 'check_check_log.c'; then $(CYGPATH_W) 'check_check_log.c'; else $(CYGPATH_W) '$(srcdir)/check_check_log.c'; fi`
+
+check_mem_leaks-check_check_fork.o: check_check_fork.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_fork.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_fork.Tpo -c -o check_mem_leaks-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_fork.Tpo $(DEPDIR)/check_mem_leaks-check_check_fork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fork.c' object='check_mem_leaks-check_check_fork.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_fork.o `test -f 'check_check_fork.c' || echo '$(srcdir)/'`check_check_fork.c
+
+check_mem_leaks-check_check_fork.obj: check_check_fork.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_fork.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_fork.Tpo -c -o check_mem_leaks-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_fork.Tpo $(DEPDIR)/check_mem_leaks-check_check_fork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_fork.c' object='check_mem_leaks-check_check_fork.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_check_export_CFLAGS) $(CFLAGS) -c -o check_check_export-check_check_export_main.obj `if test -f 'check_check_export_main.c'; then $(CYGPATH_W) 'check_check_export_main.c'; else $(CYGPATH_W) '$(srcdir)/check_check_export_main.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_fork.obj `if test -f 'check_check_fork.c'; then $(CYGPATH_W) 'check_check_fork.c'; else $(CYGPATH_W) '$(srcdir)/check_check_fork.c'; fi`
+
+check_mem_leaks-check_check_exit.o: check_check_exit.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_exit.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_exit.Tpo -c -o check_mem_leaks-check_check_exit.o `test -f 'check_check_exit.c' || echo '$(srcdir)/'`check_check_exit.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_exit.Tpo $(DEPDIR)/check_mem_leaks-check_check_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_exit.c' object='check_mem_leaks-check_check_exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_exit.o `test -f 'check_check_exit.c' || echo '$(srcdir)/'`check_check_exit.c
+
+check_mem_leaks-check_check_exit.obj: check_check_exit.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_exit.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_exit.Tpo -c -o check_mem_leaks-check_check_exit.obj `if test -f 'check_check_exit.c'; then $(CYGPATH_W) 'check_check_exit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_exit.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_exit.Tpo $(DEPDIR)/check_mem_leaks-check_check_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_exit.c' object='check_mem_leaks-check_check_exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_exit.obj `if test -f 'check_check_exit.c'; then $(CYGPATH_W) 'check_check_exit.c'; else $(CYGPATH_W) '$(srcdir)/check_check_exit.c'; fi`
+
+check_mem_leaks-check_check_selective.o: check_check_selective.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_selective.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_selective.Tpo -c -o check_mem_leaks-check_check_selective.o `test -f 'check_check_selective.c' || echo '$(srcdir)/'`check_check_selective.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_selective.Tpo $(DEPDIR)/check_mem_leaks-check_check_selective.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_selective.c' object='check_mem_leaks-check_check_selective.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_selective.o `test -f 'check_check_selective.c' || echo '$(srcdir)/'`check_check_selective.c
+
+check_mem_leaks-check_check_selective.obj: check_check_selective.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_selective.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_selective.Tpo -c -o check_mem_leaks-check_check_selective.obj `if test -f 'check_check_selective.c'; then $(CYGPATH_W) 'check_check_selective.c'; else $(CYGPATH_W) '$(srcdir)/check_check_selective.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_selective.Tpo $(DEPDIR)/check_mem_leaks-check_check_selective.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_selective.c' object='check_mem_leaks-check_check_selective.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_selective.obj `if test -f 'check_check_selective.c'; then $(CYGPATH_W) 'check_check_selective.c'; else $(CYGPATH_W) '$(srcdir)/check_check_selective.c'; fi`
+
+check_mem_leaks-check_check_tags.o: check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_tags.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_tags.Tpo -c -o check_mem_leaks-check_check_tags.o `test -f 'check_check_tags.c' || echo '$(srcdir)/'`check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_tags.Tpo $(DEPDIR)/check_mem_leaks-check_check_tags.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_tags.c' object='check_mem_leaks-check_check_tags.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_tags.o `test -f 'check_check_tags.c' || echo '$(srcdir)/'`check_check_tags.c
+
+check_mem_leaks-check_check_tags.obj: check_check_tags.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_tags.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_tags.Tpo -c -o check_mem_leaks-check_check_tags.obj `if test -f 'check_check_tags.c'; then $(CYGPATH_W) 'check_check_tags.c'; else $(CYGPATH_W) '$(srcdir)/check_check_tags.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_tags.Tpo $(DEPDIR)/check_mem_leaks-check_check_tags.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_tags.c' object='check_mem_leaks-check_check_tags.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_tags.obj `if test -f 'check_check_tags.c'; then $(CYGPATH_W) 'check_check_tags.c'; else $(CYGPATH_W) '$(srcdir)/check_check_tags.c'; fi`
+
+check_mem_leaks-check_check_sub.o: check_check_sub.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_sub.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_sub.Tpo -c -o check_mem_leaks-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_sub.Tpo $(DEPDIR)/check_mem_leaks-check_check_sub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_sub.c' object='check_mem_leaks-check_check_sub.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_sub.o `test -f 'check_check_sub.c' || echo '$(srcdir)/'`check_check_sub.c
+
+check_mem_leaks-check_check_sub.obj: check_check_sub.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_sub.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_sub.Tpo -c -o check_mem_leaks-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_sub.Tpo $(DEPDIR)/check_mem_leaks-check_check_sub.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_sub.c' object='check_mem_leaks-check_check_sub.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_sub.obj `if test -f 'check_check_sub.c'; then $(CYGPATH_W) 'check_check_sub.c'; else $(CYGPATH_W) '$(srcdir)/check_check_sub.c'; fi`
+
+check_mem_leaks-check_check_master.o: check_check_master.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_master.o -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_master.Tpo -c -o check_mem_leaks-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_master.Tpo $(DEPDIR)/check_mem_leaks-check_check_master.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_master.c' object='check_mem_leaks-check_check_master.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_master.o `test -f 'check_check_master.c' || echo '$(srcdir)/'`check_check_master.c
+
+check_mem_leaks-check_check_master.obj: check_check_master.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -MT check_mem_leaks-check_check_master.obj -MD -MP -MF $(DEPDIR)/check_mem_leaks-check_check_master.Tpo -c -o check_mem_leaks-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_mem_leaks-check_check_master.Tpo $(DEPDIR)/check_mem_leaks-check_check_master.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_check_master.c' object='check_mem_leaks-check_check_master.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_mem_leaks_CFLAGS) $(CFLAGS) -c -o check_mem_leaks-check_check_master.obj `if test -f 'check_check_master.c'; then $(CYGPATH_W) 'check_check_master.c'; else $(CYGPATH_W) '$(srcdir)/check_check_master.c'; fi`
 
 check_thread_stress-check_thread_stress.o: check_thread_stress.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -MT check_thread_stress-check_thread_stress.o -MD -MP -MF $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo -c -o check_thread_stress-check_thread_stress.o `test -f 'check_thread_stress.c' || echo '$(srcdir)/'`check_thread_stress.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo $(DEPDIR)/check_thread_stress-check_thread_stress.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_thread_stress.c' object='check_thread_stress-check_thread_stress.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -MT check_thread_stress-check_thread_stress.o -MD -MP -MF $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo -c -o check_thread_stress-check_thread_stress.o `test -f 'check_thread_stress.c' || echo '$(srcdir)/'`check_thread_stress.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo $(DEPDIR)/check_thread_stress-check_thread_stress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_thread_stress.c' object='check_thread_stress-check_thread_stress.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -c -o check_thread_stress-check_thread_stress.o `test -f 'check_thread_stress.c' || echo '$(srcdir)/'`check_thread_stress.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -c -o check_thread_stress-check_thread_stress.o `test -f 'check_thread_stress.c' || echo '$(srcdir)/'`check_thread_stress.c
 
 check_thread_stress-check_thread_stress.obj: check_thread_stress.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -MT check_thread_stress-check_thread_stress.obj -MD -MP -MF $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo -c -o check_thread_stress-check_thread_stress.obj `if test -f 'check_thread_stress.c'; then $(CYGPATH_W) 'check_thread_stress.c'; else $(CYGPATH_W) '$(srcdir)/check_thread_stress.c'; fi`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo $(DEPDIR)/check_thread_stress-check_thread_stress.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='check_thread_stress.c' object='check_thread_stress-check_thread_stress.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -MT check_thread_stress-check_thread_stress.obj -MD -MP -MF $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo -c -o check_thread_stress-check_thread_stress.obj `if test -f 'check_thread_stress.c'; then $(CYGPATH_W) 'check_thread_stress.c'; else $(CYGPATH_W) '$(srcdir)/check_thread_stress.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/check_thread_stress-check_thread_stress.Tpo $(DEPDIR)/check_thread_stress-check_thread_stress.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='check_thread_stress.c' object='check_thread_stress-check_thread_stress.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -c -o check_thread_stress-check_thread_stress.obj `if test -f 'check_thread_stress.c'; then $(CYGPATH_W) 'check_thread_stress.c'; else $(CYGPATH_W) '$(srcdir)/check_thread_stress.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_thread_stress_CFLAGS) $(CFLAGS) -c -o check_thread_stress-check_thread_stress.obj `if test -f 'check_thread_stress.c'; then $(CYGPATH_W) 'check_thread_stress.c'; else $(CYGPATH_W) '$(srcdir)/check_thread_stress.c'; fi`
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -671,138 +1230,276 @@ mostlyclean-libtool:
 clean-libtool:
        -rm -rf .libs _libs
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(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 \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
-       srcdir=$(srcdir); export srcdir; \
-       list=' $(TESTS) '; \
-       if test -n "$$list"; then \
-         for tst in $$list; do \
-           if test -f ./$$tst; then dir=./; \
-           elif test -f $$tst; then dir=; \
-           else dir="$(srcdir)/"; fi; \
-           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *[\ \     ]$$tst[\ \      ]*) \
-               xpass=`expr $$xpass + 1`; \
-               failed=`expr $$failed + 1`; \
-               echo "XPASS: $$tst"; \
-             ;; \
-             *) \
-               echo "PASS: $$tst"; \
-             ;; \
-             esac; \
-           elif test $$? -ne 77; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *[\ \     ]$$tst[\ \      ]*) \
-               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 "$$all" -eq 1; then \
-           tests="test"; \
-           All=""; \
-         else \
-           tests="tests"; \
-           All="All "; \
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+       rm -f $< $@
+       $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+       @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+       @$(am__set_TESTS_bases); \
+       am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+       redo_bases=`for i in $$bases; do \
+                     am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+                   done`; \
+       if test -n "$$redo_bases"; then \
+         redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+         redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+         if $(am__make_dryrun); then :; else \
+           rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
          fi; \
-         if test "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="$$All$$all $$tests passed"; \
-           else \
-             if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
-             banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
-           fi; \
-         else \
-           if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all $$tests failed"; \
+       fi; \
+       if test -n "$$am__remaking_logs"; then \
+         echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+              "recursion detected" >&2; \
+       elif test -n "$$redo_logs"; then \
+         am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+       fi; \
+       if $(am__make_dryrun); then :; else \
+         st=0;  \
+         errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+         for i in $$redo_bases; do \
+           test -f $$i.trs && test -r $$i.trs \
+             || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+           test -f $$i.log && test -r $$i.log \
+             || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+         done; \
+         test $$st -eq 0 || exit 1; \
+       fi
+       @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+       ws='[   ]'; \
+       results=`for b in $$bases; do echo $$b.trs; done`; \
+       test -n "$$results" || results=/dev/null; \
+       all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+       pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+       fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+       skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+       xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+       xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+       error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+       if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+         success=true; \
+       else \
+         success=false; \
+       fi; \
+       br='==================='; br=$$br$$br$$br$$br; \
+       result_count () \
+       { \
+           if test x"$$1" = x"--maybe-color"; then \
+             maybe_colorize=yes; \
+           elif test x"$$1" = x"--no-color"; then \
+             maybe_colorize=no; \
            else \
-             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
-             banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+             echo "$@: invalid 'result_count' usage" >&2; exit 4; \
            fi; \
-         fi; \
-         dashes="$$banner"; \
-         skipped=""; \
-         if test "$$skip" -ne 0; then \
-           if test "$$skip" -eq 1; then \
-             skipped="($$skip test was not run)"; \
+           shift; \
+           desc=$$1 count=$$2; \
+           if test $$maybe_colorize = yes && test $$count -gt 0; then \
+             color_start=$$3 color_end=$$std; \
            else \
-             skipped="($$skip tests were not run)"; \
+             color_start= color_end=; \
            fi; \
-           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$skipped"; \
-         fi; \
-         report=""; \
-         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
-           report="Please report to $(PACKAGE_BUGREPORT)"; \
-           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$report"; \
-         fi; \
-         dashes=`echo "$$dashes" | sed s/./=/g`; \
-         echo "$$dashes"; \
-         echo "$$banner"; \
-         test -z "$$skipped" || echo "$$skipped"; \
-         test -z "$$report" || echo "$$report"; \
-         echo "$$dashes"; \
-         test "$$failed" -eq 0; \
-       else :; fi
+           echo "$${color_start}# $$desc $$count$${color_end}"; \
+       }; \
+       create_testsuite_report () \
+       { \
+         result_count $$1 "TOTAL:" $$all   "$$brg"; \
+         result_count $$1 "PASS: " $$pass  "$$grn"; \
+         result_count $$1 "SKIP: " $$skip  "$$blu"; \
+         result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+         result_count $$1 "FAIL: " $$fail  "$$red"; \
+         result_count $$1 "XPASS:" $$xpass "$$red"; \
+         result_count $$1 "ERROR:" $$error "$$mgn"; \
+       }; \
+       {                                                               \
+         echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |       \
+           $(am__rst_title);                                           \
+         create_testsuite_report --no-color;                           \
+         echo;                                                         \
+         echo ".. contents:: :depth: 2";                               \
+         echo;                                                         \
+         for b in $$bases; do echo $$b; done                           \
+           | $(am__create_global_log);                                 \
+       } >$(TEST_SUITE_LOG).tmp || exit 1;                             \
+       mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
+       if $$success; then                                              \
+         col="$$grn";                                                  \
+        else                                                           \
+         col="$$red";                                                  \
+         test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);               \
+       fi;                                                             \
+       echo "$${col}$$br$${std}";                                      \
+       echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
+       echo "$${col}$$br$${std}";                                      \
+       create_testsuite_report --maybe-color;                          \
+       echo "$$col$$br$$std";                                          \
+       if $$success; then :; else                                      \
+         echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";         \
+         if test -n "$(PACKAGE_BUGREPORT)"; then                       \
+           echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+         fi;                                                           \
+         echo "$$col$$br$$std";                                        \
+       fi;                                                             \
+       $$success || exit 1
+
+check-TESTS:
+       @list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+       @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set +e; $(am__set_TESTS_bases); \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+       log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+       exit $$?;
+recheck: all 
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set +e; $(am__set_TESTS_bases); \
+       bases=`for i in $$bases; do echo $$i; done \
+                | $(am__list_recheck_tests)` || exit 1; \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       log_list=`echo $$log_list`; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+               am__force_recheck=am--force-recheck \
+               TEST_LOGS="$$log_list"; \
+       exit $$?
+check_check_export.log: check_check_export$(EXEEXT)
+       @p='check_check_export$(EXEEXT)'; \
+       b='check_check_export'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+check_check.log: check_check$(EXEEXT)
+       @p='check_check$(EXEEXT)'; \
+       b='check_check'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_output.sh.log: test_output.sh
+       @p='test_output.sh'; \
+       b='test_output.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_check_nofork.sh.log: test_check_nofork.sh
+       @p='test_check_nofork.sh'; \
+       b='test_check_nofork.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_check_nofork_teardown.sh.log: test_check_nofork_teardown.sh
+       @p='test_check_nofork_teardown.sh'; \
+       b='test_check_nofork_teardown.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_xml_output.sh.log: test_xml_output.sh
+       @p='test_xml_output.sh'; \
+       b='test_xml_output.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_log_output.sh.log: test_log_output.sh
+       @p='test_log_output.sh'; \
+       b='test_log_output.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_set_max_msg_size.sh.log: test_set_max_msg_size.sh
+       @p='test_set_max_msg_size.sh'; \
+       b='test_set_max_msg_size.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test_tap_output.sh.log: test_tap_output.sh
+       @p='test_tap_output.sh'; \
+       b='test_tap_output.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+       @p='$<'; \
+       $(am__set_b); \
+       $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@      @p='$<'; \
+@am__EXEEXT_TRUE@      $(am__set_b); \
+@am__EXEEXT_TRUE@      $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@      --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@      $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@      "$$tst" $(AM_TESTS_FD_REDIRECT)
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -820,13 +1517,17 @@ distdir: $(DISTFILES)
          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 "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -845,17 +1546,26 @@ install-am: all-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
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
+       -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+       -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+       -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -877,6 +1587,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -885,18 +1597,28 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -919,11 +1641,11 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: install-am install-strip
+.MAKE: check-am install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
-       clean-generic clean-libtool clean-noinstPROGRAMS ctags \
-       distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+       clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \
+       ctags ctags-am distclean distclean-compile distclean-generic \
        distclean-libtool distclean-tags distdir dvi dvi-am html \
        html-am info info-am install install-am install-data \
        install-data-am install-dvi install-dvi-am install-exec \
@@ -933,7 +1655,10 @@ uninstall-am:
        installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am
+       recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
 
 # 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.
index 0b385f2..32e49bc 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #ifndef CHECK_CHECK_H
 #define CHECK_CHECK_H
 
@@ -5,8 +25,16 @@
 #define TIMEOUT_TESTS_ENABLED 1
 #endif
 
-int sub_nfailed;
-int sub_ntests;
+/*
+ * Certain unit tests are known to leak memory. This
+ * #define will prevent those unit tests from being built
+ * if the program is to be used against valgrind.
+ */
+#ifndef MEMORY_LEAKING_TESTS_ENABLED
+#define MEMORY_LEAKING_TESTS_ENABLED 1
+#endif
+
+extern int sub_ntests;
 
 void fork_setup (void);
 void fork_teardown (void);
@@ -26,8 +54,48 @@ Suite *make_fork_suite(void);
 Suite *make_fixture_suite(void);
 Suite *make_pack_suite(void);
 Suite *make_exit_suite(void);
+Suite *make_selective_suite(void);
+Suite *make_tag_suite(void);
 
 extern int master_tests_lineno[];
-void init_master_tests_lineno(void);
+void init_master_tests_lineno(int num_master_tests);
+
+/**
+ * Record a test name.
+ *
+ * This is used to record the test names of each test in
+ * check_check_sub.c. This allows the test name to be written
+ * in the master_tests table in check_check_master.c and have
+ * it verified at test time. With this data, one can easily
+ * determine the name of a failed test.
+ */
+void record_test_name(const char* test_name);
+
+/**
+ * Retrieve the next recorded test which was run, or
+ * NULL if no further tests are recorded.
+ */
+char* get_next_test_name(FILE * file);
+
+/**
+ * Record a line number for a test which is to fail.
+ *
+ * This is used to record the failure line numbers for
+ * all tests in check_check_sub.c. Simply make this
+ * call right before an assert to record the proper
+ * line number. The line number is adjusted +1 internally,
+ * to account for making this call before the failure.
+ */
+void record_failure_line_num(const int line);
+
+/**
+ * Once the failure file numbers have been recorded
+ * to file and the file has been rewind(), this
+ * call will extract the next line number from the
+ * file.
+ *
+ * If there are no more lines to read, -1 is returned.
+ */
+int get_next_failure_line_num(FILE * file);
 
 #endif /* CHECK_CHECK_H */
index a738519..9ada4eb 100644 (file)
@@ -1,7 +1,29 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "../lib/libcompat.h"
+
 #include <stdlib.h>
+#include <signal.h>
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 
 #include "check.h"
 #include "check_check.h"
 START_TEST(test_early_exit_normal)
 {
        exit(0);
-       fail("Should've exitted...");
+       ck_abort_msg("Should've exitted...");
 }
 END_TEST
 
 START_TEST(test_early_exit_with_allowed_error)
 {
        exit(-1);
-       fail("Should've exitted...");
+       ck_abort_msg("Should've exitted...");
 }
 END_TEST
 
 START_TEST(loop_early_exit_normal)
 {
        exit(0);
-       fail("Should've exitted...");
+       ck_abort_msg("Should've exitted...");
 }
 END_TEST
 
 START_TEST(loop_early_exit_allowed_exit)
 {
        exit(-2);
-       fail("Should've exitted...");
+       ck_abort_msg("Should've exitted...");
+}
+END_TEST
+
+START_TEST(loop_early_exit_signal_segv)
+{
+       raise (SIGSEGV);
+       ck_abort_msg("Should've exitted...");
 }
 END_TEST
 
@@ -47,5 +76,6 @@ Suite *make_exit_suite(void)
   tcase_add_exit_test(tc,test_early_exit_with_allowed_error,-1);
   tcase_add_loop_test(tc,loop_early_exit_normal,0,5);
   tcase_add_loop_exit_test(tc,loop_early_exit_allowed_exit,-2,0,5);
+  tcase_add_loop_test_raise_signal(tc, loop_early_exit_signal_segv, SIGSEGV, 0, 5);
   return s;
 }
index 4478273..0d03581 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -15,7 +35,7 @@ int main (void)
   sr = srunner_create (make_master_suite());
   srunner_add_suite(sr, make_log_suite());
   srunner_add_suite(sr, make_fork_suite());
-  
+
   printf ("Ran %d tests in subordinate suite\n", sub_ntests);
   srunner_run_all (sr, CK_VERBOSE);
   cleanup();
index 1a8679e..a82dd01 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -13,7 +33,7 @@ static char errm[200];
 
 static void fixture_sub_setup (void)
 {
-  fail("Test failure in fixture");
+  ck_abort_msg("Test failure in fixture");
 }
 
 static SRunner *fixture_sr;
@@ -43,7 +63,7 @@ START_TEST(test_fixture_fail_counts)
   nrun = srunner_ntests_run(fixture_sr);
   nfail = srunner_ntests_failed(fixture_sr);
 
-  fail_unless (nrun == 1 && nfail == 1,
+  ck_assert_msg (nrun == 1 && nfail == 1,
               "Counts for run and fail for fixture failure not correct");
 }
 END_TEST
@@ -53,7 +73,7 @@ START_TEST(test_print_counts)
   char *srstat = sr_stat_str(fixture_sr);
   const char *exp = "0%: Checks: 1, Failures: 1, Errors: 0";
 
-  fail_unless(strcmp(srstat, exp) == 0,
+  ck_assert_msg(strcmp(srstat, exp) == 0,
              "SRunner stat string incorrect with setup failure");
   free(srstat);
 }
@@ -63,7 +83,7 @@ START_TEST(test_setup_failure_msg)
 {
   TestResult **tra;
   char *trm;
-  const char *trmexp = "check_check_fixture.c:16:S:Fix Sub:unchecked_setup:0: Test failure in fixture";
+  const char *trmexp = "check_check_fixture.c:36:S:Fix Sub:unchecked_setup:0: Test failure in fixture";
 
   tra = srunner_failures(fixture_sr);
   trm = tr_str(tra[0]);
@@ -73,12 +93,13 @@ START_TEST(test_setup_failure_msg)
     snprintf(errm, sizeof(errm),
             "Bad setup tr msg (%s)", trm);
     
-    fail (errm);
+    ck_abort_msg (errm);
   }
   free(trm);
 }
 END_TEST
 
+#if defined(HAVE_FORK) && HAVE_FORK==1
 int testval_up;
 int testval_down;
 
@@ -95,9 +116,9 @@ static void sub_ch_teardown_norm(void)
 START_TEST(test_sub_ch_setup_norm)
 {
   if (testval_up == 1)
-    fail("Setup not run correctly");
+    ck_abort_msg("Setup not run correctly");
   else if (testval_up > 3)
-    fail("Test side-effects persist across runs");
+    ck_abort_msg("Test side-effects persist across runs");
   testval_up++;
 }
 END_TEST
@@ -117,7 +138,7 @@ START_TEST(test_ch_setup)
   tcase_add_checked_fixture(tc,sub_ch_setup_norm,sub_ch_teardown_norm);
   srunner_run_all(sr, CK_VERBOSE);
 
-  fail_unless(srunner_ntests_failed(sr) == 0,
+  ck_assert_msg(srunner_ntests_failed(sr) == 0,
              "Checked setup not being run correctly");
 
   srunner_free(sr);
@@ -126,12 +147,12 @@ END_TEST
 
 static void setup_sub_fail (void)
 {
-  fail("Failed setup"); /* check_check_fixture.c:129 */
+  ck_abort_msg("Failed setup"); /* check_check_fixture.c:130 */
 }
 
 static void teardown_sub_fail (void)
 {
-  fail("Failed teardown");
+  ck_abort_msg("Failed teardown");
 }
 
 static void setup_sub_signal (void)
@@ -148,13 +169,13 @@ static void teardown_sub_signal(void)
 
 START_TEST(test_sub_fail)
 {
-  fail("Should never run");
+  ck_abort_msg("Should never run");
 }
 END_TEST
 
 START_TEST(test_sub_pass)
 {
-  fail_unless(1 == 1, "Always pass");
+  ck_assert_msg(1 == 1, "Always pass");
 }
 END_TEST
 
@@ -163,6 +184,7 @@ START_TEST(test_ch_setup_fail)
   TCase *tc;
   Suite *s;
   SRunner *sr;
+  TestResult ** tr;
   char *strstat;
   char *trm;
 
@@ -174,28 +196,31 @@ START_TEST(test_ch_setup_fail)
   sr = srunner_create(s);
   srunner_run_all(sr,CK_VERBOSE);
 
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked setup failure");
-  fail_unless (srunner_ntests_failed(sr) == 1,
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
               "Failure counts not correct for checked setup failure");
 
   strstat= sr_stat_str(sr);
 
-  fail_unless(strcmp(strstat,
+  ck_assert_msg(strcmp(strstat,
                     "0%: Checks: 1, Failures: 1, Errors: 0") == 0,
              "SRunner stat string incorrect with checked setup failure");
+  free(strstat);
 
-
-  trm = tr_str(srunner_failures(sr)[0]);
-   /* Search for check_check_fixture.c:129 if this fails. */
+  tr = srunner_failures(sr);
+  trm = tr_str(tr[0]);
+   /* Search for check_check_fixture.c:150 if this fails. */
   if (strstr(trm,
-            "check_check_fixture.c:129:S:Setup Fail:test_sub_fail:0: Failed setup")
+            "check_check_fixture.c:150:S:Setup Fail:test_sub_fail:0: Failed setup")
       == 0) {
     snprintf(errm, sizeof(errm),
             "Bad failed checked setup tr msg (%s)", trm);
     
-    fail (errm);
+    ck_abort_msg (errm);
   }
+  free(trm);
+  free(tr);
 }
 END_TEST
 
@@ -214,10 +239,11 @@ START_TEST(test_ch_setup_fail_nofork)
   srunner_set_fork_status(sr, CK_NOFORK);
   srunner_run_all(sr, CK_VERBOSE);
 
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked setup failure");
-  fail_unless (srunner_ntests_failed(sr) == 1,
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
               "Failure counts not correct for checked setup failure");
+  srunner_free(sr);
 }
 END_TEST
 
@@ -237,10 +263,11 @@ START_TEST(test_ch_setup_fail_nofork_2)
   srunner_set_fork_status(sr, CK_NOFORK);
   srunner_run_all(sr, CK_VERBOSE);
 
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked setup failure");
-  fail_unless (srunner_ntests_failed(sr) == 1,
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
               "Failure counts not correct for checked setup failure");
+  srunner_free(sr);
 }
 END_TEST
 
@@ -262,21 +289,32 @@ START_TEST(test_ch_setup_pass_nofork)
   testval_up = 1;
   testval_down = 1;
   srunner_run_all(sr, CK_VERBOSE);
-  fail_unless(testval_up == 7, "Multiple setups failed");
-  fail_unless(testval_down == 7, "Multiple teardowns failed");
+  ck_assert_msg(testval_up == 7, "Multiple setups failed");
+  ck_assert_msg(testval_down == 7, "Multiple teardowns failed");
 
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked setup failure");
-  fail_unless (srunner_ntests_failed(sr) == 0,
+  ck_assert_msg (srunner_ntests_failed(sr) == 0,
               "Failure counts not correct for checked setup failure");
+  srunner_free(sr);
 }
 END_TEST
 
+/* This test currently does not work on Cygwin, as it results in a
+ * SIGSEGV instead of a SIGFPE. However, a simple program that installs
+ * a SIGFPE handler then raise(SIGFPE) works as expected. Further
+ * investigation is necessary. */
+#if !defined(__CYGWIN__)
+/*
+ * This test will fail without fork, as it results in a checked
+ * fixture raising a signal, which terminates the test runner early.
+ */
 START_TEST(test_ch_setup_sig)
 {
   TCase *tc;
   Suite *s;
   SRunner *sr;
+  TestResult **tr;
   char *strstat;
   char *trm;
 
@@ -288,50 +326,59 @@ START_TEST(test_ch_setup_sig)
   sr = srunner_create(s);
   srunner_run_all(sr,CK_VERBOSE);
 
-  fail_unless (srunner_ntests_failed(sr) == 1,
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
               "Failure counts not correct for checked setup signal");
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked setup signal");
 
   strstat= sr_stat_str(sr);
 
-  fail_unless(strcmp(strstat,
+  ck_assert_msg(strcmp(strstat,
                     "0%: Checks: 1, Failures: 0, Errors: 1") == 0,
              "SRunner stat string incorrect with checked setup signal");
+  free(strstat);
 
-
-  trm = tr_str(srunner_failures(sr)[0]);
+  tr = srunner_failures(sr);
+  trm = tr_str(tr[0]);
 
   if (strstr(trm,
-            "check_check_fixture.c:139:S:Setup Sig:test_sub_fail:0: "
+            "check_check_fixture.c:160:S:Setup Sig:test_sub_fail:0: "
             "(after this point) Received signal 8")
       == 0) {
     snprintf(errm, sizeof(errm),
             "Msg was (%s)", trm);
     
-    fail (errm);
+    ck_abort_msg (errm);
   }
+  free(trm);
+  srunner_free(sr);
+  free(tr);
 }
 END_TEST
+#endif /* !defined(__CYGWIN__) */
 
 static void sub_ch_setup_dual_1(void)
 {
-  fail_unless(testval_up == 1, "Wrong start value");
+  ck_assert_msg(testval_up == 1, "Wrong start value");
   testval_up += 2;
 }
 
 static void sub_ch_setup_dual_2(void)
 {
-  fail_unless(testval_up == 3, "First setup failed");
+  ck_assert_msg(testval_up == 3, "First setup failed");
   testval_up += 3;
 }
 
 START_TEST(test_sub_two_setups)
 {
-  fail_unless(testval_up == 6, "Multiple setups failed");
+  ck_assert_msg(testval_up == 6, "Multiple setups failed");
 }
 END_TEST
 
+/*
+ * This test will not work without fork, as checked fixtures are
+ * not supported
+ */
 START_TEST(test_ch_setup_two_setups_fork)
 {
   TCase *tc;
@@ -348,7 +395,7 @@ START_TEST(test_ch_setup_two_setups_fork)
   testval_up = 1;
   srunner_run_all(sr, CK_VERBOSE);
 
-  fail_unless(srunner_ntests_failed(sr) == 0,
+  ck_assert_msg(srunner_ntests_failed(sr) == 0,
              "Problem with several setups");
 
   srunner_free(sr);
@@ -360,6 +407,7 @@ START_TEST(test_ch_teardown_fail)
   TCase *tc;
   Suite *s;
   SRunner *sr;
+  TestResult **tr;
   char *strstat;
   char *trm;
 
@@ -371,37 +419,96 @@ START_TEST(test_ch_teardown_fail)
   sr = srunner_create(s);
   srunner_run_all(sr,CK_VERBOSE);
 
-  fail_unless (srunner_ntests_failed(sr) == 1,
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
               "Failure counts not correct for checked teardown failure");
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked teardown failure");
 
   strstat= sr_stat_str(sr);
 
-  fail_unless(strcmp(strstat,
+  ck_assert_msg(strcmp(strstat,
                     "0%: Checks: 1, Failures: 1, Errors: 0") == 0,
              "SRunner stat string incorrect with checked setup failure");
+  free(strstat);
+
+  tr = srunner_failures(sr);
+  trm = tr_str(tr[0]);
 
+  if (strstr(trm,
+            "check_check_fixture.c:155:S:Teardown Fail:test_sub_pass:0: Failed teardown")
+      == 0) {
+    snprintf(errm, sizeof(errm),
+            "Bad failed checked teardown tr msg (%s)", trm);
+    
+    ck_abort_msg (errm);
+  }
+  free(trm);
+  free(tr);
+}
+END_TEST
 
-  trm = tr_str(srunner_failures(sr)[0]);
+START_TEST(test_ch_teardown_fail_nofork)
+{
+  TCase *tc;
+  Suite *s;
+  SRunner *sr;
+  TestResult **tr;
+  char *strstat;
+  char *trm;
+
+  s = suite_create("Teardown Fail No Fork");
+  tc = tcase_create("Teardown Fail No Fork");
+  suite_add_tcase(s, tc);
+  tcase_add_test(tc,test_sub_pass);
+  tcase_add_checked_fixture(tc,NULL, teardown_sub_fail);
+  sr = srunner_create(s);
+  srunner_set_fork_status(sr, CK_NOFORK);
+  srunner_run_all(sr,CK_VERBOSE);
+
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
+              "Failure counts not correct for checked teardown failure");
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
+              "Test run counts not correct for checked teardown failure");
+
+  strstat= sr_stat_str(sr);
+
+  ck_assert_msg(strcmp(strstat,
+                    "0%: Checks: 1, Failures: 1, Errors: 0") == 0,
+             "SRunner stat string incorrect with checked setup failure");
+  free(strstat);
+
+  tr = srunner_failures(sr);
+  trm = tr_str(tr[0]);
 
   if (strstr(trm,
-            "check_check_fixture.c:134:S:Teardown Fail:test_sub_pass:0: Failed teardown")
+            "check_check_fixture.c:155:S:Teardown Fail No Fork:test_sub_pass:0: Failed teardown")
       == 0) {
     snprintf(errm, sizeof(errm),
             "Bad failed checked teardown tr msg (%s)", trm);
     
-    fail (errm);
+    ck_abort_msg (errm);
   }
-  
+  free(trm);
+  free(tr);
 }
 END_TEST
 
+/* This test currently does not work on Cygwin, as it results in a
+ * SIGSEGV instead of a SIGFPE. However, a simple program that installs
+ * a SIGFPE handler then raise(SIGFPE) works as expected. Further
+ * investigation is necessary. */
+#if !defined(__CYGWIN__)
+/*
+ * This test will fail without fork, as it results in a checked
+ * fixture raising a signal, which terminates the test runner early.
+ */
+
 START_TEST(test_ch_teardown_sig)
 {
   TCase *tc;
   Suite *s;
   SRunner *sr;
+  TestResult **tr;
   char *strstat;
   char *trm;
 
@@ -413,42 +520,46 @@ START_TEST(test_ch_teardown_sig)
   sr = srunner_create(s);
   srunner_run_all(sr,CK_VERBOSE);
 
-  fail_unless (srunner_ntests_failed(sr) == 1,
+  ck_assert_msg (srunner_ntests_failed(sr) == 1,
               "Failure counts not correct for checked teardown signal");
-  fail_unless (srunner_ntests_run(sr) == 1,
+  ck_assert_msg (srunner_ntests_run(sr) == 1,
               "Test run counts not correct for checked teardown signal");
 
   strstat= sr_stat_str(sr);
 
-  fail_unless(strcmp(strstat,
+  ck_assert_msg(strcmp(strstat,
                     "0%: Checks: 1, Failures: 0, Errors: 1") == 0,
              "SRunner stat string incorrect with checked teardown signal");
+  free(strstat);
 
-
-  trm = tr_str(srunner_failures(sr)[0]);
+  tr = srunner_failures(sr);
+  trm = tr_str(tr[0]);
 
   if (strstr(trm,
-            "check_check_fixture.c:145:S:Teardown Sig:test_sub_pass:0: "
+            "check_check_fixture.c:166:S:Teardown Sig:test_sub_pass:0: "
             "(after this point) Received signal 8")
       == 0) {
     snprintf(errm, sizeof(errm),
             "Bad msg (%s)", trm);
     
-    fail (errm);
+    ck_abort_msg (errm);
   }
-  
+  free(trm);
+  srunner_free(sr);
+  free(tr);
 }
 END_TEST
+#endif /* !defined(__CYGWIN__) */
 
 /* Teardowns are run in reverse order */
 static void sub_ch_teardown_dual_1(void)
 {
-  fail_unless(testval_down == 6, "Second teardown failed");
+  ck_assert_msg(testval_down == 6, "Second teardown failed");
 }
 
 static void sub_ch_teardown_dual_2(void)
 {
-  fail_unless(testval_down == 3, "First teardown failed");
+  ck_assert_msg(testval_down == 3, "First teardown failed");
   testval_down += 3;
 }
 
@@ -458,6 +569,10 @@ START_TEST(test_sub_two_teardowns)
 }
 END_TEST
 
+/*
+ * This test will not work without fork, as checked fixtures are
+ * not supported
+ */
 START_TEST(test_ch_teardown_two_teardowns_fork)
 {
   TCase *tc;
@@ -484,6 +599,7 @@ START_TEST(test_ch_teardown_two_teardowns_fork)
     for (i = 0; i < nr_of_failures; i++) {
       char *trm = tr_str(tra[i]);
       if (strlen(errm) + strlen(trm) > 1022) {
+        free(trm);
         break;
       } 
       strcat(errm, trm);
@@ -492,12 +608,13 @@ START_TEST(test_ch_teardown_two_teardowns_fork)
     }
     free(tra);
   }
-  fail_unless(nr_of_failures == 0, "Problem with several teardowns\n %s",
+  ck_assert_msg(nr_of_failures == 0, "Problem with several teardowns\n %s",
               errm);
 
   srunner_free(sr);
 }
 END_TEST
+#endif /* HAVE_FORK */
 
 Suite *make_fixture_suite (void)
 {
@@ -512,15 +629,30 @@ Suite *make_fixture_suite (void)
   tcase_add_test(tc,test_fixture_fail_counts);
   tcase_add_test(tc,test_print_counts);
   tcase_add_test(tc,test_setup_failure_msg);
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+  /*
+   * This test assumes that CK_FORK is being used,
+   * as it tests that side effects from checked
+   * fixtures do not persist between tests.
+   */
   tcase_add_test(tc,test_ch_setup);
+  
   tcase_add_test(tc,test_ch_setup_fail);
   tcase_add_test(tc,test_ch_setup_fail_nofork);
   tcase_add_test(tc,test_ch_setup_fail_nofork_2);
   tcase_add_test(tc,test_ch_setup_pass_nofork);
+#if !defined(__CYGWIN__)
   tcase_add_test(tc,test_ch_setup_sig);
+#endif /* !defined(__CYGWIN__) */
   tcase_add_test(tc,test_ch_setup_two_setups_fork);
   tcase_add_test(tc,test_ch_teardown_fail);
+  tcase_add_test(tc,test_ch_teardown_fail_nofork);
+#if !defined(__CYGWIN__)
   tcase_add_test(tc,test_ch_teardown_sig);
+#endif /* !defined(__CYGWIN__) */
   tcase_add_test(tc,test_ch_teardown_two_teardowns_fork);
+#endif
+
   return s;
 }
index 447e44d..7961646 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <sys/types.h>
@@ -23,14 +43,14 @@ END_TEST
 
 START_TEST(test_nofork_sideeffects)
 {
-  fail_unless(counter == 1,
+  ck_assert_msg(counter == 1,
              "Side effects not seen across tests");
 }
 END_TEST
 
 START_TEST(test_nofork_pid)
 {
-  fail_unless(mypid == getpid(),
+  ck_assert_msg(mypid == getpid(),
              "Unit test is in a different adresss space from setup code");
 }
 END_TEST
@@ -71,40 +91,61 @@ void fork_teardown (void)
 
 START_TEST(test_default_fork)
 {
-  fail_unless(srunner_fork_status(fork_dummy_sr) == CK_FORK,
+#if defined(HAVE_FORK) && HAVE_FORK == 1
+  ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_FORK,
+             "Default fork status not set correctly");
+#else
+  ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_NOFORK,
              "Default fork status not set correctly");
+#endif /* HAVE_FORK */
 }
 END_TEST
 
-START_TEST(test_set_fork)
+START_TEST(test_set_nofork)
 {
   srunner_set_fork_status(fork_dummy_sr, CK_NOFORK);
-  fail_unless(srunner_fork_status(fork_dummy_sr) == CK_NOFORK,
+  ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_NOFORK,
+             "Fork status not changed correctly");
+}
+END_TEST
+
+/*
+ * The following tests will fail if fork is unavailable, as
+ * attempting to set the fork mode as anything but
+ * CK_NOFORK is considered an error.
+ */
+#if defined(HAVE_FORK) && HAVE_FORK==1
+START_TEST(test_set_fork)
+{
+  srunner_set_fork_status(fork_dummy_sr, CK_FORK);
+  ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_FORK,
              "Fork status not changed correctly");
 }
 END_TEST
 
 START_TEST(test_env)
 {
-  putenv((char *) "CK_FORK=no");
-  fail_unless(srunner_fork_status(fork_dummy_sr) == CK_NOFORK,
+  char envvar[] = "CK_FORK=no";
+  putenv(envvar);
+  ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_NOFORK,
              "Fork status does not obey environment variable");
 }
 END_TEST
 
 START_TEST(test_env_and_set)
 {
-  putenv((char *) "CK_FORK=no");
+  char envvar[] = "CK_FORK=no";
+  putenv(envvar);
   srunner_set_fork_status(fork_dummy_sr, CK_FORK);  
-  fail_unless(srunner_fork_status(fork_dummy_sr) == CK_FORK,
+  ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_FORK,
              "Explicit setting of fork status should override env");
 }
 END_TEST
-
+#endif /* HAVE_FORK */
 
 START_TEST(test_nofork)
 {
-  fail_unless(srunner_ntests_failed(fork_sr) == 0,
+  ck_assert_msg(srunner_ntests_failed(fork_sr) == 0,
              "Errors on nofork test");
 }
 END_TEST
@@ -119,9 +160,12 @@ Suite *make_fork_suite(void)
 
   suite_add_tcase(s, tc);
   tcase_add_test(tc,test_default_fork);
+  tcase_add_test(tc,test_set_nofork);
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test(tc,test_set_fork);
   tcase_add_test(tc,test_env);
   tcase_add_test(tc,test_env_and_set);
+#endif /* HAVE_FORK */
   tcase_add_test(tc,test_nofork);
   
   return s;
index afd1c5d..2f38c4a 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -23,9 +43,11 @@ static void limit_teardown (void)
 
 START_TEST(test_summary)
 {
-  fail_unless(strcmp(sr_stat_str(sr),
+  char * string = sr_stat_str(sr);
+  ck_assert_msg(strcmp(string,
                     "100%: Checks: 0, Failures: 0, Errors: 0") == 0,
              "Bad statistics string for empty suite");
+  free(string);
 }
 END_TEST
 
index 1a4a14f..ee36fde 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdio.h>
@@ -6,6 +26,28 @@
 #include <check.h>
 #include "check_check.h"
 
+#if HAVE_DECL_SETENV
+/* save environment variable's value and set new value */
+static int save_set_env(const char *name, const char *value,
+                        const char **old_value)
+{
+  *old_value = getenv(name);
+  return setenv(name, value, 1);
+}
+
+/* restore environment variable's old value, handle cases where
+   variable must be unset (old value is NULL) */
+static int restore_env(const char *name, const char *old_value)
+{
+  int res;
+  if (old_value == NULL) {
+     res = unsetenv(name);
+  } else {
+     res = setenv(name, old_value, 1);
+  }
+  return res;
+}
+#endif /* HAVE_DECL_SETENV */
 
 START_TEST(test_set_log)
 {
@@ -14,19 +56,56 @@ START_TEST(test_set_log)
 
   srunner_set_log (sr, "test_log");
 
-  fail_unless (srunner_has_log (sr), "SRunner not logging");
-  fail_unless (strcmp(srunner_log_fname(sr), "test_log") == 0,
+  ck_assert_msg (srunner_has_log (sr), "SRunner not logging");
+  ck_assert_msg (strcmp(srunner_log_fname(sr), "test_log") == 0,
+              "Bad file name returned");
+
+  srunner_free(sr);
+}
+END_TEST
+
+#if HAVE_DECL_SETENV
+/* Test enabling logging via environment variable */
+START_TEST(test_set_log_env)
+{
+  const char *old_val;
+  Suite *s = suite_create("Suite");
+  SRunner *sr = srunner_create(s);
+
+  /* check that setting log file via environment variable works */
+  ck_assert_msg(save_set_env("CK_LOG_FILE_NAME", "test_log", &old_val) == 0,
+              "Failed to set environment variable");
+
+  ck_assert_msg (srunner_has_log (sr), "SRunner not logging");
+  ck_assert_msg (strcmp(srunner_log_fname(sr), "test_log") == 0,
+              "Bad file name returned");
+
+  /* check that explicit call to srunner_set_log()
+     overrides environment variable */
+  srunner_set_log (sr, "test2_log");
+
+  ck_assert_msg (srunner_has_log (sr), "SRunner not logging");
+  ck_assert_msg (strcmp(srunner_log_fname(sr), "test2_log") == 0,
               "Bad file name returned");
+
+  /* restore old environment */
+  ck_assert_msg(restore_env("CK_LOG_FILE_NAME", old_val) == 0,
+              "Failed to restore environment variable");
+
+  srunner_free(sr);
 }
 END_TEST
+#endif /* HAVE_DECL_SETENV */
 
 START_TEST(test_no_set_log)
 {
   Suite *s = suite_create("Suite");
   SRunner *sr = srunner_create(s);
 
-  fail_unless (!srunner_has_log (sr), "SRunner not logging");
-  fail_unless (srunner_log_fname(sr) == NULL, "Bad file name returned");
+  ck_assert_msg (!srunner_has_log (sr), "SRunner not logging");
+  ck_assert_msg (srunner_log_fname(sr) == NULL, "Bad file name returned");
+
+  srunner_free(sr);
 }
 END_TEST
 
@@ -38,8 +117,10 @@ START_TEST(test_double_set_log)
   srunner_set_log (sr, "test_log");
   srunner_set_log (sr, "test2_log");
 
-  fail_unless(strcmp(srunner_log_fname(sr), "test_log") == 0,
+  ck_assert_msg(strcmp(srunner_log_fname(sr), "test_log") == 0,
              "Log file is initialize only and shouldn't be changeable once set");
+
+  srunner_free(sr);
 }
 END_TEST
 
@@ -51,19 +132,56 @@ START_TEST(test_set_xml)
 
   srunner_set_xml (sr, "test_log.xml");
 
-  fail_unless (srunner_has_xml (sr), "SRunner not logging XML");
-  fail_unless (strcmp(srunner_xml_fname(sr), "test_log.xml") == 0,
+  ck_assert_msg (srunner_has_xml (sr), "SRunner not logging XML");
+  ck_assert_msg (strcmp(srunner_xml_fname(sr), "test_log.xml") == 0,
+              "Bad file name returned");
+         
+  srunner_free(sr);
+}
+END_TEST
+
+#if HAVE_DECL_SETENV
+/* Test enabling XML logging via environment variable */
+START_TEST(test_set_xml_env)
+{
+  const char *old_val;
+  Suite *s = suite_create("Suite");
+  SRunner *sr = srunner_create(s);
+
+  /* check that setting XML log file via environment variable works */
+  ck_assert_msg(save_set_env("CK_XML_LOG_FILE_NAME", "test_log.xml", &old_val) == 0,
+              "Failed to set environment variable");
+
+  ck_assert_msg (srunner_has_xml (sr), "SRunner not logging XML");
+  ck_assert_msg (strcmp(srunner_xml_fname(sr), "test_log.xml") == 0,
+              "Bad file name returned");
+
+  /* check that explicit call to srunner_set_xml()
+     overrides environment variable */
+  srunner_set_xml (sr, "test2_log.xml");
+
+  ck_assert_msg (srunner_has_xml (sr), "SRunner not logging XML");
+  ck_assert_msg (strcmp(srunner_xml_fname(sr), "test2_log.xml") == 0,
               "Bad file name returned");
+
+  /* restore old environment */
+  ck_assert_msg(restore_env("CK_XML_LOG_FILE_NAME", old_val) == 0,
+              "Failed to restore environment variable");
+  
+  srunner_free(sr);
 }
 END_TEST
+#endif /* HAVE_DECL_SETENV */
 
 START_TEST(test_no_set_xml)
 {
   Suite *s = suite_create("Suite");
   SRunner *sr = srunner_create(s);
 
-  fail_unless (!srunner_has_xml (sr), "SRunner not logging XML");
-  fail_unless (srunner_xml_fname(sr) == NULL, "Bad file name returned");
+  ck_assert_msg (!srunner_has_xml (sr), "SRunner not logging XML");
+  ck_assert_msg (srunner_xml_fname(sr) == NULL, "Bad file name returned");
+  
+  srunner_free(sr);
 }
 END_TEST
 
@@ -75,8 +193,85 @@ START_TEST(test_double_set_xml)
   srunner_set_xml (sr, "test_log.xml");
   srunner_set_xml (sr, "test2_log.xml");
 
-  fail_unless(strcmp(srunner_xml_fname(sr), "test_log.xml") == 0,
+  ck_assert_msg(strcmp(srunner_xml_fname(sr), "test_log.xml") == 0,
              "XML Log file is initialize only and shouldn't be changeable once set");
+  
+  srunner_free(sr);
+}
+END_TEST
+
+START_TEST(test_set_tap)
+{
+  Suite *s = suite_create("Suite");
+  SRunner *sr = srunner_create(s);
+
+  srunner_set_tap (sr, "test_log.tap");
+
+  ck_assert_msg (srunner_has_tap (sr), "SRunner not logging TAP");
+  ck_assert_msg (strcmp(srunner_tap_fname(sr), "test_log.tap") == 0,
+              "Bad file name returned");
+
+  srunner_free(sr);
+}
+END_TEST
+
+#if HAVE_DECL_SETENV
+/* Test enabling TAP logging via environment variable */
+START_TEST(test_set_tap_env)
+{
+  const char *old_val;
+  Suite *s = suite_create("Suite");
+  SRunner *sr = srunner_create(s);
+
+  /* check that setting XML log file via environment variable works */
+  ck_assert_msg(save_set_env("CK_TAP_LOG_FILE_NAME", "test_log.tap", &old_val) == 0,
+              "Failed to set environment variable");
+
+  ck_assert_msg (srunner_has_tap (sr), "SRunner not logging TAP");
+  ck_assert_msg (strcmp(srunner_tap_fname(sr), "test_log.tap") == 0,
+              "Bad file name returned");
+
+  /* check that explicit call to srunner_set_tap()
+     overrides environment variable */
+  srunner_set_tap (sr, "test2_log.tap");
+
+  ck_assert_msg (srunner_has_tap (sr), "SRunner not logging TAP");
+  ck_assert_msg (strcmp(srunner_tap_fname(sr), "test2_log.tap") == 0,
+              "Bad file name returned");
+
+  /* restore old environment */
+  ck_assert_msg(restore_env("CK_TAP_LOG_FILE_NAME", old_val) == 0,
+              "Failed to restore environment variable");
+
+  srunner_free(sr);
+}
+END_TEST
+#endif /* HAVE_DECL_SETENV */
+
+START_TEST(test_no_set_tap)
+{
+  Suite *s = suite_create("Suite");
+  SRunner *sr = srunner_create(s);
+
+  ck_assert_msg (!srunner_has_tap (sr), "SRunner not logging TAP");
+  ck_assert_msg (srunner_tap_fname(sr) == NULL, "Bad file name returned");
+
+  srunner_free(sr);
+}
+END_TEST
+
+START_TEST(test_double_set_tap)
+{
+  Suite *s = suite_create("Suite");
+  SRunner *sr = srunner_create(s);
+
+  srunner_set_tap (sr, "test_log.tap");
+  srunner_set_tap (sr, "test2_log.tap");
+
+  ck_assert_msg(strcmp(srunner_tap_fname(sr), "test_log.tap") == 0,
+             "TAP Log file is initialize only and shouldn't be changeable once set");
+
+  srunner_free(sr);
 }
 END_TEST
 
@@ -84,22 +279,37 @@ Suite *make_log_suite(void)
 {
 
   Suite *s;
-  TCase *tc_core, *tc_core_xml;
+  TCase *tc_core, *tc_core_xml, *tc_core_tap;
 
   s = suite_create("Log");
   tc_core = tcase_create("Core");
   tc_core_xml = tcase_create("Core XML");
+  tc_core_tap = tcase_create("Core TAP");
 
   suite_add_tcase(s, tc_core);
   tcase_add_test(tc_core, test_set_log);
+#if HAVE_DECL_SETENV
+  tcase_add_test(tc_core, test_set_log_env);
+#endif /* HAVE_DECL_SETENV */
   tcase_add_test(tc_core, test_no_set_log);
   tcase_add_test(tc_core, test_double_set_log);
 
   suite_add_tcase(s, tc_core_xml);
   tcase_add_test(tc_core_xml, test_set_xml);
+#if HAVE_DECL_SETENV
+  tcase_add_test(tc_core_xml, test_set_xml_env);
+#endif /* HAVE_DECL_SETENV */
   tcase_add_test(tc_core_xml, test_no_set_xml);
   tcase_add_test(tc_core_xml, test_double_set_xml);
 
+  suite_add_tcase(s, tc_core_tap);
+  tcase_add_test(tc_core_tap, test_set_tap);
+#if HAVE_DECL_SETENV
+  tcase_add_test(tc_core_tap, test_set_tap_env);
+#endif /* HAVE_DECL_SETENV */
+  tcase_add_test(tc_core_tap, test_no_set_tap);
+  tcase_add_test(tc_core_tap, test_double_set_tap);
+
   return s;
 }
 
index 50b114b..0101432 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 /* Tests for log related stuff in check which need non-exported functions. */
@@ -22,13 +42,13 @@ START_TEST(test_init_logging_subunit)
   Suite *s = suite_create("Suite");
   SRunner *sr = srunner_create(s);
   srunner_init_logging(sr, CK_SUBUNIT);
-  list_front (sr->loglst);
-  fail_if (list_at_end(sr->loglst), "No entries in log list");
-  first_log = list_val(sr->loglst);
-  fail_if (first_log == NULL, "log is NULL");
-  list_advance(sr->loglst);
-  fail_unless(list_at_end(sr->loglst), "More than one entry in log list");
-  fail_unless(first_log->lfun == subunit_lfun,
+  check_list_front (sr->loglst);
+  ck_assert_msg (!check_list_at_end(sr->loglst), "No entries in log list");
+  first_log = (Log *)check_list_val(sr->loglst);
+  ck_assert_msg (first_log != NULL, "log is NULL");
+  check_list_advance(sr->loglst);
+  ck_assert_msg(check_list_at_end(sr->loglst), "More than one entry in log list");
+  ck_assert_msg(first_log->lfun == subunit_lfun,
               "Log function is not the subunit lfun.");
   srunner_end_logging(sr);
   srunner_free(sr);
@@ -38,16 +58,16 @@ END_TEST
 
 Suite *make_log_internal_suite(void)
 {
-
   Suite *s;
-  TCase *tc_core_subunit;
 
+#if ENABLE_SUBUNIT
+  TCase *tc_core_subunit;
   s = suite_create("Log");
   tc_core_subunit = tcase_create("Core SubUnit");
-
-#if ENABLE_SUBUNIT
   suite_add_tcase(s, tc_core_subunit);
   tcase_add_test(tc_core_subunit, test_init_logging_subunit);
+#else
+  s = suite_create("Log");
 #endif
   
   return s;
index 692a96d..3391493 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -10,11 +30,9 @@ int main (void)
   int n;
   SRunner *sr;
 
-#ifdef _POSIX_VERSION
   fork_setup();
   setup_fixture();
   setup();
-#endif /* _POSIX_VERSION */
 
   sr = srunner_create (make_master_suite());
   srunner_add_suite(sr, make_list_suite());
@@ -25,7 +43,13 @@ int main (void)
   srunner_add_suite(sr, make_fork_suite());
   srunner_add_suite(sr, make_fixture_suite());
   srunner_add_suite(sr, make_pack_suite());
+  srunner_add_suite(sr, make_tag_suite());
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
   srunner_add_suite(sr, make_exit_suite());
+#endif
+
+  srunner_add_suite(sr, make_selective_suite());
   
   printf ("Ran %d tests in subordinate suite\n", sub_ntests);
   srunner_run_all (sr, CK_VERBOSE);
index 056d933..5aedc79 100644 (file)
@@ -1,21 +1,62 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#if ENABLE_REGEX
+# include <regex.h>
+#endif
 #include <check.h>
 #include <assert.h>
 #include "check_check.h"
 
+int sub_nfailed;
+int sub_ntests;
 
 TestResult **tr_fail_array;
 TestResult **tr_all_array;
 
+FILE * test_names_file = NULL;
+char * test_names_file_name = NULL;
+FILE * line_num_failures = NULL;
+char * line_num_failures_file_name = NULL;
+
+enum ck_test_msg_type_t {
+#if ENABLE_REGEX
+  // For tests with different output on different platforms
+  CK_MSG_REGEXP,
+#endif
+  // Simple text
+  CK_MSG_TEXT
+};
+
 #define MAXSTR 300
 
 typedef struct {
   const char *tcname;
+  const char *test_name;
   int failure_type;
+  enum ck_test_msg_type_t msg_type;
   const char *msg;
 } master_test_t;
 
@@ -24,95 +65,354 @@ static char signal_11_str[SIG_STR_LEN];
 static char signal_11_8_str[SIG_STR_LEN];
 static char signal_8_str[SIG_STR_LEN];
 
-/* FIXME: all these line numbers are kind of hard to maintain */
 static master_test_t master_tests[] = {
-  { "Simple Tests", CK_FAILURE, "Failure expected" },
-  { "Simple Tests", CK_ERROR,   "Early exit with return value 1" },
-  { "Simple Tests", CK_PASS,    "Passed" },
-  { "Simple Tests", CK_FAILURE, "This test should fail" },
-  { "Simple Tests", CK_PASS,    "Passed" },
-  { "Simple Tests", CK_FAILURE, "This test should fail" },
-  { "Simple Tests", CK_FAILURE, "Assertion '2 == 3' failed" },
-  { "Simple Tests", CK_FAILURE, "Assertion '4 == 5' failed" },
-  { "Simple Tests", CK_FAILURE, "Failure '2 != 3' occured" },
-  { "Simple Tests", CK_FAILURE, "Failure '4 != 5' occured" },
-  { "Simple Tests", CK_FAILURE, "3 != 4" },
-  { "Simple Tests", CK_FAILURE, "5 != 6" },
-  { "Simple Tests", CK_FAILURE, "7 == 7" },
-  { "Simple Tests", CK_FAILURE, "Failed" },
-  { "Simple Tests", CK_FAILURE, "Failed" },
-  { "Simple Tests", CK_FAILURE, "Failure expected" },
-  { "Simple Tests", CK_FAILURE, "Failed" },
-  { "Simple Tests", CK_FAILURE, "Assertion 'x == y' failed" },
-  { "Simple Tests", CK_FAILURE, "Assertion '0' failed" },
-  { "Simple Tests", CK_FAILURE, "Assertion 'x==y' failed: x==3, y==4" },
-  { "Simple Tests", CK_FAILURE, "Assertion 'x!=y' failed: x==3, y==3" },
-  { "Simple Tests", CK_FAILURE, "Assertion '\"test1\"==s' failed: \"test1\"==\"test1\", s==\"test2\"" },
-  { "Simple Tests", CK_FAILURE, "Assertion 't!=s' failed: t==\"test2\", s==\"test2\"" },
-
-  { "Signal Tests", CK_ERROR,   signal_11_str },
-  { "Signal Tests", CK_PASS,    "Passed" },
-  { "Signal Tests", CK_ERROR,   signal_11_8_str },
-  { "Signal Tests", CK_FAILURE, "Early exit with return value 0" },
-  { "Signal Tests", CK_FAILURE, "Early exit with return value 1" },
-  { "Signal Tests", CK_ERROR,   signal_8_str },
-  { "Signal Tests", CK_ERROR,   signal_8_str },
-
-#if TIMEOUT_TESTS_ENABLED
-#if HAVE_WORKING_SETENV
-  { "Environment Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "Environment Timeout Tests", CK_PASS,   "Passed" },
-  { "Environment Timeout Tests", CK_PASS,   "Passed" },
-  { "Environment Timeout Tests", CK_ERROR,  "Test timeout expired" },
+  { "Simple Tests", "test_lno", CK_FAILURE, CK_MSG_TEXT, "Failure expected" },
+#if defined(HAVE_FORK) && HAVE_FORK==1
+  { "Simple Tests", "test_mark_lno", CK_ERROR, CK_MSG_TEXT,   "Early exit with return value 1" },
 #endif
-  { "Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "Timeout Tests", CK_PASS,   "Passed" },
-  { "Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "User Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "User Timeout Tests", CK_PASS,   "Passed" },
-  { "User Timeout Tests", CK_PASS,   "Passed" },
-  { "User Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  /* Timeout tests are run twice , see check_check_sub.c:make_sub_suite() */
-  { "Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "Timeout Tests", CK_PASS,   "Passed" },
-  { "Timeout Tests", CK_ERROR,  "Test timeout expired" },
-  { "Timeout Tests", CK_ERROR,  "Test timeout expired" },
-#if HAVE_WORKING_SETENV
-  { "Environment Timeout Scaling Tests", CK_ERROR,  "Test timeout expired" },
-  { "Environment Timeout Scaling Tests", CK_PASS,   "Passed" },
-  { "Environment Timeout Scaling Tests", CK_PASS,   "Passed" },
-  { "Environment Timeout Scaling Tests", CK_ERROR,  "Test timeout expired" },
-  { "Timeout Scaling Tests", CK_ERROR,  "Test timeout expired" },
-  { "Timeout Scaling Tests", CK_PASS,   "Passed" },
-  { "Timeout Scaling Tests", CK_PASS,   "Passed" },
-  { "Timeout Scaling Tests", CK_ERROR,  "Test timeout expired" },
-  { "User Timeout Scaling Tests", CK_ERROR,  "Test timeout expired" },
-  { "User Timeout Scaling Tests", CK_PASS,   "Passed" },
-  { "User Timeout Scaling Tests", CK_PASS,   "Passed" },
-  { "User Timeout Scaling Tests", CK_ERROR,  "Test timeout expired" },
+  { "Simple Tests", "test_pass", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Simple Tests", "test_fail_unless", CK_FAILURE, CK_MSG_TEXT, "This test should fail" },
+  { "Simple Tests", "test_fail_if_pass", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Simple Tests", "test_fail_if_fail", CK_FAILURE, CK_MSG_TEXT, "This test should fail" },
+  { "Simple Tests", "test_fail_null_msg", CK_FAILURE, CK_MSG_TEXT, "Assertion '2 == 3' failed" },
+#if defined(__GNUC__)
+  { "Simple Tests", "test_fail_no_msg", CK_FAILURE, CK_MSG_TEXT, "Assertion '4 == 5' failed" },
+#endif /* __GNUC__ */
+  { "Simple Tests", "test_fail_if_null_msg", CK_FAILURE, CK_MSG_TEXT, "Failure '2 != 3' occurred" },
+#if defined(__GNUC__)
+  { "Simple Tests", "test_fail_if_no_msg", CK_FAILURE, CK_MSG_TEXT, "Failure '4 != 5' occurred" },
+#endif /* __GNUC__ */
+  { "Simple Tests", "test_fail_vararg_msg_1", CK_FAILURE, CK_MSG_TEXT, "3 != 4" },
+  { "Simple Tests", "test_fail_vararg_msg_2", CK_FAILURE, CK_MSG_TEXT, "5 != 6" },
+  { "Simple Tests", "test_fail_vararg_msg_3", CK_FAILURE, CK_MSG_TEXT, "7 == 7" },
+#if defined(__GNUC__)
+  { "Simple Tests", "test_fail_empty", CK_FAILURE, CK_MSG_TEXT, "Failed" },
+#endif /* __GNUC__ */
+  { "Simple Tests", "test_ck_abort", CK_FAILURE, CK_MSG_TEXT, "Failed" },
+  { "Simple Tests", "test_ck_abort_msg", CK_FAILURE, CK_MSG_TEXT, "Failure expected" },
+  { "Simple Tests", "test_ck_abort_msg_null", CK_FAILURE, CK_MSG_TEXT, "Failed" },
+  { "Simple Tests", "test_ck_assert", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed" },
+  { "Simple Tests", "test_ck_assert_null", CK_FAILURE, CK_MSG_TEXT, "Assertion '0' failed" },
+  { "Simple Tests", "test_ck_assert_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%f == 1' failed" },
+  { "Simple Tests", "test_ck_assert_int_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed: x == 3, y == 4" },
+  { "Simple Tests", "test_ck_assert_int_eq_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d == 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_int_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != y' failed: x == 3, y == 3" },
+  { "Simple Tests", "test_ck_assert_int_ne_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d != 3%f' failed: 3%d == 1, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_int_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x < x' failed: x == 2, x == 2" },
+  { "Simple Tests", "test_ck_assert_int_lt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d < 3%f' failed: 3%d == 1, 3%f == 0" },
+  { "Simple Tests", "test_ck_assert_int_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y <= x' failed: y == 3, x == 2" },
+  { "Simple Tests", "test_ck_assert_int_le_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_int_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y > y' failed: y == 3, y == 3" },
+  { "Simple Tests", "test_ck_assert_int_gt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d > 3%f' failed: 3%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_int_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y' failed: x == 2, y == 3" },
+  { "Simple Tests", "test_ck_assert_int_ge_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d >= 4%f' failed: 3%d == 0, 4%f == 1" },
+  { "Simple Tests", "test_ck_assert_int_expr", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Simple Tests", "test_ck_assert_uint_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed: x == 3, y == 4" },
+  { "Simple Tests", "test_ck_assert_uint_eq_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d == 1%f' failed: 3%d == 1, 1%f == 0" },
+  { "Simple Tests", "test_ck_assert_uint_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != y' failed: x == 3, y == 3" },
+  { "Simple Tests", "test_ck_assert_uint_ne_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%d != 1%f' failed: 1%d == 0, 1%f == 0" },
+  { "Simple Tests", "test_ck_assert_uint_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x < x' failed: x == 2, x == 2" },
+  { "Simple Tests", "test_ck_assert_uint_lt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d < 1%f' failed: 3%d == 1, 1%f == 0" },
+  { "Simple Tests", "test_ck_assert_uint_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y <= x' failed: y == 3, x == 2" },
+  { "Simple Tests", "test_ck_assert_uint_le_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 1%f' failed: 3%d == 1, 1%f == 0" },
+  { "Simple Tests", "test_ck_assert_uint_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y > y' failed: y == 3, y == 3" },
+  { "Simple Tests", "test_ck_assert_uint_gt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%d > 3%f' failed: 1%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_uint_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y' failed: x == 2, y == 3" },
+  { "Simple Tests", "test_ck_assert_uint_ge_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%d >= 3%f' failed: 1%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_uint_expr", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  /* Tests on float macros */
+  { "Simple Tests", "test_ck_assert_float_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed: x == 1.1, y == 1.2" },
+  { "Simple Tests", "test_ck_assert_float_eq_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d == 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_float_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != y' failed: x == 1.1, y == 1.1" },
+  { "Simple Tests", "test_ck_assert_float_ne_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%d != 1%f' failed: 1%d == 1, 1%f == 1" },
+  { "Simple Tests", "test_ck_assert_float_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x < y' failed: x == 2, y == 1.5" },
+  { "Simple Tests", "test_ck_assert_float_lt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d < 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_float_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x <= y' failed: x == 2, y == 1.5" },
+  { "Simple Tests", "test_ck_assert_float_le_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_float_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x > y' failed: x == 2.5, y == 3" },
+  { "Simple Tests", "test_ck_assert_float_gt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d > 3%f' failed: 2%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_float_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y' failed: x == 2.5, y == 3" },
+  { "Simple Tests", "test_ck_assert_float_ge_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d >= 3%f' failed: 2%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_float_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_float_eq_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(y - x) < t' failed: x == 0.001, y == 0.003, t == 0.001" },
+  { "Simple Tests", "test_ck_assert_float_eq_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(2%f - 3%d) < 2%p' failed: 3%d == 1, 2%f == 0, 2%p == 0" },
+  { "Simple Tests", "test_ck_assert_float_ne_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(y - x) >= t' failed: x == 0.001, y == 0.002, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_float_ne_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(3%f - 3%d) >= 3%p' failed: 3%d == 1, 3%f == 1, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_float_ge_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y, error < t' failed: x == 0.01, y == 0.03, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_float_ge_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d >= 3%f, error < 3%p' failed: 2%d == 0, 3%f == 1, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_float_le_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y <= x, error < t' failed: y == 0.03, x == 0.01, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_float_le_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f, error < 3%p' failed: 3%d == 1, 2%f == 0, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_float_tol_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_float_finite", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is finite' failed: x == inf" },
+  { "Simple Tests", "test_ck_assert_float_finite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x*(1%d) is finite' failed: x*(1%d) == inf" },
+  { "Simple Tests", "test_ck_assert_float_infinite", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is infinite' failed: x == 0" },
+  { "Simple Tests", "test_ck_assert_float_infinite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is infinite' failed: 2%d == 0" },
+  { "Simple Tests", "test_ck_assert_float_nan", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is NaN' failed: x == inf" },
+  { "Simple Tests", "test_ck_assert_float_nan_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is NaN' failed: 2%d == 0" },
+#if ENABLE_REGEX
+  { "Simple Tests", "test_ck_assert_float_nonnan", CK_FAILURE, CK_MSG_REGEXP, "^Assertion 'x is not NaN' failed: x == -?nan$" },
+  { "Simple Tests", "test_ck_assert_float_nonnan_with_mod", CK_FAILURE, CK_MSG_REGEXP, "^Assertion '\\(2%s\\)\\*x is not NaN' failed: \\(2%s\\)\\*x == -?nan$" },
+#else
+  { "Simple Tests", "test_ck_assert_float_nonnan", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_float_nonnan_with_mod", CK_PASS, CK_MSG_TEXT, "Passed" },
 #endif
+  { "Simple Tests", "test_ck_assert_float_nan_and_inf_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  /* End of tests on float macros */
+  /* Tests on double macros */
+  { "Simple Tests", "test_ck_assert_double_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed: x == 1.1, y == 1.2" },
+  { "Simple Tests", "test_ck_assert_double_eq_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d == 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_double_eq_with_promotion", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_double_eq_with_conv", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == 0.1' failed: x == 0.1, 0.1 == 0.1" },
+  { "Simple Tests", "test_ck_assert_double_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != y' failed: x == 1.1, y == 1.1" },
+  { "Simple Tests", "test_ck_assert_double_ne_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%d != 1%f' failed: 1%d == 1, 1%f == 1" },
+  { "Simple Tests", "test_ck_assert_double_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x < y' failed: x == 2, y == 1.5" },
+  { "Simple Tests", "test_ck_assert_double_lt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d < 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_double_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x <= y' failed: x == 2, y == 1.5" },
+  { "Simple Tests", "test_ck_assert_double_le_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_double_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x > y' failed: x == 2.5, y == 3" },
+  { "Simple Tests", "test_ck_assert_double_gt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d > 3%f' failed: 2%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_double_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y' failed: x == 2.5, y == 3" },
+  { "Simple Tests", "test_ck_assert_double_ge_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d >= 3%f' failed: 2%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_double_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_double_eq_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(y - x) < t' failed: x == 0.001, y == 0.002, t == 0.001" },
+  { "Simple Tests", "test_ck_assert_double_eq_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(2%f - 3%d) < 2%p' failed: 3%d == 1, 2%f == 0, 2%p == 0" },
+  { "Simple Tests", "test_ck_assert_double_ne_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(y - x) >= t' failed: x == 0.001, y == 0.002, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_double_ne_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(3%f - 3%d) >= 3%p' failed: 3%d == 1, 3%f == 1, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_double_ge_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y, error < t' failed: x == 0.01, y == 0.03, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_double_ge_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d >= 3%f, error < 3%p' failed: 2%d == 0, 3%f == 1, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_double_le_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y <= x, error < t' failed: y == 0.03, x == 0.01, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_double_le_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f, error < 3%p' failed: 3%d == 1, 2%f == 0, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_double_tol_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_double_finite", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is finite' failed: x == inf" },
+  { "Simple Tests", "test_ck_assert_double_finite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x*(1%d) is finite' failed: x*(1%d) == inf" },
+  { "Simple Tests", "test_ck_assert_double_infinite", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is infinite' failed: x == 0" },
+  { "Simple Tests", "test_ck_assert_double_infinite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is infinite' failed: 2%d == 0" },
+  { "Simple Tests", "test_ck_assert_double_nan", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is NaN' failed: x == inf" },
+  { "Simple Tests", "test_ck_assert_double_nan_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is NaN' failed: 2%d == 0" },
+#if ENABLE_REGEX
+  { "Simple Tests", "test_ck_assert_double_nonnan", CK_FAILURE, CK_MSG_REGEXP, "^Assertion 'x is not NaN' failed: x == -?nan$" },
+  { "Simple Tests", "test_ck_assert_double_nonnan_with_mod", CK_FAILURE, CK_MSG_REGEXP, "^Assertion '\\(2%s\\)\\*x is not NaN' failed: \\(2%s\\)\\*x == -?nan$" },
+#else
+  { "Simple Tests", "test_ck_assert_double_nonnan", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_double_nonnan_with_mod", CK_PASS, CK_MSG_TEXT, "Passed" },
 #endif
+  { "Simple Tests", "test_ck_assert_double_nan_and_inf_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  /* End of tests on double macros */
+  /* Tests on long double macros */
+  { "Simple Tests", "test_ck_assert_ldouble_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed: x == 1.1, y == 1.2" },
+  { "Simple Tests", "test_ck_assert_ldouble_eq_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d == 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_ldouble_eq_with_promotion", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_ldouble_eq_with_conv", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == 1.1' failed: x == 1.1, 1.1 == 1.1" },
+  { "Simple Tests", "test_ck_assert_ldouble_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != y' failed: x == 1.1, y == 1.1" },
+  { "Simple Tests", "test_ck_assert_ldouble_ne_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '1%d != 1%f' failed: 1%d == 1, 1%f == 1" },
+  { "Simple Tests", "test_ck_assert_ldouble_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x < y' failed: x == 2, y == 1.5" },
+  { "Simple Tests", "test_ck_assert_ldouble_lt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d < 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_ldouble_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x <= y' failed: x == 2, y == 1.5" },
+  { "Simple Tests", "test_ck_assert_ldouble_le_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f' failed: 3%d == 1, 2%f == 0" },
+  { "Simple Tests", "test_ck_assert_ldouble_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x > y' failed: x == 2.5, y == 3" },
+  { "Simple Tests", "test_ck_assert_ldouble_gt_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d > 3%f' failed: 2%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_ldouble_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y' failed: x == 2.5, y == 3" },
+  { "Simple Tests", "test_ck_assert_ldouble_ge_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d >= 3%f' failed: 2%d == 0, 3%f == 1" },
+  { "Simple Tests", "test_ck_assert_ldouble_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_ldouble_eq_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(y - x) < t' failed: x == 0.001, y == 0.002, t == 0.001" },
+  { "Simple Tests", "test_ck_assert_ldouble_eq_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(2%f - 3%d) < 2%p' failed: 3%d == 1, 2%f == 0, 2%p == 0" },
+  { "Simple Tests", "test_ck_assert_ldouble_ne_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(y - x) >= t' failed: x == 0.001, y == 0.002, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_ldouble_ne_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'fabsl(3%f - 3%d) >= 3%p' failed: 3%d == 1, 3%f == 1, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_ldouble_ge_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x >= y, error < t' failed: x == 0.01, y == 0.03, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_ldouble_ge_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d >= 3%f, error < 3%p' failed: 2%d == 0, 3%f == 1, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_ldouble_le_tol", CK_FAILURE, CK_MSG_TEXT, "Assertion 'y <= x, error < t' failed: y == 0.03, x == 0.01, t == 0.01" },
+  { "Simple Tests", "test_ck_assert_ldouble_le_tol_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '3%d <= 2%f, error < 3%p' failed: 3%d == 1, 2%f == 0, 3%p == 1" },
+  { "Simple Tests", "test_ck_assert_ldouble_tol_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_ldouble_finite", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is finite' failed: x == inf" },
+  { "Simple Tests", "test_ck_assert_ldouble_finite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x*(1%d) is finite' failed: x*(1%d) == inf" },
+  { "Simple Tests", "test_ck_assert_ldouble_infinite", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is infinite' failed: x == 0" },
+  { "Simple Tests", "test_ck_assert_ldouble_infinite_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is infinite' failed: 2%d == 0" },
+  { "Simple Tests", "test_ck_assert_ldouble_nan", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x is NaN' failed: x == inf" },
+  { "Simple Tests", "test_ck_assert_ldouble_nan_with_mod", CK_FAILURE, CK_MSG_TEXT, "Assertion '2%d is NaN' failed: 2%d == 0" },
+#if ENABLE_REGEX
+  { "Simple Tests", "test_ck_assert_ldouble_nonnan", CK_FAILURE, CK_MSG_REGEXP, "^Assertion 'x is not NaN' failed: x == -?nan$" },
+  { "Simple Tests", "test_ck_assert_ldouble_nonnan_with_mod", CK_FAILURE, CK_MSG_REGEXP, "^Assertion '\\(2%s\\)\\*x is not NaN' failed: \\(2%s\\)\\*x == -?nan$" },
+#else
+  { "Simple Tests", "test_ck_assert_ldouble_nonnan", CK_PASS, CK_MSG_TEXT, "Passed" },
+  { "Simple Tests", "test_ck_assert_ldouble_nonnan_with_mod", CK_PASS, CK_MSG_TEXT, "Passed" },
+#endif
+  { "Simple Tests", "test_ck_assert_ldouble_nan_and_inf_with_expr", CK_PASS, CK_MSG_TEXT, "Passed" },
+  /* End of tests on long double macros */
+  { "Simple Tests", "test_percent_n_escaped", CK_FAILURE, CK_MSG_TEXT, "Assertion 'returnsZero(\"%n\") == 1' failed: returnsZero(\"%n\") == 0, 1 == 1" },
+  { "Simple Tests", "test_ck_assert_str_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion '\"test1\" == s' failed: \"test1\" == \"test1\", s == \"test2\"" },
+  { "Simple Tests", "test_ck_assert_str_eq_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 't == s' failed: t == (null), s == (null)" },
+  { "Simple Tests", "test_ck_assert_str_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 't != s' failed: t == \"test2\", s == \"test2\"" },
+  { "Simple Tests", "test_ck_assert_str_ne_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 't != s' failed: t == \"test\", s == (null)" },
+  { "Simple Tests", "test_ck_assert_str_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 's < s' failed: s == \"test1\", s == \"test1\"" },
+  { "Simple Tests", "test_ck_assert_str_lt_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 's < t' failed: s == (null), t == \"test\"" },
+  { "Simple Tests", "test_ck_assert_str_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 't <= s' failed: t == \"test2\", s == \"test1\"" },
+  { "Simple Tests", "test_ck_assert_str_le_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 't <= s' failed: t == (null), s == (null)" },
+  { "Simple Tests", "test_ck_assert_str_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 't > t' failed: t == \"test2\", t == \"test2\"" },
+  { "Simple Tests", "test_ck_assert_str_gt_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 't > s' failed: t == \"test\", s == (null)" },
+  { "Simple Tests", "test_ck_assert_str_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 's >= t' failed: s == \"test1\", t == \"test2\"" },
+  { "Simple Tests", "test_ck_assert_str_ge_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 's >= t' failed: s == (null), t == (null)" },
+  { "Simple Tests", "test_ck_assert_str_expr", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Simple Tests", "test_ck_assert_pstr_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion '\"test1\" == s' failed: \"test1\" == \"test1\", s == \"test\"" },
+  { "Simple Tests", "test_ck_assert_pstr_eq_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 't == s' failed: t == \"test\", s == (null)" },
+  { "Simple Tests", "test_ck_assert_pstr_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 't != s' failed: t == \"test2\", s == \"test2\"" },
+  { "Simple Tests", "test_ck_assert_pstr_ne_with_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 't != s' failed: t == (null), s == (null)" },
+  { "Simple Tests", "test_ck_assert_ptr_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == y' failed: x == 0x1, y == 0x2" },
+  { "Simple Tests", "test_ck_assert_ptr_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != z' failed: x == 0x1, z == 0x1" },
+  { "Simple Tests", "test_ck_assert_ptr_null", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x == NULL' failed: x == 0x1" },
+  { "Simple Tests", "test_ck_assert_ptr_nonnull", CK_FAILURE, CK_MSG_TEXT, "Assertion 'x != NULL' failed: x == 0" },
+  { "Simple Tests", "test_ck_assert_mem_eq", CK_FAILURE, CK_MSG_TEXT, "Assertion '\"\\x00\\x00\\x00\\x00\\x01\" == s' failed: \"\\x00\\x00\\x00\\x00\\x01\" == \"0000000001\", s == \"0000000002\"" },
+  { "Simple Tests", "test_ck_assert_mem_ne", CK_FAILURE, CK_MSG_TEXT, "Assertion 't != s' failed: t == \"0000000002\", s == \"0000000002\"" },
+  { "Simple Tests", "test_ck_assert_mem_lt", CK_FAILURE, CK_MSG_TEXT, "Assertion 's < s' failed: s == \"0000000001\", s == \"0000000001\"" },
+  { "Simple Tests", "test_ck_assert_mem_le", CK_FAILURE, CK_MSG_TEXT, "Assertion 't <= s' failed: t == \"0000000002\", s == \"0000000001\"" },
+  { "Simple Tests", "test_ck_assert_mem_gt", CK_FAILURE, CK_MSG_TEXT, "Assertion 't > t' failed: t == \"0000000002\", t == \"0000000002\"" },
+  { "Simple Tests", "test_ck_assert_mem_ge", CK_FAILURE, CK_MSG_TEXT, "Assertion 's >= t' failed: s == \"0000000001\", t == \"0000000002\"" },
+  { "Simple Tests", "test_ck_assert_mem_zerolen", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Simple Tests", "test_ck_assert_mem_eq_exact", CK_FAILURE, CK_MSG_TEXT, "Assertion 't == s' failed: t == \"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\", s == \"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002\"" },
+  { "Simple Tests", "test_ck_assert_mem_eq_longer", CK_FAILURE, CK_MSG_TEXT, "Assertion 't == s' failed: t == \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000..\", s == \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000..\"" },
+  
+#if defined(HAVE_FORK) && HAVE_FORK==1
+  { "Signal Tests", "test_segv", CK_ERROR, CK_MSG_TEXT,   signal_11_str },
+  { "Signal Tests", "test_segv_pass", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Signal Tests", "test_segv", CK_ERROR, CK_MSG_TEXT,   signal_11_8_str },
+  { "Signal Tests", "test_non_signal_8", CK_FAILURE, CK_MSG_TEXT, "Early exit with return value 0" },
+  { "Signal Tests", "test_fail_unless", CK_FAILURE, CK_MSG_TEXT, "Early exit with return value 1" },
+#if !defined(__CYGWIN__)
+  { "Signal Tests", "test_fpe", CK_ERROR, CK_MSG_TEXT,   signal_8_str },
+  { "Signal Tests", "test_mark_point", CK_ERROR, CK_MSG_TEXT,   signal_8_str },
+#endif /* !defined(__CYGWIN__) */
+#endif /* HAVE_FORK */
+
+#if TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) && HAVE_FORK==1
+#if HAVE_DECL_SETENV
+  { "Environment Integer Timeout Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Environment Integer Timeout Tests", "test_sleep2_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Integer Timeout Tests", "test_sleep5_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Integer Timeout Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+  { "Environment Double Timeout Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "Environment Double Timeout Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,  "Passed" },
+  { "Environment Double Timeout Tests", "test_sleep1_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#endif /* HAVE_LIBRT */
+  { "Environment Double Timeout Tests", "test_sleep2_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Environment Double Timeout Tests", "test_sleep5_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Environment Double Timeout Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#endif /* HAVE_DECL_SETENV */
+
+  { "Default Timeout Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "Default Timeout Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Default Timeout Tests", "test_sleep1_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+#endif /* HAVE_LIBRT */
+  { "Default Timeout Tests", "test_sleep2_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Default Timeout Tests", "test_sleep5_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Default Timeout Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+  { "User Integer Timeout Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "User Integer Timeout Tests", "test_sleep2_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Integer Timeout Tests", "test_sleep5_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Integer Timeout Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+
+  { "User Double Timeout Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "User Double Timeout Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Double Timeout Tests", "test_sleep1_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#endif /* HAVE_LIBRT */
+  { "User Double Timeout Tests", "test_sleep2_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "User Double Timeout Tests", "test_sleep5_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "User Double Timeout Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+#if HAVE_DECL_SETENV
+  { "Environment Integer Timeout Scaling Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "Environment Integer Timeout Scaling Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Integer Timeout Scaling Tests", "test_sleep1_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+#endif /* HAVE_LIBRT */
+  { "Environment Integer Timeout Scaling Tests", "test_sleep2_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Integer Timeout Scaling Tests", "test_sleep5_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Integer Timeout Scaling Tests", "test_sleep9_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Integer Timeout Scaling Tests", "test_sleep14_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+
+  { "Environment Double Timeout Scaling Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "Environment Double Timeout Scaling Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Environment Double Timeout Scaling Tests", "test_sleep1_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#endif /* HAVE_LIBRT */
+  { "Environment Double Timeout Scaling Tests", "test_sleep2_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Environment Double Timeout Scaling Tests", "test_sleep5_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Environment Double Timeout Scaling Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Environment Double Timeout Scaling Tests", "test_sleep14_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+  { "Timeout Integer Scaling Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "Timeout Integer Scaling Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Timeout Integer Scaling Tests", "test_sleep1_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Timeout Integer Scaling Tests", "test_sleep2_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+#endif /* HAVE_LIBRT */
+  { "Timeout Integer Scaling Tests", "test_sleep5_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Timeout Integer Scaling Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+  { "Timeout Double Scaling Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "Timeout Double Scaling Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "Timeout Double Scaling Tests", "test_sleep1_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+#endif /* HAVE_LIBRT */
+  { "Timeout Double Scaling Tests", "test_sleep2_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Timeout Double Scaling Tests", "test_sleep5_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "Timeout Double Scaling Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+  { "User Integer Timeout Scaling Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "User Integer Timeout Scaling Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Integer Timeout Scaling Tests", "test_sleep1_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+#endif /* HAVE_LIBRT */
+  { "User Integer Timeout Scaling Tests", "test_sleep2_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Integer Timeout Scaling Tests", "test_sleep5_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Integer Timeout Scaling Tests", "test_sleep9_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Integer Timeout Scaling Tests", "test_sleep14_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  
+  { "User Double Timeout Scaling Tests", "test_eternal_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#ifdef HAVE_LIBRT
+  { "User Double Timeout Scaling Tests", "test_sleep0_025_pass", CK_PASS, CK_MSG_TEXT,   "Passed" },
+  { "User Double Timeout Scaling Tests", "test_sleep1_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#endif /* HAVE_LIBRT */
+  { "User Double Timeout Scaling Tests", "test_sleep2_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "User Double Timeout Scaling Tests", "test_sleep5_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "User Double Timeout Scaling Tests", "test_sleep9_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+  { "User Double Timeout Scaling Tests", "test_sleep14_fail", CK_ERROR, CK_MSG_TEXT,  "Test timeout expired" },
+#endif /* HAVE_DECL_SETENV */
+#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+  { "Limit Tests", "test_early_exit", CK_ERROR, CK_MSG_TEXT,   "Early exit with return value 1" },
+#endif /* HAVE_FORK */
+#if MEMORY_LEAKING_TESTS_ENABLED
+  { "Limit Tests", "test_null", CK_FAILURE, CK_MSG_TEXT, "Completed properly" },
+#endif /* MEMORY_LEAKING_TESTS_ENABLED */
+  { "Limit Tests", "test_null_2", CK_FAILURE, CK_MSG_TEXT, "Completed properly" },
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+  { "Msg and fork Tests", "test_fork1p_pass", CK_PASS, CK_MSG_TEXT,       "Passed" },
+  { "Msg and fork Tests", "test_fork1p_fail", CK_FAILURE, CK_MSG_TEXT,    "Expected fail" },
+  { "Msg and fork Tests", "test_fork1c_pass", CK_PASS, CK_MSG_TEXT,       "Passed" },
+  { "Msg and fork Tests", "test_fork1c_fail", CK_FAILURE, CK_MSG_TEXT,    "Expected fail" },
+  { "Msg and fork Tests", "test_fork2_pass", CK_PASS, CK_MSG_TEXT,       "Passed" },
+  { "Msg and fork Tests", "test_fork2_fail", CK_FAILURE, CK_MSG_TEXT,    "Expected fail" },
+#endif  /* HAVE_FORK */
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+#if MEMORY_LEAKING_TESTS_ENABLED
+  { "Check Errors Tests", "test_invalid_set_fork_status", CK_FAILURE, CK_MSG_TEXT,    "Early exit with return value 2" },
+#endif
+  { "Check Ignore Exit Handlers", "test_ignore_exit_handlers", CK_FAILURE, CK_MSG_TEXT, "Failed" },
+#endif /* HAVE_FORK */
 
-  { "Limit Tests", CK_ERROR,   "Early exit with return value 1" },
-  { "Limit Tests", CK_FAILURE, "Completed properly" },
-  { "Limit Tests", CK_FAILURE, "Completed properly" },
-
-  { "Msg and fork Tests", CK_PASS,       "Passed" },
-  { "Msg and fork Tests", CK_FAILURE,    "Expected fail" },
-  { "Msg and fork Tests", CK_PASS,       "Passed" },
-  { "Msg and fork Tests", CK_FAILURE,    "Expected fail" },
-  { "Msg and fork Tests", CK_PASS,       "Passed" },
-  { "Msg and fork Tests", CK_FAILURE,    "Expected fail" },
-
-  { "Core", CK_PASS,    "Passed" },
-  { "Core", CK_FAILURE, "We failed" }
+  { "Core", "test_srunner", CK_PASS, CK_MSG_TEXT,    "Passed" },
+  { "Core", "test_2nd_suite", CK_FAILURE, CK_MSG_TEXT, "We failed" }
 };
 
 static int nr_of_master_tests = sizeof master_tests /sizeof master_tests[0];
 
-int master_tests_lineno[sizeof master_tests /sizeof master_tests[0]];
-
 START_TEST(test_check_nfailures)
 {
   int i;
@@ -123,7 +423,7 @@ START_TEST(test_check_nfailures)
       failed++;
     }
   }
-  fail_unless (sub_nfailed == failed,
+  ck_assert_msg (sub_nfailed == failed,
                "Unexpected number of failures received, %d, expected %d.",
                sub_nfailed, failed);
 }
@@ -131,36 +431,125 @@ END_TEST
 
 START_TEST(test_check_ntests_run)
 {
-  fail_unless (sub_ntests == nr_of_master_tests,
-               "Unexpected number of tests run, %d.", sub_ntests);
+  ck_assert_msg (sub_ntests == nr_of_master_tests,
+               "Unexpected number of tests run %d vs expected %d", sub_ntests, nr_of_master_tests);
 }
 END_TEST
 
+/**
+ * Given a string, return a new string that is a copy
+ * of the original exception that every occurance of
+ * % is replaced with %%. This escapes the %
+ * symbol for passing to printf.
+ *
+ * The passed in string is not modified. Note though
+ * that the returned string is allocated memory that
+ * must be freed by the caller.
+ */
+char * escape_percent(const char *original, size_t original_size);
+char * escape_percent(const char *original, size_t original_size)
+{
+  /* In the worst case every character is a %*/
+  char *result = (char*)malloc(original_size*2);
+
+  size_t read_index;
+  size_t write_index;
+  for(read_index = write_index = 0; read_index < original_size; read_index++, write_index++)
+  {
+    result[write_index] = original[read_index];
+    if(result[write_index] == '%')
+    {
+      /* Place a duplicate % next to the one just read, to escape it */
+      result[++write_index] = '%';
+    }
+  }
+
+  return result;
+}
+
 START_TEST(test_check_failure_msgs)
 {
   int i;
   int passed = 0;
   const char *got_msg;
   const char *expected_msg;
+  unsigned char not_equal = 0;
+  char emsg[MAXSTR];
+  const char *msg_type_str;
+  char *emsg_escaped;
+  int reg_err;
+  char err_text[256];
   TestResult *tr;
+#if ENABLE_REGEX
+  regex_t re;
+#endif
 
   for (i = 0; i < sub_ntests; i++) {
-    if (master_tests[i].failure_type == CK_PASS) {
+    master_test_t *master_test = &master_tests[i];
+
+    if (master_test->failure_type == CK_PASS) {
       passed++;
       continue;
     }
 
-    fail_if(i - passed > sub_nfailed, NULL);
+    ck_assert_msg(i - passed <= sub_nfailed, NULL);
     tr = tr_fail_array[i - passed];
-    fail_unless(tr != NULL, NULL);
+    ck_assert_msg(tr != NULL, NULL);
     got_msg = tr_msg(tr);
-    expected_msg = master_tests[i].msg;
-    if (strcmp(got_msg, expected_msg) != 0) {      
-      char *emsg = malloc(MAXSTR);
-      snprintf(emsg, MAXSTR,"For test %d: Expected %s, got %s",
-               i, expected_msg, got_msg);
-      fail(emsg);
-      free(emsg);
+    expected_msg = master_test->msg;
+
+    switch (master_test->msg_type) {
+    case CK_MSG_TEXT:
+      if (strcmp(got_msg, expected_msg) != 0) {
+        not_equal = 1;
+      }
+      break;
+#if ENABLE_REGEX
+    case CK_MSG_REGEXP: {
+      reg_err = regcomp(&re, expected_msg, REG_EXTENDED | REG_NOSUB);
+      if (reg_err) {        
+        regerror(reg_err, &re, err_text, sizeof(err_text));
+        ck_assert_msg(reg_err == 0,
+                "For test %d:%s:%s Expected regexp '%s', but regcomp returned error '%s'",
+                i, master_test->tcname, master_test->test_name, expected_msg,
+                err_text);
+      }
+      reg_err = regexec(&re, got_msg, 0, NULL, 0);
+      regfree(&re);
+      if (reg_err) {
+        not_equal = 1;
+      }
+      break;
+    }
+#endif /* ENABLE_REGEX */
+    }
+    
+    if (not_equal) {      
+      switch(master_test->msg_type) {
+#if ENABLE_REGEX
+      case CK_MSG_REGEXP:
+        msg_type_str = " regexp";
+        break;
+#endif
+      default:
+        msg_type_str = "";
+      }
+
+      snprintf(emsg, MAXSTR - 1,"For test %d:%s:%s Expected%s '%s', got '%s'",
+               i, master_test->tcname, master_test->test_name, msg_type_str,
+               expected_msg, got_msg);
+      emsg[MAXSTR - 1] = '\0';
+
+      /*
+       * NOTE: ck_abort_msg() will take the passed string
+       * and feed it to printf. We need to escape any
+       * '%' found, else they will result in odd formatting
+       * in ck_abort_msg().
+       */
+      emsg_escaped = escape_percent(emsg, MAXSTR);
+
+      ck_abort_msg(emsg_escaped);
+      free(emsg_escaped);
     }
   }
 }
@@ -171,26 +560,41 @@ START_TEST(test_check_failure_lnos)
   int i;
   int line_no;
   int passed = 0;
+  int failed;
   TestResult *tr;
   
+  /* Create list of line numbers where failures occurred */
+  rewind(line_num_failures);
+
   for (i = 0; i < sub_ntests; i++) {
     if (master_tests[i].failure_type == CK_PASS) {
       passed++;
       continue;
     }
 
-    fail_if(i - passed > sub_nfailed, NULL);
-    tr = tr_fail_array[i - passed];
-    fail_unless(tr != NULL, NULL);
-    line_no = master_tests_lineno[i];
+    failed = i - passed;
+
+    ck_assert_msg(i - passed <= sub_nfailed, NULL);
+    tr = tr_fail_array[failed];
+    ck_assert_msg(tr != NULL, NULL);
+    line_no = get_next_failure_line_num(line_num_failures);
+
+    if(line_no == -1)
+    {
+      ck_abort_msg("Did not find the %dth failure line number for suite %s, msg %s",
+        (failed+1), tr_tcname(tr), tr_msg(tr));
+    }
+
     if (line_no > 0 && tr_lno(tr) != line_no) {
-      char *emsg = malloc(MAXSTR);
-      snprintf(emsg, MAXSTR, "For test %d: Expected lno %d, got %d",
-               i, line_no, tr_lno(tr));
-      fail(emsg);
-      free(emsg);
+      ck_abort_msg("For test %d (failure %d): Expected lno %d, got %d for suite %s, msg %s",
+               i, failed, line_no, tr_lno(tr), tr_tcname(tr), tr_msg(tr));
     }    
   }
+
+  /* At this point, there should be no remaining failures */
+  line_no = get_next_failure_line_num(line_num_failures);
+  ck_assert_msg(line_no == -1,
+    "No more failure line numbers expected, but found %d", line_no);
 }
 END_TEST
 
@@ -206,11 +610,12 @@ START_TEST(test_check_failure_ftypes)
       continue;
     }
 
-    fail_if(i - passed > sub_nfailed, NULL);
+    ck_assert_msg(i - passed <= sub_nfailed, NULL);
     tr = tr_fail_array[i - passed];
-    fail_unless(tr != NULL, NULL);
-    fail_unless(master_tests[i].failure_type == tr_rtype(tr),
-                "Failure type wrong for test %d", i);
+    ck_assert_msg(tr != NULL, NULL);
+    ck_assert_msg(master_tests[i].failure_type == tr_rtype(tr),
+                "Failure type wrong for test %d:%s:%s",
+                               i, master_tests[i].tcname, master_tests[i].test_name);
   }
 }
 END_TEST
@@ -220,10 +625,11 @@ START_TEST(test_check_failure_lfiles)
   int i;
   for (i = 0; i < sub_nfailed; i++) {
     TestResult *tr = tr_fail_array[i];
-    fail_unless(tr != NULL, NULL);
-    fail_unless(tr_lfile(tr) != NULL, "Bad file name for test %d", i);
-    fail_unless(strstr(tr_lfile(tr), "check_check_sub.c") != 0,
-                "Bad file name for test %d", i);
+    ck_assert_msg(tr != NULL, NULL);
+    ck_assert_msg(tr_lfile(tr) != NULL, "Bad file name for test %d", i);
+    ck_assert_msg(strstr(tr_lfile(tr), "check_check_sub.c") != 0,
+                "Bad file name for test %d:%s:%s",
+                               i, master_tests[i].tcname, master_tests[i].test_name);
   }
 }
 END_TEST
@@ -233,34 +639,117 @@ START_TEST(test_check_tcnames)
   const char *tcname;   
   tcname = tr_tcname(tr_all_array[_i]);
   if (strcmp(tcname, master_tests[_i].tcname) != 0) {
-    char *emsg = malloc (MAXSTR);
-    snprintf(emsg, MAXSTR,"Expected %s, got %s",
-             master_tests[_i].tcname, tcname);
-    fail(emsg);
-    free(emsg);
+    ck_abort_msg("Expected '%s', got '%s' for test %d:%s",
+         master_tests[_i].tcname, tcname,
+            _i, master_tests[_i].test_name);
   } 
 }
 END_TEST
 
+START_TEST(test_check_test_names)
+{
+  int i;
+  int line_no;
+  int passed = 0;
+  int failed;
+  TestResult *tr;
+
+  rewind(test_names_file);
+
+  for (i = 0; i < sub_ntests; i++)
+  {
+         char* test_name = get_next_test_name(test_names_file);
+
+         if(test_name == NULL || strcmp(master_tests[i].test_name, test_name) != 0)
+         {
+                 ck_abort_msg("Expected test name '%s' but found '%s' for test %d:%s",
+                                 master_tests[i].test_name,
+                                 (test_name == NULL ? "(null)" : test_name),
+                                 i, master_tests[i].tcname);
+         }
+
+         free(test_name);
+  }
+}
+END_TEST
 
 START_TEST(test_check_all_msgs)
 {
-  const char *msg;
-  msg = tr_msg(tr_all_array[_i]);
-  if (strcmp(msg, master_tests[_i].msg) != 0) {
-    char *emsg = malloc (MAXSTR);
-    snprintf(emsg, MAXSTR,"Expected %s, got %s",
-             master_tests[_i].msg, msg);
-    fail(emsg);
-    free(emsg);
+  const char *got_msg = tr_msg(tr_all_array[_i]);
+  master_test_t *master_test = &master_tests[_i];
+  const char *expected_msg = master_test->msg;
+  char emsg[MAXSTR];
+  const char *msg_type_str;
+  char err_text[256];
+  int reg_err;
+  unsigned char not_equal = 0;
+  char *emsg_escaped;
+#if ENABLE_REGEX
+  regex_t re;
+#endif
+
+  switch (master_test->msg_type) {
+  case CK_MSG_TEXT:
+    if (strcmp(got_msg, expected_msg) != 0) {
+      not_equal = 1;
+    }
+    break;
+#if ENABLE_REGEX
+  case CK_MSG_REGEXP: {
+    reg_err = regcomp(&re, expected_msg, REG_EXTENDED | REG_NOSUB);
+    if (reg_err) {      
+      regerror(reg_err, &re, err_text, sizeof(err_text));
+      ck_assert_msg(reg_err == 0,
+                "For test %d:%s:%s Expected regexp '%s', but regcomp returned error '%s'",
+                _i, master_test->tcname, master_test->test_name, expected_msg,
+                err_text);
+    }
+    reg_err = regexec(&re, got_msg, 0, NULL, 0);
+    regfree(&re);
+    if (reg_err) {
+      not_equal = 1;
+    }
+    break;
+  }
+#endif /* ENABLE_REGEX */
+  }
+
+  if (not_equal) {    
+    switch(master_test->msg_type) {
+#if ENABLE_REGEX
+    case CK_MSG_REGEXP:
+      msg_type_str = " regexp";
+      break;
+#endif
+    default:
+      msg_type_str = "";
+    }
+
+    snprintf(emsg, MAXSTR - 1, "For test %i:%s:%s expected%s '%s', got '%s'",
+             _i, master_test->tcname, master_test->test_name, msg_type_str,
+             expected_msg, got_msg);
+    emsg[MAXSTR - 1] = '\0';
+
+   /*
+    * NOTE: ck_abort_msg() will take the passed string
+    * and feed it to printf. We need to escape any
+    * '%' found, else they will result in odd formatting
+    * in ck_abort_msg().
+    */
+    emsg_escaped = escape_percent(emsg, MAXSTR);
+
+    ck_abort_msg(emsg_escaped);
+    free(emsg_escaped);
   }
 }
 END_TEST  
 
 START_TEST(test_check_all_ftypes)
 {
-  fail_unless(master_tests[_i].failure_type == tr_rtype(tr_all_array[_i]),
-              "Failure type wrong for test %d", _i);
+  ck_assert_msg(master_tests[_i].failure_type == tr_rtype(tr_all_array[_i]),
+              "For test %d:%s:%s failure type wrong, expected %d but got %d",
+                         _i, master_tests[_i].tcname, master_tests[_i].test_name,
+                         master_tests[_i].failure_type, tr_rtype(tr_all_array[_i]));
 }
 END_TEST
 
@@ -272,7 +761,7 @@ static void test_fixture_setup(void)
 
 START_TEST(test_setup)
 {
-  fail_unless (test_fixture_val == 1,
+  ck_assert_msg (test_fixture_val == 1,
               "Value not setup or changed across tests correctly");
   test_fixture_val = 2;
 }
@@ -285,7 +774,7 @@ static void test_fixture_teardown (void)
 
 START_TEST(test_teardown)
 {
-  fail_unless (test_fixture_val == 3,
+  ck_assert_msg (test_fixture_val == 3,
               "Value not changed correctly in teardown");
 }
 END_TEST  
@@ -308,6 +797,7 @@ Suite *make_master_suite (void)
   tcase_add_test (tc_core, test_check_failure_ftypes);
   tcase_add_test (tc_core, test_check_failure_lnos);
   tcase_add_test (tc_core, test_check_failure_lfiles);
+  tcase_add_test (tc_core, test_check_test_names);
   tcase_add_loop_test (tc_core, test_check_tcnames, 0, sub_ntests);
   tcase_add_loop_test (tc_core, test_check_all_msgs, 0, sub_ntests);
   tcase_add_loop_test (tc_core, test_check_all_ftypes, 0, nr_of_master_tests);
@@ -317,8 +807,11 @@ Suite *make_master_suite (void)
      preservation of fixture values across tests, regardless
      of the order in which tests are added to the test case */
   tcase_add_test (tc_fixture, test_setup);
+#if defined(HAVE_FORK) && HAVE_FORK==1
+  /* The remaining test runs only work if fork() is available. */
   tcase_add_test (tc_fixture, test_setup);
   tcase_add_test (tc_fixture, test_setup);
+#endif /* HAVE_FORK */
   suite_add_tcase (s, tc_fixture);
   tc_post_teardown = tcase_create ("Fixture Teardown Tests");
   tcase_add_test (tc_post_teardown, test_teardown);
@@ -347,10 +840,26 @@ void setup (void)
   Suite *s = make_sub_suite();
   SRunner *sr = srunner_create(s);
 
-  init_master_tests_lineno();
   init_signal_strings();
 
+  /*
+   * Create files that will contain the test names and line numbers of the failures
+   * in check_check_sub.c, as they occur.
+   */
+#if !HAVE_MKSTEMP
+  test_names_file_name = tempnam(NULL, "check_test_names_");
+  test_names_file = fopen(test_names_file_name, "w+b");
+  line_num_failures_file_name = tempnam(NULL, "check_error_linenums_");
+  line_num_failures = fopen(line_num_failures_file_name, "w+b");
+#else
+  test_names_file_name = strdup("check_test_names__XXXXXX");
+  test_names_file = fdopen(mkstemp(test_names_file_name), "w+b");
+  line_num_failures_file_name = strdup("check_error_linenums_XXXXXX");
+  line_num_failures = fdopen(mkstemp(line_num_failures_file_name), "w+b");
+#endif
+
   srunner_add_suite(sr, make_sub2_suite());
+
   srunner_run_all(sr, CK_VERBOSE);
   tr_fail_array = srunner_failures(sr);
   tr_all_array = srunner_results(sr);
@@ -360,4 +869,145 @@ void setup (void)
 
 void cleanup (void)
 {
+  fclose(line_num_failures);
+  line_num_failures = NULL;
+  unlink(line_num_failures_file_name);
+  free(line_num_failures_file_name);
+  line_num_failures_file_name = NULL;
+
+  fclose(test_names_file);
+  test_names_file = NULL;
+  unlink(test_names_file_name);
+  free(test_names_file_name);
+  test_names_file_name = NULL;
+}
+
+void record_test_name(const char* test_name)
+{
+  int result;
+
+  if(test_names_file == NULL)
+  {
+    /*
+     * The file may not be setup. This may be because some of the tests
+     * are being reused outside of the master suite. This is OK.
+     * If the master suite runs and does not find test names it will
+     * fail as expected.
+     */
+     fprintf(stderr, "Test name file not setup, not reporting test failure");
+     return;
+  }
+
+  fprintf(test_names_file, "%s\n", test_name);
+
+  result = fflush(test_names_file);
+  if(result != 0)
+  {
+    fprintf(stderr, "%s:%d: Error in call to fflush", __FILE__, __LINE__);
+    exit(1);
+  }
+}
+
+char* get_next_test_name(FILE * file)
+{
+  char * line = NULL;
+  size_t length;
+  ssize_t written;
+
+  written = getline(&line, &length, file);
+  /**
+   * getline() will leave a \n at the end of the line,
+   * remove it if it is present.
+   */
+  if(written > 0 && line[written-1] == '\n')
+  {
+         line[written-1] = '\0';
+  }
+
+  return line;
+}
+
+void record_failure_line_num(int linenum)
+{
+  int to_write;
+  ssize_t written;
+  int result;
+  char string[16];
+
+  /*
+   * Because this call will occur right before a failure,
+   * add +1 so the linenum will be that of the failure
+   */
+   linenum += 1;
+
+  to_write = snprintf(string, sizeof(string), "%d\n", linenum);
+  if(to_write <= 0)
+  {
+    fprintf(stderr, "%s:%d: Error in call to snprintf:", __FILE__, __LINE__);
+    exit(1);
+  }
+
+  if(line_num_failures == NULL)
+  {
+    /*
+     * The file may not be setup. This may be because some of the tests
+     * are being reused outside of the master suite. This is OK.
+     * If the master suite runs and does not find line numbers it will
+     * fail as expected.
+     */
+     fprintf(stderr, "Line number file not setup, not reporting test failure     line: %s", string);
+     return;
+  }
+
+  written = fwrite(string, 1, to_write, line_num_failures);
+  if(written != to_write)
+  {
+    fprintf(stderr, "%s:%d: Error in call to fwrite, wrote %ld instead of %d:", __FILE__, __LINE__, written, to_write);
+    exit(1);
+  }
+
+  result = fflush(line_num_failures);
+  if(result != 0)
+  {
+    fprintf(stderr, "%s:%d: Error in call to fflush", __FILE__, __LINE__);
+    exit(1);
+  }
+}
+
+int get_next_failure_line_num(FILE * file)
+{
+  char * line = NULL;
+  char * end = NULL;
+  size_t length;
+  ssize_t written;
+  int value = -1;
+
+  written = getline(&line, &length, file);
+
+  if(written > 0)
+  {
+    /*
+     * getline() will leave the \n at the end of the parsed line, if
+     * it is found. Remove this before passing to strtol, so we
+     * may detect invalid characters by checking for \0 instead
+     */
+
+    if(line[written-1] == '\n')
+    {
+      line[written-1] = '\0';
+    }
+
+    value = strtol(line, &end, 10);
+
+    if(value <= 0 || *end != '\0')
+    {
+      fprintf(stderr, "%s:%d: Failed to convert next failure line number, found '%s'\n",
+        __FILE__, __LINE__, line);
+      exit(1);
+    }
+  }
+
+  free(line);
+
+  return value;
 }
index 9a96d6d..3a1f38a 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -7,6 +27,8 @@
 #include "check.h"
 #include "check_msg.h"
 #include "check_check.h"
+#include "check_list.h"
+#include "check_impl.h"
 
 START_TEST(test_send)
 {
@@ -21,15 +43,15 @@ START_TEST(test_send)
   tr = receive_test_result(0);
   teardown_messaging();
 
-  fail_unless (tr != NULL,
+  ck_assert_msg (tr != NULL,
               "No test result received");
-  fail_unless (tr_ctx(tr) == CK_CTX_TEST,
+  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEST,
               "Bad CTX received");
-  fail_unless (strcmp(tr_msg(tr), "Oops") == 0,
+  ck_assert_msg (strcmp(tr_msg(tr), "Oops") == 0,
               "Bad failure msg received");
-  fail_unless (strcmp(tr_lfile(tr), "abc125.c") == 0,
+  ck_assert_msg (strcmp(tr_lfile(tr), "abc125.c") == 0,
               "Bad loc file received");
-  fail_unless (tr_lno(tr) == 25,
+  ck_assert_msg (tr_lno(tr) == 25,
               "Bad loc line received");
   if (tr != NULL)
     free(tr);
@@ -52,16 +74,16 @@ START_TEST(test_send_big)
   tr = receive_test_result(0);
   teardown_messaging();
 
-  fail_unless (tr != NULL,
+  ck_assert_msg (tr != NULL,
               "No test result received");
-  fail_unless (tr_ctx(tr) == CK_CTX_TEST,
+  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEST,
               "Bad CTX received");
-  fail_unless (strcmp(tr_lfile(tr), "abc124.c") == 0,
+  ck_assert_msg (strcmp(tr_lfile(tr), "abc124.c") == 0,
               "Bad loc file received");
-  fail_unless (tr_lno(tr) == i -1,
+  ck_assert_msg (tr_lno(tr) == i -1,
               "Bad loc line received");
   if (tr != NULL)
-    free(tr);
+    tr_free(tr);
 }
 END_TEST
 
@@ -78,16 +100,16 @@ START_TEST(test_send_test_error)
   tr = receive_test_result(1);
   teardown_messaging();
 
-  fail_unless (tr != NULL,
+  ck_assert_msg (tr != NULL,
               "No test result received");
-  fail_unless (tr_ctx(tr) == CK_CTX_TEST,
+  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEST,
               "Bad CTX received");
-  fail_unless (strcmp(tr_lfile(tr), "abc125.c") == 0,
+  ck_assert_msg (strcmp(tr_lfile(tr), "abc125.c") == 0,
               "Bad loc file received");
-  fail_unless (tr_lno(tr) == 25,
+  ck_assert_msg (tr_lno(tr) == 25,
               "Bad loc line received");
   if (tr != NULL)
-    free(tr);
+    tr_free(tr);
 }
 END_TEST
 
@@ -105,18 +127,18 @@ START_TEST(test_send_with_passing_teardown)
   tr = receive_test_result(0);
   teardown_messaging();
 
-  fail_unless (tr != NULL,
+  ck_assert_msg (tr != NULL,
               "No test result received");
-  fail_unless (tr_ctx(tr) == CK_CTX_TEST,
+  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEST,
               "Bad CTX received");
-  fail_unless (tr_msg(tr) == NULL,
+  ck_assert_msg (tr_msg(tr) == NULL,
               "Bad failure msg received");
-  fail_unless (strcmp(tr_lfile(tr), "abc125.c") == 0,
+  ck_assert_msg (strcmp(tr_lfile(tr), "abc125.c") == 0,
               "Bad loc file received");
-  fail_unless (tr_lno(tr) == 25,
+  ck_assert_msg (tr_lno(tr) == 25,
               "Bad loc line received");
   if (tr != NULL)
-    free(tr);
+    tr_free(tr);
 }
 END_TEST
 
@@ -134,18 +156,18 @@ START_TEST(test_send_with_error_teardown)
   tr = receive_test_result(1);
   teardown_messaging();
 
-  fail_unless (tr != NULL,
+  ck_assert_msg (tr != NULL,
               "No test result received");
-  fail_unless (tr_ctx(tr) == CK_CTX_TEARDOWN,
+  ck_assert_msg (tr_ctx(tr) == CK_CTX_TEARDOWN,
               "Bad CTX received");
-  fail_unless (tr_msg(tr) == NULL,
+  ck_assert_msg (tr_msg(tr) == NULL,
               "Bad failure msg received");
-  fail_unless (strcmp(tr_lfile(tr), "abc126.c") == 0,
+  ck_assert_msg (strcmp(tr_lfile(tr), "abc126.c") == 0,
               "Bad loc file received");
-  fail_unless (tr_lno(tr) == 54,
+  ck_assert_msg (tr_lno(tr) == 54,
               "Bad loc line received");
   if (tr != NULL)
-    free(tr);
+    tr_free(tr);
 }
 END_TEST
 
index 9197836..7da7e57 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -8,6 +28,7 @@
 #include "check_pack.h"
 #include "check_error.h"
 #include "check_check.h"
+#include "check_msg.h"
 
 static char errm[512];
 
@@ -18,17 +39,20 @@ START_TEST(test_pack_fmsg)
   char *buf;
   enum ck_msg_type type;
 
-  fmsg = emalloc (sizeof (FailMsg));
+  fmsg = (FailMsg *)emalloc (sizeof (FailMsg));
 
   fmsg->msg = (char *) "Hello, world!";
   pack (CK_MSG_FAIL, &buf, (CheckMsg *) fmsg);
 
-  fmsg->msg = (char *) "";
+  fmsg->msg = NULL;
   upack (buf, (CheckMsg *) fmsg, &type);
 
-  fail_unless (type == CK_MSG_FAIL,
+  ck_assert_msg (type == CK_MSG_FAIL,
               "Bad type unpacked for FailMsg");
 
+  ck_assert_msg (fmsg->msg != NULL,
+           "Unpacked string is NULL, should be Hello, World!");
+
   if (strcmp (fmsg->msg, "Hello, world!") != 0) {
     snprintf (errm, sizeof(errm),
              "Unpacked string is %s, should be Hello, World!",
@@ -48,7 +72,7 @@ START_TEST(test_pack_loc)
   char *buf;
   enum ck_msg_type type;
 
-  lmsg = emalloc (sizeof (LocMsg));
+  lmsg =(LocMsg *) emalloc (sizeof (LocMsg));
   lmsg->file = (char *) "abc123.c";
   lmsg->line = 125;
 
@@ -57,7 +81,7 @@ START_TEST(test_pack_loc)
   lmsg->line = 0;
   upack (buf, (CheckMsg *) lmsg, &type);
 
-  fail_unless (type == CK_MSG_LOC,
+  ck_assert_msg (type == CK_MSG_LOC,
               "Bad type unpacked for LocMsg");
 
   if (lmsg->line != 125) {
@@ -85,15 +109,14 @@ START_TEST(test_pack_ctx)
   CtxMsg cmsg;
   char *buf;
   enum ck_msg_type type;
-  int npk, nupk;
 
   cmsg.ctx = CK_CTX_SETUP;
-  npk = pack (CK_MSG_CTX, &buf, (CheckMsg *) &cmsg);
+  pack (CK_MSG_CTX, &buf, (CheckMsg *) &cmsg);
 
   cmsg.ctx = CK_CTX_TEARDOWN;
-  nupk = upack (buf, (CheckMsg *) &cmsg, &type);
+  upack (buf, (CheckMsg *) &cmsg, &type);
 
-  fail_unless (type == CK_MSG_CTX,
+  ck_assert_msg (type == CK_MSG_CTX,
               "Bad type unpacked for CtxMsg");
 
   if (cmsg.ctx != CK_CTX_SETUP) {
@@ -117,11 +140,10 @@ START_TEST(test_pack_len)
 
   cmsg.ctx = CK_CTX_TEST;
   n = pack (CK_MSG_CTX, &buf, (CheckMsg *) &cmsg);
-  fail_unless (n > 0, "Return val from pack not set correctly");
+  ck_assert_msg (n > 0, "Return val from pack not set correctly");
 
   /* Value below may change with different implementations of pack */
-  fail_unless (n == 8, "Return val from pack not correct");
-  n = 0;
+  ck_assert_msg (n == 8, "Return val from pack not correct");
   n = upack (buf, (CheckMsg *) &cmsg, &type);
   if (n != 8) {
     snprintf (errm, sizeof (errm), "%d bytes read from upack, should be 8", n);
@@ -132,13 +154,30 @@ START_TEST(test_pack_len)
 }
 END_TEST
 
+START_TEST(test_pack_abuse)
+{
+  char *buf;
+  CtxMsg cmsg;
+  enum ck_msg_type type;
+
+  /* Should report -1 (e.g. invalid) if no buffer is passed */
+  ck_assert_int_eq(pack(CK_MSG_CTX, NULL, (CheckMsg *) &cmsg), -1);
+
+  /* Should report 0 (e.g. nothing packed) if no message is passed */
+  ck_assert_int_eq(pack(CK_MSG_CTX, &buf, NULL), 0);
+
+  /* Should report -1 (e.g. invalid) if no buffer is passed */
+  ck_assert_int_eq(upack(NULL, (CheckMsg *) &cmsg, &type), -1);
+}
+END_TEST
+
 START_TEST(test_pack_ctx_limit)
 {
   CtxMsg cmsg;
   CtxMsg *cmsgp = NULL;
   char *buf;
 
-  cmsg.ctx = -1;
+  cmsg.ctx = (enum ck_result_ctx)-1;
   pack (CK_MSG_CTX, &buf, (CheckMsg *) &cmsg);
   pack (CK_MSG_CTX, &buf, (CheckMsg *) cmsgp);
 }
@@ -153,10 +192,12 @@ START_TEST(test_pack_fail_limit)
 
   fmsg.msg = (char *) "";
   pack (CK_MSG_FAIL, &buf, (CheckMsg *) &fmsg);
-  fmsg.msg = (char *) "abc";
+  fmsg.msg = NULL;
   upack (buf, (CheckMsg *) &fmsg, &type);
   free (buf);
-  fail_unless (strcmp (fmsg.msg, "") == 0, 
+  ck_assert_msg (fmsg.msg != NULL,
+               "Empty string not handled properly");
+  ck_assert_msg (strcmp (fmsg.msg, "") == 0,
                "Empty string not handled properly");
 
   free (fmsg.msg);
@@ -177,9 +218,11 @@ START_TEST(test_pack_loc_limit)
   lmsg.file = (char *) "";
   lmsg.line = 0;
   pack (CK_MSG_LOC, &buf, (CheckMsg *) &lmsg);
-  lmsg.file = (char *) "abc";
+  lmsg.file = NULL;
   upack (buf, (CheckMsg *) &lmsg, &type);
-  fail_unless (strcmp (lmsg.file, "") == 0,
+  ck_assert_msg (lmsg.file != NULL,
+              "Empty string not handled properly");
+  ck_assert_msg (strcmp (lmsg.file, "") == 0,
               "Empty string not handled properly");
   free (lmsg.file);
   lmsg.file = NULL;
@@ -190,127 +233,142 @@ START_TEST(test_pack_loc_limit)
 END_TEST
 
 /* the ppack probably means 'pipe' pack */
-#ifdef _POSIX_VERSION
+#if defined(HAVE_FORK) && HAVE_FORK==1
 START_TEST(test_ppack)
 {
-  int filedes[2];
+  FILE * result_file;
+  char * result_file_name = NULL;
   CtxMsg cmsg;
   LocMsg lmsg;
   FailMsg fmsg;
   RcvMsg *rmsg;
-
+  
   cmsg.ctx = CK_CTX_TEST;
   lmsg.file = (char *) "abc123.c";
   lmsg.line = 10;
   fmsg.msg = (char *) "oops";
-  pipe (filedes);
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  ppack (filedes[1], CK_MSG_LOC, (CheckMsg *) &lmsg);
-  ppack (filedes[1], CK_MSG_FAIL, (CheckMsg *) &fmsg);
-  close (filedes[1]);
-  rmsg = punpack (filedes[0]);
-
-  fail_unless (rmsg != NULL,
+  result_file = open_tmp_file(&result_file_name);
+  free(result_file_name);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  ppack (result_file, CK_MSG_LOC, (CheckMsg *) &lmsg);
+  ppack (result_file, CK_MSG_FAIL, (CheckMsg *) &fmsg);
+
+  rewind(result_file);
+  rmsg = punpack (result_file);
+
+  ck_assert_msg (rmsg != NULL,
               "Return value from ppack should always be malloc'ed");
-  fail_unless (rmsg->lastctx == CK_CTX_TEST,
+  ck_assert_msg (rmsg->lastctx == CK_CTX_TEST,
               "CTX not set correctly in ppack");
-  fail_unless (rmsg->fixture_line == -1,
+  ck_assert_msg (rmsg->fixture_line == -1,
               "Default fixture loc not correct");
-  fail_unless (rmsg->fixture_file == NULL,
+  ck_assert_msg (rmsg->fixture_file == NULL,
               "Default fixture loc not correct");
-  fail_unless (rmsg->test_line == 10,
+  ck_assert_msg (rmsg->test_line == 10,
               "Test line not received correctly");
-  fail_unless (strcmp(rmsg->test_file,"abc123.c") == 0,
+  ck_assert_msg (strcmp(rmsg->test_file,"abc123.c") == 0,
               "Test file not received correctly");
-  fail_unless (strcmp(rmsg->msg, "oops") == 0,
+  ck_assert_msg (strcmp(rmsg->msg, "oops") == 0,
               "Failure message not received correctly");
 
   free(rmsg);
+  fclose(result_file);
 }
 END_TEST
 
 START_TEST(test_ppack_noctx)
 {
-  int filedes[2];
+  FILE * result_file;
+  char * result_file_name = NULL;
   LocMsg lmsg;
   FailMsg fmsg;
   RcvMsg *rmsg;
-
+  
   lmsg.file = (char *) "abc123.c";
   lmsg.line = 10;
   fmsg.msg = (char *) "oops";
-  pipe (filedes);
-  ppack (filedes[1], CK_MSG_LOC, (CheckMsg *) &lmsg);
-  ppack (filedes[1], CK_MSG_FAIL, (CheckMsg *) &fmsg);
-  close (filedes[1]);
-  rmsg = punpack (filedes[0]);
+  result_file = open_tmp_file(&result_file_name);
+  free(result_file_name);
+  ppack (result_file, CK_MSG_LOC, (CheckMsg *) &lmsg);
+  ppack (result_file, CK_MSG_FAIL, (CheckMsg *) &fmsg);
+
+  rewind(result_file);
+  rmsg = punpack (result_file);
 
-  fail_unless (rmsg == NULL,
+  ck_assert_msg (rmsg == NULL,
               "Result should be NULL with no CTX");
 
   if (rmsg != NULL)
     free (rmsg);
+  fclose(result_file);
 }
 END_TEST
 
 START_TEST(test_ppack_onlyctx)
 {
-  int filedes[2];
+  FILE * result_file;
+  char * result_file_name = NULL;
   CtxMsg cmsg;
   RcvMsg *rmsg;
-
+  
   cmsg.ctx = CK_CTX_SETUP;
-  pipe (filedes);
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  close (filedes[1]);
-  rmsg = punpack (filedes[0]);
+  result_file = open_tmp_file(&result_file_name);
+  free(result_file_name);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  rewind(result_file);
+  rmsg = punpack (result_file);
 
-  fail_unless (rmsg->msg == NULL,
+  ck_assert_msg (rmsg != NULL && rmsg->msg == NULL,
               "Result message should be NULL with only CTX");
-  fail_unless (rmsg->fixture_line == -1,
+  ck_assert_msg (rmsg->fixture_line == -1,
               "Result loc line should be -1 with only CTX");
-  fail_unless (rmsg->test_line == -1,
+  ck_assert_msg (rmsg->test_line == -1,
               "Result loc line should be -1 with only CTX");
 
   if (rmsg != NULL)
     free (rmsg);
+  fclose(result_file);
 }
 END_TEST
 
 START_TEST(test_ppack_multictx)
 {
-  int filedes[2];
+  FILE * result_file;
+  char * result_file_name = NULL;
   CtxMsg cmsg;
   LocMsg lmsg;
   RcvMsg *rmsg;
-
+  
   cmsg.ctx = CK_CTX_SETUP;
   lmsg.line = 5;
   lmsg.file = (char *) "abc123.c";
-  pipe (filedes);
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  ppack (filedes[1], CK_MSG_LOC, (CheckMsg *) &lmsg);
+  result_file = open_tmp_file(&result_file_name);
+  free(result_file_name);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  ppack (result_file, CK_MSG_LOC, (CheckMsg *) &lmsg);
   cmsg.ctx = CK_CTX_TEST;
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  ppack (filedes[1], CK_MSG_LOC, (CheckMsg *) &lmsg);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  ppack (result_file, CK_MSG_LOC, (CheckMsg *) &lmsg);
   cmsg.ctx = CK_CTX_TEARDOWN;
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  close (filedes[1]);
-  rmsg = punpack (filedes[0]);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  rewind(result_file);
+  rmsg = punpack (result_file);
 
-  fail_unless (rmsg->test_line == 5,
+  ck_assert_msg (rmsg != NULL && rmsg->test_line == 5,
               "Test loc not being preserved on CTX change");
 
-  fail_unless (rmsg->fixture_line == -1,
+  ck_assert_msg (rmsg->fixture_line == -1,
               "Fixture not reset on CTX change");
-  if (rmsg != NULL)
-    free (rmsg);
+
+  free (rmsg);
+  fclose(result_file);
 }
 END_TEST
 
 START_TEST(test_ppack_nofail)
 {
-  int filedes[2];
+  FILE * result_file;
+  char * result_file_name = NULL;
   CtxMsg cmsg;
   LocMsg lmsg;
   RcvMsg *rmsg;
@@ -318,16 +376,18 @@ START_TEST(test_ppack_nofail)
   lmsg.file = (char *) "abc123.c";
   lmsg.line = 10;
   cmsg.ctx = CK_CTX_SETUP;
-  pipe (filedes);
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  ppack (filedes[1], CK_MSG_LOC, (CheckMsg *) &lmsg);
-  close (filedes[1]);
-  rmsg = punpack (filedes[0]);
-
-  fail_unless (rmsg->msg == NULL,
+  result_file = open_tmp_file(&result_file_name);
+  free(result_file_name);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  ppack (result_file, CK_MSG_LOC, (CheckMsg *) &lmsg);
+  rewind (result_file);
+  rmsg = punpack (result_file);
+
+  ck_assert_msg (rmsg != NULL && rmsg->msg == NULL,
               "Failure result should be NULL with no failure message");
-  if (rmsg != NULL)
-    free (rmsg);
+  
+  free (rmsg);
+  fclose(result_file);
 }
 END_TEST
 
@@ -335,44 +395,47 @@ END_TEST
 
 START_TEST(test_ppack_big)
 {
-  int filedes[2];
+  FILE * result_file;
+  char * result_file_name = NULL;
   CtxMsg cmsg;
   LocMsg lmsg;
   FailMsg fmsg;
   RcvMsg *rmsg;
 
   cmsg.ctx = CK_CTX_TEST;
-  lmsg.file = emalloc (BIG_MSG_LEN);
+  lmsg.file = (char *)emalloc (BIG_MSG_LEN);
   memset (lmsg.file,'a',BIG_MSG_LEN - 1);
   lmsg.file[BIG_MSG_LEN - 1] = '\0';
   lmsg.line = 10;
-  fmsg.msg = emalloc (BIG_MSG_LEN);
+  fmsg.msg = (char *)emalloc (BIG_MSG_LEN);
   memset (fmsg.msg, 'a', BIG_MSG_LEN - 1);
   fmsg.msg[BIG_MSG_LEN - 1] = '\0';
-  pipe (filedes);
-  ppack (filedes[1], CK_MSG_CTX, (CheckMsg *) &cmsg);
-  ppack (filedes[1], CK_MSG_LOC, (CheckMsg *) &lmsg);
-  ppack (filedes[1], CK_MSG_FAIL, (CheckMsg *) &fmsg);
-  close (filedes[1]);
-  rmsg = punpack (filedes[0]);
-
-  fail_unless (rmsg != NULL,
+  result_file = open_tmp_file(&result_file_name);
+  free(result_file_name);
+  ppack (result_file, CK_MSG_CTX, (CheckMsg *) &cmsg);
+  ppack (result_file, CK_MSG_LOC, (CheckMsg *) &lmsg);
+  ppack (result_file, CK_MSG_FAIL, (CheckMsg *) &fmsg);
+  rewind (result_file);
+  rmsg = punpack (result_file);
+
+  ck_assert_msg (rmsg != NULL,
               "Return value from ppack should always be malloc'ed");
-  fail_unless (rmsg->lastctx == CK_CTX_TEST,
+  ck_assert_msg (rmsg->lastctx == CK_CTX_TEST,
               "CTX not set correctly in ppack");
-  fail_unless (rmsg->test_line == 10,
+  ck_assert_msg (rmsg->test_line == 10,
               "Test line not received correctly");
-  fail_unless (strcmp (rmsg->test_file, lmsg.file) == 0,
+  ck_assert_msg (strcmp (rmsg->test_file, lmsg.file) == 0,
               "Test file not received correctly");
-  fail_unless (strcmp (rmsg->msg, fmsg.msg) == 0,
+  ck_assert_msg (strcmp (rmsg->msg, fmsg.msg) == 0,
               "Failure message not received correctly");
   
   free (rmsg);
   free (lmsg.file);
   free (fmsg.msg);
+  fclose(result_file);
 }
 END_TEST
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
 
 Suite *make_pack_suite(void)
 {
@@ -390,20 +453,21 @@ Suite *make_pack_suite(void)
   tcase_add_test (tc_core, test_pack_loc);
   tcase_add_test (tc_core, test_pack_ctx);
   tcase_add_test (tc_core, test_pack_len);
-#ifdef _POSIX_VERSION
+  tcase_add_test (tc_core, test_pack_abuse);
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test (tc_core, test_ppack);
   tcase_add_test (tc_core, test_ppack_noctx);
   tcase_add_test (tc_core, test_ppack_onlyctx);
   tcase_add_test (tc_core, test_ppack_multictx);
   tcase_add_test (tc_core, test_ppack_nofail);
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
   suite_add_tcase (s, tc_limit);
   tcase_add_test (tc_limit, test_pack_ctx_limit);
   tcase_add_test (tc_limit, test_pack_fail_limit);
   tcase_add_test (tc_limit, test_pack_loc_limit);
-#ifdef _POSIX_VERSION
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test (tc_limit, test_ppack_big);
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
 
   return s;
 }
diff --git a/tests/check_check_selective.c b/tests/check_check_selective.c
new file mode 100644 (file)
index 0000000..31d5083
--- /dev/null
@@ -0,0 +1,362 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "../lib/libcompat.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <check.h>
+#include "check_check.h"
+
+static SRunner *sr;
+static int test_tc11_executed;
+static int test_tc12_executed;
+static int test_tc21_executed;
+
+static void reset_executed (void)
+{
+  test_tc11_executed = 0;
+  test_tc12_executed = 0;
+  test_tc21_executed = 0;
+}
+
+START_TEST(test_tc11)
+{
+  test_tc11_executed = 1;
+}
+END_TEST
+
+START_TEST(test_tc12)
+{
+  test_tc12_executed = 1;
+}
+END_TEST
+
+START_TEST(test_tc21)
+{
+  test_tc21_executed = 1;
+}
+END_TEST
+
+static void selective_setup (void)
+{
+  Suite *s1, *s2;
+  TCase *tc11, *tc12, *tc21;
+
+  /*
+   * Create a test suite 'suite1' with two test cases 'tcase11' and
+   * 'tcase12' containing a single test each.
+   */
+  s1 = suite_create ("suite1");
+  tc11 = tcase_create ("tcase11");
+  tcase_add_test (tc11, test_tc11);
+  tc12 = tcase_create ("tcase12");
+  tcase_add_test (tc12, test_tc12);
+  suite_add_tcase (s1, tc11);
+  suite_add_tcase (s1, tc12);
+  
+  /* This line intentionally attempts to add an already
+   * added test case twice, to ensure it is not added
+   * again. If it was added again, when the test cases
+   * are freed a double-free failure will occur. */
+  suite_add_tcase (s1, tc12);
+
+  /*
+   * Create a test suite 'suite2' with one test case 'test21'
+   * containing two tests.
+   */
+  s2 = suite_create ("suite2");
+  tc21 = tcase_create ("tcase21");
+  tcase_add_test (tc21, test_tc21);
+  suite_add_tcase (s2, tc21);
+
+  sr = srunner_create (s1);
+  srunner_add_suite (sr, s2);
+  srunner_set_fork_status (sr, CK_NOFORK);
+}
+
+static void selective_teardown (void)
+{
+  srunner_free (sr);
+}
+
+
+START_TEST(test_srunner_run_run_all)
+{
+  /* This test exercises the srunner_run function for the case where
+     both sname and tcname are NULL.  That means to run all the test
+     cases in all the defined suites.  */
+  srunner_run (sr,
+               NULL, /* NULL tsuite name.  */
+               NULL, /* NULL tcase name.  */
+               CK_VERBOSE);
+
+  ck_assert_msg (srunner_ntests_run(sr) == 3,
+               "Not all tests were executed.");
+
+  reset_executed ();
+}
+END_TEST
+
+START_TEST(test_srunner_run_suite)
+{
+  /* This test makes the srunner_run function to run all the test
+     cases of a existing suite.  */
+  srunner_run (sr,
+               "suite1",
+               NULL,  /* NULL tcase name.  */
+               CK_VERBOSE);
+
+  ck_assert_msg (test_tc11_executed 
+               && test_tc12_executed
+               && !test_tc21_executed,
+               "Expected tests were not executed.");
+
+  reset_executed ();
+}
+END_TEST
+
+START_TEST(test_srunner_run_no_suite)
+{
+  /* This test makes the srunner_run function to run all the test
+     cases of a non-existing suite.  */
+  srunner_run (sr,
+               "non-existing-suite",
+               NULL, /* NULL tcase name. */
+               CK_VERBOSE);
+  
+  ck_assert_msg (!(test_tc11_executed
+           || test_tc12_executed
+           || test_tc21_executed),
+           "An unexpected test was executed.");
+
+  reset_executed ();
+}
+END_TEST
+
+START_TEST(test_srunner_run_tcase)
+{
+  /* This test makes the srunner_run function to run an specific
+     existing test case.  */
+  srunner_run (sr,
+               NULL,  /* NULL suite name.  */
+               "tcase12",
+               CK_VERBOSE);
+
+  ck_assert_msg (!test_tc11_executed
+               && test_tc12_executed
+               && !test_tc21_executed,
+               "Expected tests were not executed.");
+  
+  reset_executed ();
+}
+END_TEST
+
+START_TEST(test_srunner_no_tcase)
+{
+  /* This test makes the srunner_run function to run a non-existant
+     test case.  */
+  srunner_run (sr,
+               NULL,  /* NULL suite name.  */
+               "non-existant-test-case",
+               CK_VERBOSE);
+
+  ck_assert_msg (!(test_tc11_executed
+           || test_tc12_executed
+           || test_tc21_executed),
+           "An unexpected test was executed.");
+
+  reset_executed ();
+}
+END_TEST
+
+START_TEST(test_srunner_suite_tcase)
+{
+  /* This test makes the srunner_run function to run a specific test
+     case of a specific test suite.  */
+  srunner_run (sr,
+               "suite2",
+               "tcase21",
+               CK_VERBOSE);
+  
+  ck_assert_msg (!test_tc11_executed
+               && !test_tc12_executed
+               && test_tc21_executed,
+               "Expected tests were not executed.");
+
+  reset_executed ();
+}
+END_TEST
+
+START_TEST(test_srunner_suite_no_tcase)
+{
+  /* This test makes the srunner_run function to run a non existant
+     test case of a specific test suite.  */
+  srunner_run (sr,
+               "suite1",
+               "non-existant-test-case",
+               CK_VERBOSE);
+
+  ck_assert_msg (!(test_tc11_executed
+           || test_tc12_executed
+           || test_tc21_executed),
+           "An unexpected test was executed.");
+
+  reset_executed ();
+}
+END_TEST
+
+
+#if HAVE_DECL_SETENV
+START_TEST(test_srunner_run_suite_env)
+{
+  /* This test makes the srunner_run_all function to run all the test
+     cases of a existing suite.  */
+  setenv ("CK_RUN_SUITE", "suite1", 1);
+  srunner_run_all (sr, CK_VERBOSE);
+
+  ck_assert_msg (test_tc11_executed 
+               && test_tc12_executed
+               && !test_tc21_executed,
+               "Expected tests were not executed.");
+
+  reset_executed ();
+  unsetenv ("CK_RUN_SUITE");
+}
+END_TEST
+
+START_TEST(test_srunner_run_no_suite_env)
+{
+  /* This test makes the srunner_run_all function to run all the test
+     cases of a non-existing suite.  */
+  setenv ("CK_RUN_SUITE", "non-existing-suite", 1);
+  srunner_run_all (sr, CK_VERBOSE);
+  
+  ck_assert_msg (!(test_tc11_executed
+           || test_tc12_executed
+           || test_tc21_executed),
+           "An unexpected test was executed.");
+
+  reset_executed ();
+  unsetenv ("CK_RUN_SUITE");
+}
+END_TEST
+
+START_TEST(test_srunner_run_tcase_env)
+{
+  /* This test makes the srunner_run_all function to run an specific
+     existing test case.  */
+  setenv ("CK_RUN_CASE", "tcase12", 1);
+  srunner_run_all (sr, CK_VERBOSE);
+
+  ck_assert_msg (!test_tc11_executed
+               && test_tc12_executed
+               && !test_tc21_executed,
+               "Expected tests were not executed.");
+  
+  reset_executed ();
+  unsetenv ("CK_RUN_CASE");
+}
+END_TEST
+
+START_TEST(test_srunner_no_tcase_env)
+{
+  /* This test makes the srunner_run_all function to run a
+     non-existant test case.  */
+  setenv ("CK_RUN_CASE", "non-existant-test-case", 1);
+  srunner_run_all (sr, CK_VERBOSE);
+
+  ck_assert_msg (!(test_tc11_executed
+           || test_tc12_executed
+           || test_tc21_executed),
+           "An unexpected test was executed.");
+
+  reset_executed ();
+  unsetenv ("CK_RUN_CASE");
+}
+END_TEST
+
+START_TEST(test_srunner_suite_tcase_env)
+{
+  /* This test makes the srunner_run_all function to run a specific test
+     case of a specific test suite.  */
+  setenv ("CK_RUN_SUITE", "suite2", 1);
+  setenv ("CK_RUN_CASE", "tcase21", 1);
+  srunner_run_all (sr, CK_VERBOSE);
+  
+  ck_assert_msg (!test_tc11_executed
+               && !test_tc12_executed
+               && test_tc21_executed,
+               "Expected tests were not executed.");
+
+  reset_executed ();
+  unsetenv ("CK_RUN_SUITE");
+  unsetenv ("CK_RUN_CASE");
+}
+END_TEST
+
+START_TEST(test_srunner_suite_no_tcase_env)
+{
+  /* This test makes the srunner_run_all function to run a non
+     existant test case of a specific test suite.  */
+  setenv ("CK_RUN_SUITE", "suite1", 1);
+  setenv ("CK_RUN_CASE", "non-existant-test-case", 1);
+  srunner_run_all (sr, CK_VERBOSE);
+
+  ck_assert_msg (!(test_tc11_executed
+           || test_tc12_executed
+           || test_tc21_executed),
+           "An unexpected test was executed.");
+
+  reset_executed ();
+  unsetenv ("CK_RUN_SUITE");
+  unsetenv ("CK_RUN_CASE");
+}
+END_TEST
+#endif /* HAVE_DECL_SETENV */
+
+Suite *make_selective_suite (void)
+{
+  Suite *s = suite_create ("SelectiveTesting");
+  TCase *tc = tcase_create ("Core");
+
+  suite_add_tcase (s, tc);
+  tcase_add_test (tc, test_srunner_run_run_all);
+  tcase_add_test (tc, test_srunner_run_suite);
+  tcase_add_test (tc, test_srunner_run_no_suite);
+  tcase_add_test (tc, test_srunner_run_tcase);
+  tcase_add_test (tc, test_srunner_no_tcase);
+  tcase_add_test (tc, test_srunner_suite_tcase);
+  tcase_add_test (tc, test_srunner_suite_no_tcase);
+
+#if HAVE_DECL_SETENV
+  tcase_add_test (tc, test_srunner_run_suite_env);
+  tcase_add_test (tc, test_srunner_run_no_suite_env);
+  tcase_add_test (tc, test_srunner_run_tcase_env);
+  tcase_add_test (tc, test_srunner_no_tcase_env);
+  tcase_add_test (tc, test_srunner_suite_tcase_env);
+  tcase_add_test (tc, test_srunner_suite_no_tcase_env);
+#endif /* HAVE_DECL_SETENV */
+
+  tcase_add_unchecked_fixture (tc,
+                               selective_setup,
+                               selective_teardown);
+  return s;
+}
index 76e594a..a6f8f27 100644 (file)
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <check.h>
-#include "check_check.h"
+#include <sys/types.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <check.h>
+#include "check_check.h"
+
+
+START_TEST(test_lno)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_abort_msg("Failure expected");
+}
+END_TEST
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+START_TEST(test_mark_lno)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  mark_point();
+  exit(EXIT_FAILURE); /* should fail with mark_point above as line */
+}
+END_TEST
+#endif /* HAVE_FORK */
+
+START_TEST(test_pass)
+{
+  record_test_name(tcase_name());
+
+  ck_assert_msg(1 == 1, "This test should pass");
+  ck_assert_msg(9999, "This test should pass");
+}
+END_TEST
+
+START_TEST(test_fail_unless)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail_unless(1 == 2, "This test should fail");
+}
+END_TEST
+
+START_TEST(test_fail_if_pass)
+{
+  record_test_name(tcase_name());
+
+  fail_if(1 == 2, "This test should pass");
+  fail_if(0, "This test should pass");
+}
+END_TEST
+
+START_TEST(test_fail_if_fail)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail_if(1 == 1, "This test should fail");
+}
+END_TEST
+
+START_TEST(test_fail_null_msg)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail_unless(2 == 3, NULL);
+}
+END_TEST
+
+#if defined(__GNUC__)
+START_TEST(test_fail_no_msg)
+{
+  record_test_name(tcase_name());
+
+  /* taking out the NULL provokes an ISO C99 warning in GCC */
+  record_failure_line_num(__LINE__);
+  fail_unless(4 == 5, NULL);
+}
+END_TEST
+#endif /* __GNUC__ */
+START_TEST(test_fail_if_null_msg)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail_if(2 != 3, NULL);
+}
+END_TEST
+
+#if defined(__GNUC__)
+START_TEST(test_fail_if_no_msg)
+{
+  record_test_name(tcase_name());
+
+  /* taking out the NULL provokes an ISO C99 warning in GCC */
+  record_failure_line_num(__LINE__);
+  fail_if(4 != 5, NULL);
+}
+END_TEST
+#endif /* __GNUC__ */
+START_TEST(test_fail_vararg_msg_1)
+{
+  int x = 3;
+  int y = 4;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail_unless(x == y, "%d != %d", x, y);
+}
+END_TEST
+
+START_TEST(test_fail_vararg_msg_2)
+{
+  int x = 5;
+  int y = 6;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail_if(x != y, "%d != %d", x, y);
+}
+END_TEST
+
+START_TEST(test_fail_vararg_msg_3)
+{
+  int x = 7;
+  int y = 7;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  fail("%d == %d", x, y);
+}
+END_TEST
+
+#if defined(__GNUC__)
+START_TEST(test_fail_empty)
+{
+  record_test_name(tcase_name());
+
+  /* plain fail() doesn't compile with xlc in C mode because of `, ## __VA_ARGS__' problem */
+  /* on the other hand, taking out the NULL provokes an ISO C99 warning in GCC */
+  record_failure_line_num(__LINE__);
+  fail(NULL);
+}
+END_TEST
+#endif /* __GNUC__ */
+
+START_TEST(test_ck_abort)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_abort();
+}
+END_TEST
+
+START_TEST(test_ck_abort_msg)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_abort_msg("Failure expected");
+}
+END_TEST
+
+/* FIXME: perhaps passing NULL to ck_abort_msg should be an error. */
+START_TEST(test_ck_abort_msg_null)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_abort_msg(NULL);
+}
+END_TEST
+
+/* These ck_assert tests are all designed to fail on the last
+   assertion. */
+
+START_TEST(test_ck_assert)
+{
+  int x = 3;
+  int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert(1);
+  ck_assert(x == y);
+  y++;
+  ck_assert(x != y);
+  record_failure_line_num(__LINE__);
+  ck_assert(x == y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_null)
+{
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert(0);
+}
+END_TEST
+
+START_TEST(test_ck_assert_with_mod)
+{
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert(1%f == 1);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_eq)
+{
+  int x = 3;
+  int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_eq(x, y);
+  y++;
+  record_failure_line_num(__LINE__);
+  ck_assert_int_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_eq_with_mod)
+{
+  int d = 2;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_int_eq(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_ne)
+{
+  int x = 3;
+  int y = 2;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_ne(x, y);
+  y++;
+  record_failure_line_num(__LINE__);
+  ck_assert_int_ne(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_ne_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_int_ne(3%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_lt)
+{
+  int x = 2;
+  int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_lt(x, y);
+  record_failure_line_num(__LINE__);
+  ck_assert_int_lt(x, x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_lt_with_mod)
+{
+  int d = 2;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_int_lt(3%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_le)
+{
+  int x = 2;
+  int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_le(x, y);
+  ck_assert_int_le(x, x);
+  record_failure_line_num(__LINE__);
+  ck_assert_int_le(y, x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_le_with_mod)
+{
+  int d = 2;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_int_le(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_gt)
+{
+  int x = 2;
+  int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_gt(y, x);
+  record_failure_line_num(__LINE__);
+  ck_assert_int_gt(y, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_gt_with_mod)
+{
+  int d = 1;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_int_gt(3%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_ge)
+{
+  int x = 2;
+  int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_ge(y, x);
+  ck_assert_int_ge(y, x);
+  record_failure_line_num(__LINE__);
+  ck_assert_int_ge(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_ge_with_mod)
+{
+  int d = 1;
+  int f = 3;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_int_ge(3%d, 4%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_int_expr)
+{
+  int x = 1;
+  int y = 0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_int_eq(x, ++y);
+  ck_assert_int_eq(x, y);
+} END_TEST
+
+START_TEST(test_ck_assert_uint_eq)
+{
+  unsigned int x = 3;
+  unsigned int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_eq(x, y);
+  y++;
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_eq_with_mod)
+{
+  int d = 2;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_eq(3%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_ne)
+{
+  unsigned int x = 3;
+  unsigned int y = 2;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_ne(x, y);
+  y++;
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_ne(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_ne_with_mod)
+{
+  int d = 1;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_ne(1%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_lt)
+{
+  unsigned int x = 2;
+  unsigned int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_lt(x, y);
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_lt(x, x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_lt_with_mod)
+{
+  int d = 2;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_lt(3%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_le)
+{
+  unsigned int x = 2;
+  unsigned int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_le(x, y);
+  ck_assert_uint_le(x, x);
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_le(y, x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_le_with_mod)
+{
+  int d = 2;
+  int f = 1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_le(3%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_gt)
+{
+  unsigned int x = 2;
+  unsigned int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_gt(y, x);
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_gt(y, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_gt_with_mod)
+{
+  int d = 1;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_gt(1%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_ge)
+{
+  unsigned int x = 2;
+  unsigned int y = 3;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_ge(y, x);
+  ck_assert_uint_ge(y, x);
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_ge(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_ge_with_mod)
+{
+  int d = 1;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_uint_ge(1%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_uint_expr)
+{
+  unsigned int x = 1;
+  unsigned int y = 0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_uint_eq(x, ++y);
+  ck_assert_uint_eq(x, y);
+} END_TEST
+
+START_TEST(test_ck_assert_float_eq)
+{
+  float x = 1.1f;
+  float y = 1.1f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_eq(x, y);
+  y+=0.1f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_eq_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_eq(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ne)
+{
+  float x = 1.1f;
+  float y = 1.2f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_ne(x, y);
+  y = x;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ne(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ne_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ne(1%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_lt)
+{
+  float x = 2.0f;
+  float y = 2.5f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_lt(x, y);
+  y-=1.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_lt(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_lt_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_lt(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_le)
+{
+  float x = 2.0f;
+  float y = 2.5f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_le(x, y);
+  ck_assert_float_le(x, x);
+  y-=1.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_le(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_le_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_le(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_gt)
+{
+  float x = 2.5f;
+  float y = 2.0f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_gt(x, y);
+  y+=1.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_gt(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_gt_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_gt(2%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ge)
+{
+  float x = 2.5f;
+  float y = 2.0f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_ge(x, y);
+  ck_assert_float_ge(x, x);
+  y+=1.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ge(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ge_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ge(2%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_with_expr)
+{
+  float x[] = {NAN, 1.1f, 1.1f, 1.2f, 1.2f, NAN};
+  float y = 1.1f;
+  int i;
+
+  record_test_name(tcase_name());
+
+  i = 1;
+  ck_assert_float_eq(x[i++], y);
+  ck_assert_float_eq(x[i++], y);
+
+  i = 4;
+  ck_assert_float_ne(x[i--], y);
+  ck_assert_float_ne(x[i--], y);
+
+  y = 1.15f;
+
+  i = 1;
+  ck_assert_float_le(x[i++], y);
+  ck_assert_float_le(x[i++], y);
+
+  i = 1;
+  ck_assert_float_lt(x[i++], y);
+  ck_assert_float_lt(x[i++], y);
+
+  i = 4;
+  ck_assert_float_gt(x[i--], y);
+  ck_assert_float_gt(x[i--], y);
+
+  i = 4;
+  ck_assert_float_ge(x[i--], y);
+  ck_assert_float_ge(x[i--], y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_eq_tol)
+{
+  float x = 0.0001f;
+  float y = 0.0003f;
+  float t = 0.001f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_eq_tol(x, y, t);
+  ck_assert_float_eq_tol(x, x, t);
+  x*=10.0f;
+  y*=10.0f;
+  t*=10.0f;
+  ck_assert_float_eq_tol(x, y, t);
+  t/=10.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_eq_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_eq_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_eq_tol(3%d, 2%f, 2%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ne_tol)
+{
+  float x = 0.0001f;
+  float y = 0.0002f;
+  float t = 0.0001f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_ne_tol(x, y, t);
+  x*=10.0f;
+  y*=10.0f;
+  t*=10.0f;
+  ck_assert_float_ne_tol(x, y, t);
+  t*=10.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ne_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ne_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ne_tol(3%d, 3%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ge_tol)
+{
+  float x = 0.001f;
+  float y = 0.003f;
+  float t = 0.001f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_ge_tol(y, x, t);
+  ck_assert_float_ge_tol(x, x, t);
+  ck_assert_float_ge_tol(y, y, t);
+  x*=10.0f;
+  y*=10.0f;
+  t*=10.0f;
+  ck_assert_float_ge_tol(y, x, t);
+  ck_assert_float_ge_tol(x, x, t);
+  ck_assert_float_ge_tol(y, y, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ge_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_ge_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_ge_tol(2%d, 3%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_le_tol)
+{
+  float x = 0.001f;
+  float y = 0.003f;
+  float t = 0.001f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_le_tol(x, y, t);
+  ck_assert_float_le_tol(x, x, t);
+  ck_assert_float_le_tol(y, y, t);
+  x*=10.0f;
+  y*=10.0f;
+  t*=10.0f;
+  ck_assert_float_le_tol(x, y, t);
+  ck_assert_float_le_tol(x, x, t);
+  ck_assert_float_le_tol(y, y, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_float_le_tol(y, x, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_le_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_le_tol(3%d, 2%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_tol_with_expr)
+{
+  float x[] = {NAN, 1.1f, 1.1f, 1.2f, 1.2f, NAN};
+  float y = 1.1f;
+  float t = 0.01f;
+  int i;
+
+  record_test_name(tcase_name());
+
+  i = 1;
+  ck_assert_float_eq_tol(x[i++], y, t);
+  ck_assert_float_eq_tol(x[i++], y, t);
+
+  i = 4;
+  ck_assert_float_ne_tol(x[i--], y, t);
+  ck_assert_float_ne_tol(x[i--], y, t);
+
+  y = 1.15f;
+
+  i = 1;
+  ck_assert_float_le_tol(x[i++], y, t);
+  ck_assert_float_le_tol(x[i++], y, t);
+
+  i = 4;
+  ck_assert_float_ge_tol(x[i--], y, t);
+  ck_assert_float_ge_tol(x[i--], y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_finite)
+{
+  float x = 0.0001f;
+  float t = 1.0f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_finite(x);
+  // MS VS doesn't allow explicit division by zero
+  x = 1.0f / (1.0f - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_float_finite(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_finite_with_mod)
+{
+  int d = 2;
+  float t = 1.0f;
+  float x = 1.0f / (1.0f - t);
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_finite(x*(1%d));
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_infinite)
+{
+  float t = 1.0f;
+  float x = 1.0f / (1.0f - t);
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_infinite(x);
+  x = -1.0f / (1.0f - t);
+  ck_assert_float_infinite(x);
+  x = 0.0f;
+  record_failure_line_num(__LINE__);
+  ck_assert_float_infinite(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_infinite_with_mod)
+{
+  int d = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_infinite(2%d);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_nan)
+{
+  float t = 1.0f;
+  float x = 0.0f / (1.0f - t);
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_nan(x);
+  x = 1.0f / (1.0f - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_float_nan(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_nan_with_mod)
+{
+  int d = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_float_nan(2%d);
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_nonnan)
+{
+  float x = 0.0f;
+  float t = 1.0f;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_nonnan(x);
+#if ENABLE_REGEX
+  x = 0.0f / (1.0f - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_float_nonnan(x);
+#else
+  (void)t; /* unused */
+#endif
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_nonnan_with_mod)
+{
+  int s = 2;
+  float t = 1.0f;
+  float x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_nonnan(2%s);
+#if ENABLE_REGEX
+  x = 0.0f / (1.0f - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_float_nonnan((2%s)*x);
+#else
+  (void)x; /* unused */
+  (void)t; /* unused */
+#endif
+}
+END_TEST
+
+START_TEST(test_ck_assert_float_nan_and_inf_with_expr)
+{
+  float x[] = {0.0f, 0.0f, INFINITY, INFINITY, NAN, NAN, 0.0f, 0.0f, NAN};
+  int i = 0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_float_finite(x[i++]);
+  ck_assert_float_finite(x[i++]);
+  ck_assert_float_infinite(x[i++]);
+  ck_assert_float_infinite(x[i++]);
+  ck_assert_float_nan(x[i++]);
+  ck_assert_float_nan(x[i++]);
+  ck_assert_float_nonnan(x[i++]);
+  ck_assert_float_nonnan(x[i++]);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_eq)
+{
+  double x = 1.1;
+  double y = 1.1;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_eq(x, y);
+  y+=0.1;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_eq_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_eq(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_eq_with_promotion)
+{
+  float x = 0.1;
+  double y = x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_eq_with_conv)
+{
+  float x = 0.1;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_eq(x, 0.1);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ne)
+{
+  double x = 1.1;
+  double y = 1.2;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_ne(x, y);
+  y = x;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ne(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ne_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ne(1%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_lt)
+{
+  double x = 2.0;
+  double y = 2.5;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_lt(x, y);
+  y-=1;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_lt(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_lt_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_lt(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_le)
+{
+  double x = 2.0;
+  double y = 2.5;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_le(x, y);
+  ck_assert_double_le(x, x);
+  y-=1;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_le(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_le_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_le(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_gt)
+{
+  double x = 2.5;
+  double y = 2.0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_gt(x, y);
+  y+=1;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_gt(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_gt_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_gt(2%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ge)
+{
+  double x = 2.5;
+  double y = 2.0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_ge(x, y);
+  ck_assert_double_ge(x, x);
+  y+=1;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ge(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ge_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ge(2%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_with_expr)
+{
+  double x[] = {NAN, 1.1, 1.1, 1.2, 1.2, NAN};
+  double y = 1.1;
+  int i;
+
+  record_test_name(tcase_name());
+
+  i = 1;
+  ck_assert_double_eq(x[i++], y);
+  ck_assert_double_eq(x[i++], y);
+
+  i = 4;
+  ck_assert_double_ne(x[i--], y);
+  ck_assert_double_ne(x[i--], y);
+
+  y = 1.15;
+
+  i = 1;
+  ck_assert_double_le(x[i++], y);
+  ck_assert_double_le(x[i++], y);
+
+  i = 1;
+  ck_assert_double_lt(x[i++], y);
+  ck_assert_double_lt(x[i++], y);
+
+  i = 4;
+  ck_assert_double_gt(x[i--], y);
+  ck_assert_double_gt(x[i--], y);
+
+  i = 4;
+  ck_assert_double_ge(x[i--], y);
+  ck_assert_double_ge(x[i--], y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_eq_tol)
+{
+  double x = 0.0001;
+  double y = 0.0002;
+  double t = 0.001;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_eq_tol(x, y, t);
+  ck_assert_double_eq_tol(x, x, t);
+  x*=10;
+  y*=10;
+  t*=10;
+  ck_assert_double_eq_tol(x, y, t);
+  t/=10;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_eq_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_eq_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_eq_tol(3%d, 2%f, 2%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ne_tol)
+{
+  double x = 0.0001;
+  double y = 0.0002;
+  double t = 0.0001;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_ne_tol(x, y, t);
+  x*=10;
+  y*=10;
+  t*=10;
+  ck_assert_double_ne_tol(x, y, t);
+  t*=10;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ne_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ne_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ne_tol(3%d, 3%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ge_tol)
+{
+  double x = 0.001;
+  double y = 0.003;
+  double t = 0.001;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_ge_tol(y, x, t);
+  ck_assert_double_ge_tol(x, x, t);
+  ck_assert_double_ge_tol(y, y, t);
+  x*=10.0;
+  y*=10.0;
+  t*=10.0;
+  ck_assert_double_ge_tol(y, x, t);
+  ck_assert_double_ge_tol(x, x, t);
+  ck_assert_double_ge_tol(y, y, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ge_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_ge_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_ge_tol(2%d, 3%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_le_tol)
+{
+  double x = 0.001;
+  double y = 0.003;
+  double t = 0.001;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_le_tol(x, y, t);
+  ck_assert_double_le_tol(x, x, t);
+  ck_assert_double_le_tol(y, y, t);
+  x*=10.0;
+  y*=10.0;
+  t*=10.0;
+  ck_assert_double_le_tol(x, y, t);
+  ck_assert_double_le_tol(x, x, t);
+  ck_assert_double_le_tol(y, y, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_double_le_tol(y, x, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_le_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_le_tol(3%d, 2%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_tol_with_expr)
+{
+  double x[] = {NAN, 1.1, 1.1, 1.2, 1.2, NAN};
+  double y = 1.1;
+  double t = 0.01;
+  int i;
+
+  record_test_name(tcase_name());
+
+  i = 1;
+  ck_assert_double_eq_tol(x[i++], y, t);
+  ck_assert_double_eq_tol(x[i++], y, t);
+
+  i = 4;
+  ck_assert_double_ne_tol(x[i--], y, t);
+  ck_assert_double_ne_tol(x[i--], y, t);
+
+  y = 1.15;
+
+  i = 1;
+  ck_assert_double_le_tol(x[i++], y, t);
+  ck_assert_double_le_tol(x[i++], y, t);
+
+  i = 4;
+  ck_assert_double_ge_tol(x[i--], y, t);
+  ck_assert_double_ge_tol(x[i--], y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_finite)
+{
+  double x = 0.0001;
+  double t = 1;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_finite(x);
+  // MS VS doesn't allow explicit division by zero
+  x = 1.0 / (1.0 - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_double_finite(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_finite_with_mod)
+{
+  int d = 2;
+  double t = 1;
+  double x = 1.0 / (1.0 - t);
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_finite(x*(1%d));
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_infinite)
+{
+  double t = 1;
+  double x = 1.0 / (1.0 - t);
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_infinite(x);
+  x = -1.0 / (1.0 - t);
+  ck_assert_double_infinite(x);
+  x = 0;
+  record_failure_line_num(__LINE__);
+  ck_assert_double_infinite(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_infinite_with_mod)
+{
+  int d = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_infinite(2%d);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_nan)
+{
+  double t = 1;
+  double x = 0.0 / (1.0 - t);
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_nan(x);
+  x = 1.0 / (1.0 - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_double_nan(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_nan_with_mod)
+{
+  int d = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_double_nan(2%d);
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_nonnan)
+{
+  double x = 0;
+  double t = 1;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_nonnan(x);
+#if ENABLE_REGEX
+  x = 0.0 / (1.0 - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_double_nonnan(x);
+#else
+  (void)t; /* unused */
+#endif
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_nonnan_with_mod)
+{
+  int s = 2;
+  double t = 1.0;
+  double x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_nonnan(2%s);
+#if ENABLE_REGEX
+  x = 0.0 / (1.0 - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_double_nonnan((2%s)*x);
+#else
+  (void)t; /* unused */
+  (void)x; /* unused */
+#endif
+}
+END_TEST
+
+START_TEST(test_ck_assert_double_nan_and_inf_with_expr)
+{
+  double x[] = {0.0, 0.0, INFINITY, INFINITY, NAN, NAN, 0.0, 0.0, NAN};
+  int i = 0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_double_finite(x[i++]);
+  ck_assert_double_finite(x[i++]);
+  ck_assert_double_infinite(x[i++]);
+  ck_assert_double_infinite(x[i++]);
+  ck_assert_double_nan(x[i++]);
+  ck_assert_double_nan(x[i++]);
+  ck_assert_double_nonnan(x[i++]);
+  ck_assert_double_nonnan(x[i++]);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_eq)
+{
+  long double x = 1.1l;
+  long double y = 1.1l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_eq(x, y);
+  y+=0.1l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_eq_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_eq(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_eq_with_promotion)
+{
+  float x = 1.1;
+  long double y = x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_eq(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_eq_with_conv)
+{
+  float x = 1.1;
+  long double y = x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_eq(x, y);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_eq(x, 1.1);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ne)
+{
+  long double x = 1.1l;
+  long double y = 1.2l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_ne(x, y);
+  y = x;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ne(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ne_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ne(1%d, 1%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_lt)
+{
+  long double x = 2.0l;
+  long double y = 2.5l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_lt(x, y);
+  y-=1.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_lt(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_lt_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_lt(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_le)
+{
+  long double x = 2.0l;
+  long double y = 2.5l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_le(x, y);
+  ck_assert_ldouble_le(x, x);
+  y-=1.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_le(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_le_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_le(3%d, 2%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_gt)
+{
+  long double x = 2.5l;
+  long double y = 2.0l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_gt(x, y);
+  y+=1.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_gt(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_gt_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_gt(2%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ge)
+{
+  long double x = 2.5l;
+  long double y = 2.0l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_ge(x, y);
+  ck_assert_ldouble_ge(x, x);
+  y+=1.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ge(x, y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ge_with_mod)
+{
+  int d = 2;
+  int f = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ge(2%d, 3%f);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_with_expr)
+{
+  long double x[] = {NAN, 1.1l, 1.1l, 1.2l, 1.2l, NAN};
+  long double y = 1.1l;
+  int i;
+
+  record_test_name(tcase_name());
+
+  i = 1;
+  ck_assert_ldouble_eq(x[i++], y);
+  ck_assert_ldouble_eq(x[i++], y);
+
+  i = 4;
+  ck_assert_ldouble_ne(x[i--], y);
+  ck_assert_ldouble_ne(x[i--], y);
+
+  y = 1.15l;
+
+  i = 1;
+  ck_assert_ldouble_le(x[i++], y);
+  ck_assert_ldouble_le(x[i++], y);
+
+  i = 1;
+  ck_assert_ldouble_lt(x[i++], y);
+  ck_assert_ldouble_lt(x[i++], y);
+
+  i = 4;
+  ck_assert_ldouble_gt(x[i--], y);
+  ck_assert_ldouble_gt(x[i--], y);
+
+  i = 4;
+  ck_assert_ldouble_ge(x[i--], y);
+  ck_assert_ldouble_ge(x[i--], y);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_eq_tol)
+{
+  long double x = 0.0001l;
+  long double y = 0.0002l;
+  long double t = 0.001l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_eq_tol(x, y, t);
+  ck_assert_ldouble_eq_tol(x, x, t);
+  x*=10.0l;
+  y*=10.0l;
+  t*=10.0l;
+  ck_assert_ldouble_eq_tol(x, y, t);
+  t/=10.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_eq_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_eq_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_eq_tol(3%d, 2%f, 2%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ne_tol)
+{
+  long double x = 0.0001l;
+  long double y = 0.0002l;
+  long double t = 0.0001l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_ne_tol(x, y, t);
+  x*=10.0l;
+  y*=10.0l;
+  t*=10.0l;
+  ck_assert_ldouble_ne_tol(x, y, t);
+  t*=10.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ne_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ne_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ne_tol(3%d, 3%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ge_tol)
+{
+  long double x = 0.001l;
+  long double y = 0.003l;
+  long double t = 0.001l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_ge_tol(y, x, t);
+  ck_assert_ldouble_ge_tol(x, x, t);
+  ck_assert_ldouble_ge_tol(y, y, t);
+  x*=10.0l;
+  y*=10.0l;
+  t*=10.0l;
+  ck_assert_ldouble_ge_tol(y, x, t);
+  ck_assert_ldouble_ge_tol(x, x, t);
+  ck_assert_ldouble_ge_tol(y, y, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ge_tol(x, y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_ge_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_ge_tol(2%d, 3%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_le_tol)
+{
+  long double x = 0.001l;
+  long double y = 0.003l;
+  long double t = 0.001l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_le_tol(x, y, t);
+  ck_assert_ldouble_le_tol(x, x, t);
+  ck_assert_ldouble_le_tol(y, y, t);
+  x*=10.0l;
+  y*=10.0l;
+  t*=10.0l;
+  ck_assert_ldouble_le_tol(x, y, t);
+  ck_assert_ldouble_le_tol(x, x, t);
+  ck_assert_ldouble_le_tol(y, y, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_le_tol(y, x, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_le_tol_with_mod)
+{
+  int d = 2;
+  int f = 2;
+  int p = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_le_tol(3%d, 2%f, 3%p);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_tol_with_expr)
+{
+  long double x[] = {NAN, 1.1l, 1.1l, 1.2l, 1.2l, NAN};
+  long double y = 1.1l;
+  long double t = 0.01l;
+  int i;
+
+  record_test_name(tcase_name());
+
+  i = 1;
+  ck_assert_ldouble_eq_tol(x[i++], y, t);
+  ck_assert_ldouble_eq_tol(x[i++], y, t);
+
+  i = 4;
+  ck_assert_ldouble_ne_tol(x[i--], y, t);
+  ck_assert_ldouble_ne_tol(x[i--], y, t);
+
+  y = 1.15l;
+
+  i = 1;
+  ck_assert_ldouble_le_tol(x[i++], y, t);
+  ck_assert_ldouble_le_tol(x[i++], y, t);
+
+  i = 4;
+  ck_assert_ldouble_ge_tol(x[i--], y, t);
+  ck_assert_ldouble_ge_tol(x[i--], y, t);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_finite)
+{
+  long double x = 0.0001l;
+  long double t = 1.0l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_finite(x);
+  // MS VS doesn't allow explicit division by zero
+  x = 1.0l / (1.0l - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_finite(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_finite_with_mod)
+{
+  int d = 2;
+  long double t = 1.0l;
+  long double x = 1.0l / (1.0l - t);
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_finite(x*(1%d));
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_infinite)
+{
+  long double t = 1.0l;
+  long double x = 1.0l / (1.0l - t);
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_infinite(x);
+  x = -1.0l / (1.0l - t);
+  ck_assert_ldouble_infinite(x);
+  x = 0.0l;
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_infinite(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_infinite_with_mod)
+{
+  int d = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_infinite(2%d);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_nan)
+{
+  long double t = 1.0l;
+  long double x = 0.0l / (1.0l - t);
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_nan(x);
+  x = 1.0l / (1.0l - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_nan(x);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_nan_with_mod)
+{
+  int d = 2;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_nan(2%d);
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_nonnan)
+{
+  long double x = 0.0l;
+  long double t = 1.0l;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_nonnan(x);
+#if ENABLE_REGEX
+  x = 0.0l / (1.0l - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_nonnan(x);
+#else
+  (void)t; /* unused */
+#endif
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_nonnan_with_mod)
+{
+  int s = 2;
+  long double t = 1.0l;
+  long double x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_nonnan(2%s);
+#if ENABLE_REGEX
+  x = 0.0l / (1.0l - t);
+  record_failure_line_num(__LINE__);
+  ck_assert_ldouble_nonnan((2%s)*x);
+#else
+  (void)t; /* unused */
+  (void)x; /* unused */
+#endif
+}
+END_TEST
+
+START_TEST(test_ck_assert_ldouble_nan_and_inf_with_expr)
+{
+  long double x[] = {0.0l, 0.0l, INFINITY, INFINITY, NAN, NAN, 0.0l, 0.0l, NAN};
+  int i = 0;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ldouble_finite(x[i++]);
+  ck_assert_ldouble_finite(x[i++]);
+  ck_assert_ldouble_infinite(x[i++]);
+  ck_assert_ldouble_infinite(x[i++]);
+  ck_assert_ldouble_nan(x[i++]);
+  ck_assert_ldouble_nan(x[i++]);
+  ck_assert_ldouble_nonnan(x[i++]);
+  ck_assert_ldouble_nonnan(x[i++]);
+}
+END_TEST
+
+int returnsZero(const char* argument);
+int returnsZero(const char* argument)
+{
+    (void)argument;
+    return 0;
+}
+
+START_TEST(test_percent_n_escaped)
+{
+  record_test_name(tcase_name());
+
+  /* If the %n is not escaped in the ck macro, then this results in a SEGFAULT */
+  record_failure_line_num(__LINE__);
+  ck_assert_int_eq(returnsZero("%n"), 1);
+} END_TEST
+
+START_TEST(test_ck_assert_str_eq)
+{
+  const char *s = "test2";
+
+  record_test_name(tcase_name());
+
+  ck_assert_str_eq("test2", s);
+  record_failure_line_num(__LINE__);
+  ck_assert_str_eq("test1", s);
+}
+END_TEST
+
+START_TEST(test_ck_assert_str_eq_with_null)
+{
+  const char *s = NULL;
+  const char *t = NULL;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_str_eq(t, s);
+}
+END_TEST
+
+START_TEST(test_ck_assert_str_ne)
+{
+  const char *s = "test2";
+  const char *t = "test1";
+
+  record_test_name(tcase_name());
+
+  ck_assert_str_ne(t, s);
+  t = "test2";
+  record_failure_line_num(__LINE__);
+  ck_assert_str_ne(t, s);
+}
+END_TEST
+
+START_TEST(test_ck_assert_str_ne_with_null)
+{
+  const char *s = NULL;
+  const char *t = "test";
 
-#define _STR(Y) #Y
+  record_test_name(tcase_name());
 
+  record_failure_line_num(__LINE__);
+  ck_assert_str_ne(t, s);
+}
+END_TEST
 
-START_TEST(test_lno)
+START_TEST(test_ck_assert_str_lt)
 {
-  fail("Failure expected");
-  #define LINENO_lno _STR(__LINE__)
+  const char *s = "test1";
+  const char *t = "test2";
+
+  record_test_name(tcase_name());
+
+  ck_assert_str_lt(s, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_str_lt(s, s);
 }
 END_TEST
 
-START_TEST(test_mark_lno)
+START_TEST(test_ck_assert_str_lt_with_null)
 {
-  mark_point();
-  #define LINENO_mark_lno _STR(__LINE__)
-#ifdef _POSIX_VERSION
-  exit(EXIT_FAILURE); /* should fail with mark_point above as line */
-#endif /* _POSIX_VERSION */
+  const char *s = NULL;
+  const char *t = "test";
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_str_lt(s, t);
 }
+END_TEST
+
+START_TEST(test_ck_assert_str_le)
+{
+  const char *s = "test1";
+  const char *t = "test2";
 
+  record_test_name(tcase_name());
+
+  ck_assert_str_le(s, t);
+  ck_assert_str_le(s, s);
+  record_failure_line_num(__LINE__);
+  ck_assert_str_le(t, s);
+}
 END_TEST
-START_TEST(test_pass)
+
+START_TEST(test_ck_assert_str_le_with_null)
 {
-  fail_unless(1 == 1, "This test should pass");
-  fail_unless(9999, "This test should pass");
+  const char *s = NULL;
+  const char *t = NULL;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_str_le(t, s);
 }
 END_TEST
 
-/* FIXME: this should really be called test_fail_unless */
-START_TEST(test_fail)
+START_TEST(test_ck_assert_str_gt)
 {
-  fail_unless(1 == 2, "This test should fail");
+  const char *s = "test1";
+  const char *t = "test2";
+
+  record_test_name(tcase_name());
+
+  ck_assert_str_gt(t, s);
+  record_failure_line_num(__LINE__);
+  ck_assert_str_gt(t, t);
 }
 END_TEST
 
-START_TEST(test_fail_if_pass)
+START_TEST(test_ck_assert_str_gt_with_null)
 {
-  fail_if(1 == 2, "This test should pass");
-  fail_if(0, "This test should pass");
+  const char *s = NULL;
+  const char *t = "test";
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_str_gt(t, s);
 }
 END_TEST
 
-START_TEST(test_fail_if_fail)
+START_TEST(test_ck_assert_str_ge)
 {
-  fail_if(1 == 1, "This test should fail");
+  const char *s = "test1";
+  const char *t = "test2";
+
+  record_test_name(tcase_name());
+
+  ck_assert_str_ge(t, s);
+  ck_assert_str_ge(t, t);
+  record_failure_line_num(__LINE__);
+  ck_assert_str_ge(s, t);
 }
 END_TEST
 
-START_TEST(test_fail_null_msg)
+START_TEST(test_ck_assert_str_ge_with_null)
 {
-  fail_unless(2 == 3, NULL);
+  const char *s = NULL;
+  const char *t = NULL;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_str_ge(s, t);
 }
 END_TEST
 
-#if defined(__GNUC__)
-START_TEST(test_fail_no_msg)
-{ /* taking out the NULL provokes an ISO C99 warning in GCC */
-  fail_unless(4 == 5, NULL);
+START_TEST(test_ck_assert_str_expr)
+{
+  const char *s = "test1";
+  const char *t[] = { "test1", "test2" };
+  int i = -1;
+
+  record_test_name(tcase_name());
+
+  ck_assert_str_eq(s, t[++i]);
+  ck_assert_str_eq(s, t[i]);
 }
 END_TEST
-#endif /* __GNUC__ */
-START_TEST(test_fail_if_null_msg)
+
+START_TEST(test_ck_assert_pstr_eq)
 {
-  fail_if(2 != 3, NULL);
+  const char *s = "test";
+
+  record_test_name(tcase_name());
+
+  ck_assert_pstr_eq("test", s);
+  ck_assert_pstr_eq(NULL, NULL);
+  record_failure_line_num(__LINE__);
+  ck_assert_pstr_eq("test1", s);
 }
 END_TEST
 
-#if defined(__GNUC__)
-START_TEST(test_fail_if_no_msg)
-{ /* taking out the NULL provokes an ISO C99 warning in GCC */
-  fail_if(4 != 5, NULL);
+START_TEST(test_ck_assert_pstr_eq_with_null)
+{
+  const char *t = "test";
+  const char *s = NULL;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_pstr_eq(t, s);
 }
 END_TEST
-#endif /* __GNUC__ */
-START_TEST(test_fail_vararg_msg_1)
+
+START_TEST(test_ck_assert_pstr_ne)
 {
-  int x = 3;
-  int y = 4;
-  fail_unless(x == y, "%d != %d", x, y);
+  const char *t = "test1";
+  const char *s = "test2";
+
+  record_test_name(tcase_name());
+
+  ck_assert_pstr_ne(t, s);
+  ck_assert_pstr_ne(t, NULL);
+  t = "test2";
+  record_failure_line_num(__LINE__);
+  ck_assert_pstr_ne(t, s);
 }
 END_TEST
 
-START_TEST(test_fail_vararg_msg_2)
+START_TEST(test_ck_assert_pstr_ne_with_null)
 {
-  int x = 5;
-  int y = 6;
-  fail_if(x != y, "%d != %d", x, y);
+  const char *s = NULL;
+  const char *t = NULL;
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_pstr_ne(t, s);
 }
 END_TEST
 
-START_TEST(test_fail_vararg_msg_3)
+START_TEST(test_ck_assert_ptr_eq)
 {
-  int x = 7;
-  int y = 7;
-  fail("%d == %d", x, y);
+  int * x = (int*)0x1;
+  int * y = (int*)0x2;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ptr_eq(NULL, NULL);
+  ck_assert_ptr_eq(x,    x);
+  record_failure_line_num(__LINE__);
+  ck_assert_ptr_eq(x,    y);
 }
 END_TEST
 
-#if defined(__GNUC__)
-START_TEST(test_fail_empty)
-{ /* plain fail() doesn't compile with xlc in C mode because of `, ## __VA_ARGS__' problem */
-  /* on the other hand, taking out the NULL provokes an ISO C99 warning in GCC */
-  fail(NULL);
+START_TEST(test_ck_assert_ptr_ne)
+{
+  int * x = (int*)0x1;
+  int * y = (int*)0x2;
+  int * z = x;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ptr_ne(x,    y);
+  ck_assert_ptr_ne(x,    NULL);
+  ck_assert_ptr_ne(NULL, y);
+  record_failure_line_num(__LINE__);
+  ck_assert_ptr_ne(x,    z);
 }
 END_TEST
-#endif /* __GNUC__ */
 
-START_TEST(test_ck_abort)
+START_TEST(test_ck_assert_ptr_null)
 {
-  ck_abort();
-  #define LINENO_ck_abort _STR(__LINE__)
+  void* x = (void*)0x1;
+  void* y = NULL;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ptr_null(y);
+  record_failure_line_num(__LINE__);
+  ck_assert_ptr_null(x);
 }
 END_TEST
 
-START_TEST(test_ck_abort_msg)
+START_TEST(test_ck_assert_ptr_nonnull)
 {
-  ck_abort_msg("Failure expected");
-  #define LINENO_ck_abort_msg _STR(__LINE__)
+  void* x = NULL;
+  void* y = (void*)0x1;
+
+  record_test_name(tcase_name());
+
+  ck_assert_ptr_nonnull(y);
+  record_failure_line_num(__LINE__);
+  ck_assert_ptr_nonnull(x);
 }
 END_TEST
 
-/* FIXME: perhaps passing NULL to ck_abort_msg should be an error. */
-START_TEST(test_ck_abort_msg_null)
+START_TEST(test_ck_assert_mem_eq)
 {
-  ck_abort_msg(NULL);
-  #define LINENO_ck_abort_msg_null _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x02";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_eq("\x00\x00\x00\x00\x02", s, 5);
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_eq("\x00\x00\x00\x00\x01", s, 5);
 }
 END_TEST
 
-START_TEST(test_ck_assert)
+START_TEST(test_ck_assert_mem_ne)
 {
-  int x = 3;
-  int y = 3;
-  ck_assert(1);
-  ck_assert(x == y);
-  y++;
-  ck_assert(x != y);
-  ck_assert(x == y);
-  #define LINENO_ck_assert _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x02";
+  const char *t = "\x00\x00\x00\x00\x01";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_ne(t, s, 5);
+  t = "\x00\x00\x00\x00\x02";
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_ne(t, s, 5);
 }
 END_TEST
 
-START_TEST(test_ck_assert_null)
+START_TEST(test_ck_assert_mem_lt)
 {
-  ck_assert(0);
-  #define LINENO_ck_assert_null _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x01";
+  const char *t = "\x00\x00\x00\x00\x02";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_lt(s, t, 5);
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_lt(s, s, 5);
 }
 END_TEST
 
-START_TEST(test_ck_assert_int_eq)
+START_TEST(test_ck_assert_mem_le)
 {
-  int x = 3;
-  int y = 3;
-  ck_assert_int_eq(x, y);
-  y++;
-  ck_assert_int_eq(x, y);
-  #define LINENO_ck_assert_int_eq _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x01";
+  const char *t = "\x00\x00\x00\x00\x02";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_le(s, t, 5);
+  ck_assert_mem_le(s, s, 5);
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_le(t, s, 5);
 }
 END_TEST
 
-START_TEST(test_ck_assert_int_ne)
+START_TEST(test_ck_assert_mem_gt)
 {
-  int x = 3;
-  int y = 2;
-  ck_assert_int_ne(x, y);
-  y++;
-  ck_assert_int_ne(x, y);
-  #define LINENO_ck_assert_int_ne _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x01";
+  const char *t = "\x00\x00\x00\x00\x02";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_gt(t, s, 5);
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_gt(t, t, 5);
 }
 END_TEST
 
-START_TEST(test_ck_assert_str_eq)
+START_TEST(test_ck_assert_mem_ge)
 {
-  const char *s = "test2";
-  ck_assert_str_eq("test2", s);
-  ck_assert_str_eq("test1", s);
-  #define LINENO_ck_assert_str_eq _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x01";
+  const char *t = "\x00\x00\x00\x00\x02";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_ge(t, s, 5);
+  ck_assert_mem_ge(t, t, 5);
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_ge(s, t, 5);
 }
 END_TEST
 
-START_TEST(test_ck_assert_str_ne)
+START_TEST(test_ck_assert_mem_zerolen)
 {
-  const char *s = "test2";
-  const char *t = "test1";
-  ck_assert_str_ne(t, s);
-  t = "test2";
-  ck_assert_str_ne(t, s);
-  #define LINENO_ck_assert_str_ne _STR(__LINE__)
+  const char *s = "\x00\x00\x00\x00\x02";
+  const char *t = "\x00\x00\x00\x00\x01";
+
+  record_test_name(tcase_name());
+
+  ck_assert_mem_eq(t, s, 0);
 }
 END_TEST
 
-START_TEST(test_segv)
-  #define LINENO_segv _STR(__LINE__)
+START_TEST(test_ck_assert_mem_eq_exact)
+{
+  const char *s = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02";
+  const char *t = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01";
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_eq(t, s, 64);
+}
+END_TEST
+
+START_TEST(test_ck_assert_mem_eq_longer)
+{
+  const char *s = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02";
+  const char *t = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01";
+
+  record_test_name(tcase_name());
+
+  record_failure_line_num(__LINE__);
+  ck_assert_mem_eq(t, s, 65);
+}
+END_TEST
+
+#if defined(HAVE_FORK) && HAVE_FORK == 1
+START_TEST(test_segv_pass)
 {
+  record_test_name(tcase_name());
+  /*
+   * This test is to be used when it would otherwise not cause a
+   * failure. e.g., shen SIGSEGV is expected.
+   */
   raise (SIGSEGV);
 }
 END_TEST
 
+START_TEST(test_segv)
+{
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
+  raise (SIGSEGV);
+}
+END_TEST
 
+/* This test currently does not work on Cygwin, as it results in a
+ * SIGSEGV instead of a SIGFPE. However, a simple program that installs
+ * a SIGFPE handler then raise(SIGFPE) works as expected. Further
+ * investigation is necessary. */
+#if !defined(__CYGWIN__)
 START_TEST(test_fpe)
 {
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
   raise (SIGFPE);
 }
 END_TEST
+#endif /* !defined(__CYGWIN__) */
+
+/*
+ * This test is to be used when the test is expected to throw signal 8,
+ * but does not, resulting in a failure.
+ */
+START_TEST(test_non_signal_8)
+{
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
+  exit(0);
+}
+END_TEST
 
 /* TODO:
    unit test running the same suite in succession */
 
+/* This test currently does not work on Cygwin, as it results in a
+ * SIGSEGV instead of a SIGFPE. However, a simple program that installs
+ * a SIGFPE handler then raise(SIGFPE) works as expected. Further
+ * investigation is necessary. */
+#if !defined(__CYGWIN__)
 START_TEST(test_mark_point)
 {
   int i;
+  record_test_name(tcase_name());
   i = 0;
   i++;
   mark_point();
+  record_failure_line_num(__LINE__-2); /* -2 as the failure is listed as from mark_point() */
   raise(SIGFPE);
-  fail("Shouldn't reach here");
+  ck_abort_msg("Shouldn't reach here");
 }
 END_TEST
+#endif /* !defined(__CYGWIN__) */
 
-#if TIMEOUT_TESTS_ENABLED
-START_TEST(test_eternal)
-  #define LINENO_eternal _STR(__LINE__)
+#endif /* HAVE_FORK */
+
+#if TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) && HAVE_FORK == 1
+START_TEST(test_eternal_fail)
 {
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
   for (;;)
-    ;
+    sleep(1);
+}
+END_TEST
+
+/* 
+ * Only include sub-second timing tests on systems
+ * that support librt.
+ */
+#ifdef HAVE_LIBRT
+START_TEST(test_sleep0_025_pass)
+{
+  record_test_name(tcase_name());
+  usleep(25*1000);
+}
+END_TEST
+
+START_TEST(test_sleep1_pass)
+{
+  record_test_name(tcase_name());
+  sleep(1);
+}
+END_TEST
+
+START_TEST(test_sleep1_fail)
+{
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
+  sleep(1);
+}
+END_TEST
+#endif /* HAVE_LIBRT */
+
+START_TEST(test_sleep2_pass)
+{
+  record_test_name(tcase_name());
+  sleep(2);
 }
 END_TEST
 
-START_TEST(test_sleep2)
+START_TEST(test_sleep2_fail)
 {
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
   sleep(2);
 }
 END_TEST
 
-START_TEST(test_sleep5)
-  #define LINENO_sleep5 _STR(__LINE__)
+START_TEST(test_sleep5_pass)
 {
+  record_test_name(tcase_name());
   sleep(5);
 }
 END_TEST
 
-START_TEST(test_sleep9)
-  #define LINENO_sleep9 _STR(__LINE__)
+START_TEST(test_sleep5_fail)
 {
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
+  sleep(5);
+}
+END_TEST
+
+START_TEST(test_sleep9_pass)
+{
+  record_test_name(tcase_name());
+  sleep(9);
+}
+END_TEST
+
+START_TEST(test_sleep9_fail)
+{
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
   sleep(9);
 }
 END_TEST
 
-START_TEST(test_sleep14)
-  #define LINENO_sleep14 _STR(__LINE__)
+START_TEST(test_sleep14_fail)
 {
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
   sleep(14);
+  exit(3);
 }
 END_TEST
-#endif
+#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
 
+#if defined(HAVE_FORK) && HAVE_FORK==1
 START_TEST(test_early_exit)
 {
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__-4); /* -4 as the failure is reported at START_TEST() */
   exit(EXIT_FAILURE);
 }
 END_TEST
-
+#endif /* HAVE_FORK */
+
+/*
+ * The following test will leak memory because it is calling
+ * APIs inproperly. The leaked memory cannot be free'd, as
+ * the methods to do so are static. (No user of Check should
+ * call them directly).
+ */
+#if MEMORY_LEAKING_TESTS_ENABLED
 START_TEST(test_null)
 {  
   Suite *s;
   TCase *tc;
-  SRunner *sr;
   
+  record_test_name(tcase_name());
+
   s = suite_create(NULL);
   tc = tcase_create(NULL);
   suite_add_tcase (s, NULL);
   tcase_add_test (tc, NULL);
-  sr = srunner_create(NULL);
-  srunner_run_all (NULL, -1);
+  srunner_free(srunner_create(NULL));
+  srunner_run_all (NULL, (enum print_output)-1);
   srunner_free (NULL);
-  fail("Completed properly");
+  record_failure_line_num(__LINE__);
+  ck_abort_msg("Completed properly");
 }
 END_TEST
+#endif /* MEMORY_LEAKING_TESTS_ENABLED */
 
 START_TEST(test_null_2)
 {
   SRunner *sr = srunner_create(NULL);
+
+  record_test_name(tcase_name());
+
   srunner_run_all (sr, CK_NORMAL);
   srunner_free (sr);
-  fail("Completed properly");
+  ck_assert_int_eq(suite_tcase(NULL, NULL), 0);
+  record_failure_line_num(__LINE__);
+  ck_abort_msg("Completed properly");
 }
 END_TEST
 
-#ifdef _POSIX_VERSION
+#if defined(HAVE_FORK) && HAVE_FORK==1
 START_TEST(test_fork1p_pass)
 {
   pid_t pid;
 
+  record_test_name(tcase_name());
+
   if((pid = fork()) < 0) {
-    fail("Failed to fork new process");
+    ck_abort_msg("Failed to fork new process");
   } else if (pid > 0) {
-    fail_unless(1, NULL);
+    ck_assert_msg(1, NULL);
     kill(pid, SIGKILL);
   } else {
     for (;;) {
@@ -315,10 +2740,13 @@ START_TEST(test_fork1p_fail)
 {
   pid_t pid;
   
+  record_test_name(tcase_name());
+
   if((pid = fork()) < 0) {
-    fail("Failed to fork new process");
+    ck_abort_msg("Failed to fork new process");
   } else if (pid > 0) {
-    fail("Expected fail");
+    record_failure_line_num(__LINE__);
+    ck_abort_msg("Expected fail");
     kill(pid, SIGKILL);
   } else {
     for (;;) {
@@ -331,13 +2759,15 @@ END_TEST
 START_TEST(test_fork1c_pass)
 {
   pid_t pid;
+
+  record_test_name(tcase_name());
   
   if((pid = check_fork()) < 0) {
-    fail("Failed to fork new process");
+    ck_abort_msg("Failed to fork new process");
   } else if (pid > 0) {
     check_waitpid_and_exit(pid);
   } else {
-    fail_unless(1, NULL);
+    ck_assert_msg(1, NULL);
     check_waitpid_and_exit(0);
   }
 }
@@ -346,11 +2776,14 @@ END_TEST
 START_TEST(test_fork1c_fail)
 {
   pid_t pid;
+
+  record_test_name(tcase_name());
   
   if((pid = check_fork()) < 0) {
-    fail("Failed to fork new process");
+    ck_abort_msg("Failed to fork new process");
   } else if (pid == 0) {
-    fail("Expected fail");
+    record_failure_line_num(__LINE__);
+    ck_abort_msg("Expected fail");
     check_waitpid_and_exit(0);
   }
   check_waitpid_and_exit(pid);
@@ -362,13 +2795,15 @@ START_TEST(test_fork2_pass)
   pid_t pid;
   pid_t pid2;
   
+  record_test_name(tcase_name());
+
   if((pid = check_fork()) < 0) {
-    fail("Failed to fork new process");
+    ck_abort_msg("Failed to fork new process");
   } else if (pid > 0) {
     if((pid2 = check_fork()) < 0) {
-      fail("Failed to fork new process");
+      ck_abort_msg("Failed to fork new process");
     } else if (pid2 == 0) {
-      fail_unless(1, NULL);
+      ck_assert_msg(1, NULL);
       check_waitpid_and_exit(0);
     }
     check_waitpid_and_exit(pid2);
@@ -382,51 +2817,80 @@ START_TEST(test_fork2_fail)
   pid_t pid;
   pid_t pid2;
   
+  record_test_name(tcase_name());
+
   if((pid = check_fork()) < 0) {
-    fail("Failed to fork new process");
+    ck_abort_msg("Failed to fork new process");
   } else if (pid > 0) {
     if((pid2 = check_fork()) < 0) {
-      fail("Failed to fork new process");
+      ck_abort_msg("Failed to fork new process");
     } else if (pid2 == 0) {
-      fail("Expected fail");
+      record_failure_line_num(__LINE__);
+      ck_abort_msg("Expected fail");
       check_waitpid_and_exit(0);
     }
     check_waitpid_and_exit(pid2);
-    fail("Expected fail");
+    ck_abort_msg("Expected fail");
   }
   check_waitpid_and_exit(pid);
 }
 END_TEST
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
+
+#if defined(HAVE_FORK) && HAVE_FORK == 1
+#if MEMORY_LEAKING_TESTS_ENABLED
+START_TEST(test_invalid_set_fork_status)
+{
+   Suite *s1;
+   TCase *tc1;
+   SRunner *sr;
+
+   record_test_name(tcase_name());
+
+   record_failure_line_num(__LINE__-9); /* -9 as the failure is reported at START_TEST() */
+   s1 = suite_create ("suite1");
+   tc1 = tcase_create ("tcase1");
+   tcase_add_test (tc1, test_pass);
+   sr = srunner_create(s1);
+   srunner_set_fork_status (sr, (enum fork_status)-1);
+   srunner_run_all(sr, CK_SILENT);
+}
+END_TEST
+#endif /* MEMORY_LEAKING_TESTS_ENABLED */
+#endif /* HAVE_FORK */
 
 START_TEST(test_srunner)
 {
   Suite *s;
   SRunner *sr;
 
+  record_test_name(tcase_name());
+
   s = suite_create("Check Servant3");
-  fail_unless(s != NULL, NULL);
+  ck_assert_msg(s != NULL, NULL);
   sr = srunner_create(NULL);
-  fail_unless(sr != NULL, NULL);
+  ck_assert_msg(sr != NULL, NULL);
   srunner_add_suite(sr, s);
   srunner_free(sr);
 
   sr = srunner_create(NULL);
-  fail_unless(sr != NULL, NULL);
+  ck_assert_msg(sr != NULL, NULL);
   srunner_add_suite(sr, NULL);
   srunner_free(sr);
 
   s = suite_create("Check Servant3");
-  fail_unless(s != NULL, NULL);
+  ck_assert_msg(s != NULL, NULL);
   sr = srunner_create(s);
-  fail_unless(sr != NULL, NULL);
+  ck_assert_msg(sr != NULL, NULL);
   srunner_free(sr);
 }
 END_TEST
 
 START_TEST(test_2nd_suite)
 {
-  fail("We failed");
+  record_test_name(tcase_name());
+  record_failure_line_num(__LINE__);
+  ck_abort_msg("We failed");
 }
 END_TEST
 
@@ -441,172 +2905,144 @@ Suite *make_sub2_suite(void)
   return s;
 }
 
-void init_master_tests_lineno(void) {
-  const char * lineno[] = {
-/* Simple Tests */
-    LINENO_lno,
-    LINENO_mark_lno,
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    LINENO_ck_abort,
-    LINENO_ck_abort_msg,
-    LINENO_ck_abort_msg_null,
-    LINENO_ck_assert,
-    LINENO_ck_assert_null,
-    LINENO_ck_assert_int_eq,
-    LINENO_ck_assert_int_ne,
-    LINENO_ck_assert_str_eq,
-    LINENO_ck_assert_str_ne,
-
-/* Signal Tests */
-    "-1",
-    "-1",
-    LINENO_segv,
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-
-#if TIMEOUT_TESTS_ENABLED
-/* Timeout Tests */
-#if HAVE_WORKING_SETENV
-    LINENO_eternal,
-    "-1",
-    "-1",
-    LINENO_sleep9,
-#endif
-    LINENO_eternal,
-    "-1",
-    LINENO_sleep5,
-    LINENO_sleep9,
-    LINENO_eternal,
-    "-1",
-    "-1",
-    LINENO_sleep9,
-    LINENO_eternal,
-    "-1",
-    LINENO_sleep5,
-    LINENO_sleep9,
-#if HAVE_WORKING_SETENV
-    LINENO_eternal,
-    "-1",
-    "-1",
-    LINENO_sleep14,
-    LINENO_eternal,
-    "-1",
-    "-1",
-    LINENO_sleep9,
-    LINENO_eternal,
-    "-1",
-    "-1",
-    LINENO_sleep14,
-#endif
-#endif
+#if defined(HAVE_FORK) && HAVE_FORK == 1
+void exit_handler(void);
+void exit_handler ()
+{
+  /* This exit handler should never be executed */
+  while(1)
+  {
+    sleep(1);
+  }
+}
 
-/* Limit Tests */
-    "-1",
-    "-1",
-    "-1",
-
-/* Msg and fork Tests */
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-    "-1",
-
-/* Core */
-    "-1",
-    "-1"
-  };
-  int s = sizeof lineno /sizeof lineno[0];
-  int i;
+START_TEST(test_ignore_exit_handlers)
+{
+  int result;
 
-  for (i = 0; i < s; i++) {
-    master_tests_lineno[i] = atoi(lineno[i]) - 1;
+  record_test_name(tcase_name());
+
+  result = atexit(exit_handler);
+  if(result != 0)
+  {
+    ck_abort_msg("Failed to set an exit handler, test cannot proceed");
   }
+  record_failure_line_num(__LINE__);
+  ck_abort();
 }
+END_TEST
+#endif /* HAVE_FORK */
 
 Suite *make_sub_suite(void)
 {
   Suite *s;
 
   TCase *tc_simple;
+#if defined(HAVE_FORK) && HAVE_FORK==1
   TCase *tc_signal;
-#if TIMEOUT_TESTS_ENABLED
-#if HAVE_WORKING_SETENV
-  TCase *tc_timeout_env;
-#endif /* HAVE_WORKING_SETENV */
-  TCase *tc_timeout;
-  TCase *tc_timeout_usr;
-#if HAVE_WORKING_SETENV
-  TCase *tc_timeout_env_scale;
-  TCase *tc_timeout_scale;
-  TCase *tc_timeout_usr_scale;
-#endif /* HAVE_WORKING_SETENV */
 #endif
+#if TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) && HAVE_FORK == 1
+#if HAVE_DECL_SETENV
+  TCase *tc_timeout_env_int;
+  TCase *tc_timeout_env_double;
+#endif /* HAVE_DECL_SETENV */
+  TCase *tc_timeout_default;
+  TCase *tc_timeout_usr_int;
+  TCase *tc_timeout_usr_double;
+#if HAVE_DECL_SETENV
+  TCase *tc_timeout_env_scale_int;
+  TCase *tc_timeout_scale_int;
+  TCase *tc_timeout_usr_scale_int;
+  TCase *tc_timeout_env_scale_double;
+  TCase *tc_timeout_scale_double;
+  TCase *tc_timeout_usr_scale_double;
+#endif /* HAVE_DECL_SETENV */
+#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
   TCase *tc_limit;
+#if defined(HAVE_FORK) && HAVE_FORK==1
   TCase *tc_messaging_and_fork;
+  TCase *tc_errors;
+  TCase *tc_exit_handlers;
+#endif
 
   s = suite_create("Check Servant");
 
   tc_simple = tcase_create("Simple Tests");
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tc_signal = tcase_create("Signal Tests");
-#if TIMEOUT_TESTS_ENABLED
-#if HAVE_WORKING_SETENV
+#endif /* HAVE_FORK */
+#if TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) && HAVE_FORK == 1
+#if HAVE_DECL_SETENV
   setenv("CK_DEFAULT_TIMEOUT", "6", 1);
-  tc_timeout_env = tcase_create("Environment Timeout Tests");
+  tc_timeout_env_int = tcase_create("Environment Integer Timeout Tests");
   unsetenv("CK_DEFAULT_TIMEOUT");
-#endif /* HAVE_WORKING_SETENV */
-  tc_timeout = tcase_create("Timeout Tests");
-  tc_timeout_usr = tcase_create("User Timeout Tests");
-#if HAVE_WORKING_SETENV
+  setenv("CK_DEFAULT_TIMEOUT", "0.5", 1);
+  tc_timeout_env_double = tcase_create("Environment Double Timeout Tests");
+  unsetenv("CK_DEFAULT_TIMEOUT");
+#endif /* HAVE_DECL_SETENV */
+  tc_timeout_default = tcase_create("Default Timeout Tests");
+  tc_timeout_usr_int = tcase_create("User Integer Timeout Tests");
+  tc_timeout_usr_double = tcase_create("User Double Timeout Tests");
+#if HAVE_DECL_SETENV
   setenv("CK_TIMEOUT_MULTIPLIER", "2", 1);
-  tc_timeout_scale = tcase_create("Timeout Scaling Tests");
-  tc_timeout_usr_scale = tcase_create("User Timeout Scaling Tests");
+  tc_timeout_scale_int = tcase_create("Timeout Integer Scaling Tests");
+  tc_timeout_usr_scale_int = tcase_create("User Integer Timeout Scaling Tests");
   setenv("CK_DEFAULT_TIMEOUT", "6", 1);
-  tc_timeout_env_scale = tcase_create("Environment Timeout Scaling Tests");
+  tc_timeout_env_scale_int = tcase_create("Environment Integer Timeout Scaling Tests");
   unsetenv("CK_DEFAULT_TIMEOUT");
   unsetenv("CK_TIMEOUT_MULTIPLIER");
-#endif
-#endif
+  
+  setenv("CK_TIMEOUT_MULTIPLIER", "0.35", 1);
+  tc_timeout_scale_double = tcase_create("Timeout Double Scaling Tests");
+  tc_timeout_usr_scale_double = tcase_create("User Double Timeout Scaling Tests");
+  setenv("CK_DEFAULT_TIMEOUT", "0.9", 1);
+  tc_timeout_env_scale_double = tcase_create("Environment Double Timeout Scaling Tests");
+  unsetenv("CK_DEFAULT_TIMEOUT");
+  unsetenv("CK_TIMEOUT_MULTIPLIER");
+#endif /* HAVE_DECL_SETENV */
+#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
   tc_limit = tcase_create("Limit Tests");
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tc_messaging_and_fork = tcase_create("Msg and fork Tests");
+  tc_errors = tcase_create("Check Errors Tests");
+  tc_exit_handlers = tcase_create("Check Ignore Exit Handlers");
+#endif /* HAVE_FORK */
 
   suite_add_tcase (s, tc_simple);
+#if defined(HAVE_FORK) && HAVE_FORK==1
   suite_add_tcase (s, tc_signal);
-#if TIMEOUT_TESTS_ENABLED
-#if HAVE_WORKING_SETENV
-  suite_add_tcase (s, tc_timeout_env);
-#endif /* HAVE_WORKING_SETENV */
-  suite_add_tcase (s, tc_timeout);
-  suite_add_tcase (s, tc_timeout_usr);
-  /* Add a second time to make sure tcase_set_timeout doesn't contaminate it. */
-  suite_add_tcase (s, tc_timeout);
-#if HAVE_WORKING_SETENV
-  suite_add_tcase (s, tc_timeout_env_scale);
-  suite_add_tcase (s, tc_timeout_scale);
-  suite_add_tcase (s, tc_timeout_usr_scale);
-#endif
-#endif
+#endif /* HAVE_FORK */
+#if TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) && HAVE_FORK == 1
+#if HAVE_DECL_SETENV
+  suite_add_tcase (s, tc_timeout_env_int);
+  suite_add_tcase (s, tc_timeout_env_double);
+#endif /* HAVE_DECL_SETENV */
+  suite_add_tcase (s, tc_timeout_default);
+  suite_add_tcase (s, tc_timeout_usr_int);
+  suite_add_tcase (s, tc_timeout_usr_double);
+
+#if HAVE_DECL_SETENV
+  suite_add_tcase (s, tc_timeout_env_scale_int);
+  suite_add_tcase (s, tc_timeout_env_scale_double);
+  suite_add_tcase (s, tc_timeout_scale_int);
+  suite_add_tcase (s, tc_timeout_scale_double);
+  suite_add_tcase (s, tc_timeout_usr_scale_int);
+  suite_add_tcase (s, tc_timeout_usr_scale_double);
+#endif /* HAVE_DECL_SETENV */
+#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
   suite_add_tcase (s, tc_limit);
+#if defined(HAVE_FORK) && HAVE_FORK == 1
   suite_add_tcase (s, tc_messaging_and_fork);
+  suite_add_tcase (s, tc_errors);
+  suite_add_tcase (s, tc_exit_handlers);
+#endif
 
   tcase_add_test (tc_simple, test_lno);
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test (tc_simple, test_mark_lno);
+#endif
   tcase_add_test (tc_simple, test_pass);
-  tcase_add_test (tc_simple, test_fail);
+  tcase_add_test (tc_simple, test_fail_unless);
   tcase_add_test (tc_simple, test_fail_if_pass);
   tcase_add_test (tc_simple, test_fail_if_fail);
   tcase_add_test (tc_simple, test_fail_null_msg);
@@ -629,72 +3065,312 @@ Suite *make_sub_suite(void)
   tcase_add_test (tc_simple, test_ck_abort_msg_null);
   tcase_add_test (tc_simple, test_ck_assert);
   tcase_add_test (tc_simple, test_ck_assert_null);
+  tcase_add_test (tc_simple, test_ck_assert_with_mod);
   tcase_add_test (tc_simple, test_ck_assert_int_eq);
+  tcase_add_test (tc_simple, test_ck_assert_int_eq_with_mod);
   tcase_add_test (tc_simple, test_ck_assert_int_ne);
+  tcase_add_test (tc_simple, test_ck_assert_int_ne_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_int_lt);
+  tcase_add_test (tc_simple, test_ck_assert_int_lt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_int_le);
+  tcase_add_test (tc_simple, test_ck_assert_int_le_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_int_gt);
+  tcase_add_test (tc_simple, test_ck_assert_int_gt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_int_ge);
+  tcase_add_test (tc_simple, test_ck_assert_int_ge_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_int_expr);
+  tcase_add_test (tc_simple, test_ck_assert_uint_eq);
+  tcase_add_test (tc_simple, test_ck_assert_uint_eq_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_uint_ne);
+  tcase_add_test (tc_simple, test_ck_assert_uint_ne_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_uint_lt);
+  tcase_add_test (tc_simple, test_ck_assert_uint_lt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_uint_le);
+  tcase_add_test (tc_simple, test_ck_assert_uint_le_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_uint_gt);
+  tcase_add_test (tc_simple, test_ck_assert_uint_gt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_uint_ge);
+  tcase_add_test (tc_simple, test_ck_assert_uint_ge_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_uint_expr);
+  tcase_add_test (tc_simple, test_ck_assert_float_eq);
+  tcase_add_test (tc_simple, test_ck_assert_float_eq_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_ne);
+  tcase_add_test (tc_simple, test_ck_assert_float_ne_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_lt);
+  tcase_add_test (tc_simple, test_ck_assert_float_lt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_le);
+  tcase_add_test (tc_simple, test_ck_assert_float_le_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_gt);
+  tcase_add_test (tc_simple, test_ck_assert_float_gt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_ge);
+  tcase_add_test (tc_simple, test_ck_assert_float_ge_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_float_eq_tol);
+  tcase_add_test (tc_simple, test_ck_assert_float_eq_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_ne_tol);
+  tcase_add_test (tc_simple, test_ck_assert_float_ne_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_ge_tol);
+  tcase_add_test (tc_simple, test_ck_assert_float_ge_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_le_tol);
+  tcase_add_test (tc_simple, test_ck_assert_float_le_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_tol_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_float_finite);
+  tcase_add_test (tc_simple, test_ck_assert_float_finite_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_infinite);
+  tcase_add_test (tc_simple, test_ck_assert_float_infinite_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_nan);
+  tcase_add_test (tc_simple, test_ck_assert_float_nan_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_nonnan);
+  tcase_add_test (tc_simple, test_ck_assert_float_nonnan_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_float_nan_and_inf_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_double_eq);
+  tcase_add_test (tc_simple, test_ck_assert_double_eq_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_eq_with_promotion);
+  tcase_add_test (tc_simple, test_ck_assert_double_eq_with_conv);
+  tcase_add_test (tc_simple, test_ck_assert_double_ne);
+  tcase_add_test (tc_simple, test_ck_assert_double_ne_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_lt);
+  tcase_add_test (tc_simple, test_ck_assert_double_lt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_le);
+  tcase_add_test (tc_simple, test_ck_assert_double_le_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_gt);
+  tcase_add_test (tc_simple, test_ck_assert_double_gt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_ge);
+  tcase_add_test (tc_simple, test_ck_assert_double_ge_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_double_eq_tol);
+  tcase_add_test (tc_simple, test_ck_assert_double_eq_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_ne_tol);
+  tcase_add_test (tc_simple, test_ck_assert_double_ne_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_ge_tol);
+  tcase_add_test (tc_simple, test_ck_assert_double_ge_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_le_tol);
+  tcase_add_test (tc_simple, test_ck_assert_double_le_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_tol_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_double_finite);
+  tcase_add_test (tc_simple, test_ck_assert_double_finite_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_infinite);
+  tcase_add_test (tc_simple, test_ck_assert_double_infinite_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_nan);
+  tcase_add_test (tc_simple, test_ck_assert_double_nan_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_nonnan);
+  tcase_add_test (tc_simple, test_ck_assert_double_nonnan_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_double_nan_and_inf_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_eq);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_eq_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_eq_with_promotion);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_eq_with_conv);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ne);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ne_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_lt);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_lt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_le);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_le_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_gt);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_gt_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ge);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ge_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_eq_tol);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_eq_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ne_tol);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ne_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ge_tol);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_ge_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_le_tol);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_le_tol_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_tol_with_expr);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_finite);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_finite_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_infinite);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_infinite_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_nan);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_nan_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_nonnan);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_nonnan_with_mod);
+  tcase_add_test (tc_simple, test_ck_assert_ldouble_nan_and_inf_with_expr);
+  tcase_add_test (tc_simple, test_percent_n_escaped);
   tcase_add_test (tc_simple, test_ck_assert_str_eq);
+  tcase_add_test (tc_simple, test_ck_assert_str_eq_with_null);
   tcase_add_test (tc_simple, test_ck_assert_str_ne);
-
+  tcase_add_test (tc_simple, test_ck_assert_str_ne_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_str_lt);
+  tcase_add_test (tc_simple, test_ck_assert_str_lt_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_str_le);
+  tcase_add_test (tc_simple, test_ck_assert_str_le_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_str_gt);
+  tcase_add_test (tc_simple, test_ck_assert_str_gt_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_str_ge);
+  tcase_add_test (tc_simple, test_ck_assert_str_ge_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_str_expr);
+  tcase_add_test (tc_simple, test_ck_assert_pstr_eq);
+  tcase_add_test (tc_simple, test_ck_assert_pstr_eq_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_pstr_ne);
+  tcase_add_test (tc_simple, test_ck_assert_pstr_ne_with_null);
+  tcase_add_test (tc_simple, test_ck_assert_ptr_eq);
+  tcase_add_test (tc_simple, test_ck_assert_ptr_ne);
+  tcase_add_test (tc_simple, test_ck_assert_ptr_null);
+  tcase_add_test (tc_simple, test_ck_assert_ptr_nonnull);
+  tcase_add_test (tc_simple, test_ck_assert_mem_eq);
+  tcase_add_test (tc_simple, test_ck_assert_mem_ne);
+  tcase_add_test (tc_simple, test_ck_assert_mem_lt);
+  tcase_add_test (tc_simple, test_ck_assert_mem_le);
+  tcase_add_test (tc_simple, test_ck_assert_mem_gt);
+  tcase_add_test (tc_simple, test_ck_assert_mem_ge);
+  tcase_add_test (tc_simple, test_ck_assert_mem_zerolen);
+  tcase_add_test (tc_simple, test_ck_assert_mem_eq_exact);
+  tcase_add_test (tc_simple, test_ck_assert_mem_eq_longer);
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test (tc_signal, test_segv);
-  tcase_add_test_raise_signal (tc_signal, test_segv, 11); /* pass  */
+  tcase_add_test_raise_signal (tc_signal, test_segv_pass, 11); /* pass  */
   tcase_add_test_raise_signal (tc_signal, test_segv, 8);  /* error */
-  tcase_add_test_raise_signal (tc_signal, test_pass, 8);  /* fail  */
-  tcase_add_test_raise_signal (tc_signal, test_fail, 8);  /* fail  */
+  tcase_add_test_raise_signal (tc_signal, test_non_signal_8, 8);  /* fail  */
+  tcase_add_test_raise_signal (tc_signal, test_fail_unless, 8);  /* fail  */
+#if !defined(__CYGWIN__)
   tcase_add_test (tc_signal, test_fpe);
   tcase_add_test (tc_signal, test_mark_point);
-
-#if TIMEOUT_TESTS_ENABLED
-#if HAVE_WORKING_SETENV
-  tcase_add_test (tc_timeout_env, test_eternal);
-  tcase_add_test (tc_timeout_env, test_sleep2);
-  tcase_add_test (tc_timeout_env, test_sleep5);
-  tcase_add_test (tc_timeout_env, test_sleep9);
-#endif /* HAVE_WORKING_SETENV */
-
-  tcase_add_test (tc_timeout, test_eternal);
-  tcase_add_test (tc_timeout, test_sleep2);
-  tcase_add_test (tc_timeout, test_sleep5);
-  tcase_add_test (tc_timeout, test_sleep9);
-
-  tcase_set_timeout (tc_timeout_usr, 6);
-  tcase_add_test (tc_timeout_usr, test_eternal);
-  tcase_add_test (tc_timeout_usr, test_sleep2);
-  tcase_add_test (tc_timeout_usr, test_sleep5);
-  tcase_add_test (tc_timeout_usr, test_sleep9);
-#if HAVE_WORKING_SETENV
-  tcase_add_test (tc_timeout_env_scale, test_eternal);
-  tcase_add_test (tc_timeout_env_scale, test_sleep5);
-  tcase_add_test (tc_timeout_env_scale, test_sleep9);
-  tcase_add_test (tc_timeout_env_scale, test_sleep14);
-  tcase_add_test (tc_timeout_scale, test_eternal);
-  tcase_add_test (tc_timeout_scale, test_sleep2);
-  tcase_add_test (tc_timeout_scale, test_sleep5);
-  tcase_add_test (tc_timeout_scale, test_sleep9);
+#endif /* !defined(__CYGWIN__) */
+#endif /* HAVE_FORK */
+
+#if TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) && HAVE_FORK == 1
+#if HAVE_DECL_SETENV
+  /* tc_timeout_env_int tests have a timeout of 6 seconds */
+  tcase_add_test (tc_timeout_env_int, test_eternal_fail);
+  tcase_add_test (tc_timeout_env_int, test_sleep2_pass);
+  tcase_add_test (tc_timeout_env_int, test_sleep5_pass);
+  tcase_add_test (tc_timeout_env_int, test_sleep9_fail);
+  
+  /* tc_timeout_env_double tests have a timeout of 0.5 seconds */
+  tcase_add_test (tc_timeout_env_double, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_env_double, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_env_double, test_sleep1_fail);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_env_double, test_sleep2_fail);
+  tcase_add_test (tc_timeout_env_double, test_sleep5_fail);
+  tcase_add_test (tc_timeout_env_double, test_sleep9_fail);
+#endif /* HAVE_DECL_SETENV */
+
+  /* tc_timeout_default tests have a timeout of 4 seconds */
+  tcase_add_test (tc_timeout_default, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_default, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_default, test_sleep1_pass);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_default, test_sleep2_pass);
+  tcase_add_test (tc_timeout_default, test_sleep5_fail);
+  tcase_add_test (tc_timeout_default, test_sleep9_fail);
+
+  tcase_set_timeout (tc_timeout_usr_int, 6);
+  tcase_add_test (tc_timeout_usr_int, test_eternal_fail);
+  tcase_add_test (tc_timeout_usr_int, test_sleep2_pass);
+  tcase_add_test (tc_timeout_usr_int, test_sleep5_pass);
+  tcase_add_test (tc_timeout_usr_int, test_sleep9_fail);
+
+  tcase_set_timeout (tc_timeout_usr_double, 0.5);
+  tcase_add_test (tc_timeout_usr_double, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_usr_double, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_usr_double, test_sleep1_fail);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_usr_double, test_sleep2_fail);
+  tcase_add_test (tc_timeout_usr_double, test_sleep5_fail);
+  tcase_add_test (tc_timeout_usr_double, test_sleep9_fail);
+  
+#if HAVE_DECL_SETENV
+  /* tc_timeout_env_scale_int tests have a timeout of 6 (time) * 2 (multiplier) = 12 seconds */
+  tcase_add_test (tc_timeout_env_scale_int, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_env_scale_int, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_env_scale_int, test_sleep1_pass);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_env_scale_int, test_sleep2_pass);
+  tcase_add_test (tc_timeout_env_scale_int, test_sleep5_pass);
+  tcase_add_test (tc_timeout_env_scale_int, test_sleep9_pass);
+  tcase_add_test (tc_timeout_env_scale_int, test_sleep14_fail);
+
+  /* tc_timeout_env_scale_double tests have a timeout of 0.9 (time) * 0.4 (multiplier) = 0.36 seconds */
+  tcase_add_test (tc_timeout_env_scale_double, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_env_scale_double, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_env_scale_double, test_sleep1_fail);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_env_scale_double, test_sleep2_fail);
+  tcase_add_test (tc_timeout_env_scale_double, test_sleep5_fail);
+  tcase_add_test (tc_timeout_env_scale_double, test_sleep9_fail);
+  tcase_add_test (tc_timeout_env_scale_double, test_sleep14_fail);
+
+  /* tc_timeout_scale_int tests have a timeout of 2 * 4 (default) = 8 seconds */
+  tcase_add_test (tc_timeout_scale_int, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_scale_int, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_scale_int, test_sleep1_pass);
+  tcase_add_test (tc_timeout_scale_int, test_sleep2_pass);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_scale_int, test_sleep5_pass);
+  tcase_add_test (tc_timeout_scale_int, test_sleep9_fail);
+
+  /* tc_timeout_scale_double tests have a timeout of 4 (default) * 0.3 (multiplier) = 1.6 second */
+  tcase_add_test (tc_timeout_scale_double, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_scale_double, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_scale_double, test_sleep1_pass);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_scale_double, test_sleep2_fail);
+  tcase_add_test (tc_timeout_scale_double, test_sleep5_fail);
+  tcase_add_test (tc_timeout_scale_double, test_sleep9_fail);
+  
   setenv("CK_TIMEOUT_MULTIPLIER", "2", 1);
-  tcase_set_timeout (tc_timeout_usr_scale, 6);
+  tcase_set_timeout (tc_timeout_usr_scale_int, 6);
   unsetenv("CK_TIMEOUT_MULTIPLIER");
-  tcase_add_test (tc_timeout_usr_scale, test_eternal);
-  tcase_add_test (tc_timeout_usr_scale, test_sleep5);
-  tcase_add_test (tc_timeout_usr_scale, test_sleep9);
-  tcase_add_test (tc_timeout_usr_scale, test_sleep14);
-#endif
-#if 0
-  tcase_set_timeout (tc_timeout_kill, 2);
-  tcase_add_test (tc_timeout_kill, test_sleep);
-#endif
-#endif
-
+  tcase_add_test (tc_timeout_usr_scale_int, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_usr_scale_int, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_usr_scale_int, test_sleep1_pass);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_usr_scale_int, test_sleep2_pass);
+  tcase_add_test (tc_timeout_usr_scale_int, test_sleep5_pass);
+  tcase_add_test (tc_timeout_usr_scale_int, test_sleep9_pass);
+  tcase_add_test (tc_timeout_usr_scale_int, test_sleep14_fail);
+  
+  setenv("CK_TIMEOUT_MULTIPLIER", "0.4", 1);
+  tcase_set_timeout (tc_timeout_usr_scale_double, 0.9);
+  unsetenv("CK_TIMEOUT_MULTIPLIER");
+  tcase_add_test (tc_timeout_usr_scale_double, test_eternal_fail);
+#ifdef HAVE_LIBRT
+  tcase_add_test (tc_timeout_usr_scale_double, test_sleep0_025_pass);
+  tcase_add_test (tc_timeout_usr_scale_double, test_sleep1_fail);
+#endif /* HAVE_LIBRT */
+  tcase_add_test (tc_timeout_usr_scale_double, test_sleep2_fail);
+  tcase_add_test (tc_timeout_usr_scale_double, test_sleep5_fail);
+  tcase_add_test (tc_timeout_usr_scale_double, test_sleep9_fail);
+  tcase_add_test (tc_timeout_usr_scale_double, test_sleep14_fail);
+#endif /* HAVE_DECL_SETENV */
+#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test (tc_limit, test_early_exit);
+#endif /* HAVE_FORK */
+#if MEMORY_LEAKING_TESTS_ENABLED
   tcase_add_test (tc_limit, test_null);
+#endif /* MEMORY_LEAKING_TESTS_ENABLED */
   tcase_add_test (tc_limit, test_null_2);
 
-#ifdef _POSIX_VERSION
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_test (tc_messaging_and_fork, test_fork1p_pass);
   tcase_add_test (tc_messaging_and_fork, test_fork1p_fail);
   tcase_add_test (tc_messaging_and_fork, test_fork1c_pass);
   tcase_add_test (tc_messaging_and_fork, test_fork1c_fail);
   tcase_add_test (tc_messaging_and_fork, test_fork2_pass);
   tcase_add_test (tc_messaging_and_fork, test_fork2_fail);
-#endif /* _POSIX_VERSION */
+
+#if MEMORY_LEAKING_TESTS_ENABLED
+  tcase_add_test_raise_signal (tc_errors, test_invalid_set_fork_status, 2);
+#endif
+
+  tcase_add_test (tc_exit_handlers, test_ignore_exit_handlers);
+#endif /* HAVE_FORK */
 
   return s;
 }
diff --git a/tests/check_check_tags.c b/tests/check_check_tags.c
new file mode 100644 (file)
index 0000000..e4f485a
--- /dev/null
@@ -0,0 +1,763 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+#include "../lib/libcompat.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <check.h>
+#include <assert.h>
+#include "check_check.h"
+
+enum {
+    RED,
+    BLUE,
+    PURPLE,
+    YELLOW,
+    BLACK,
+    MAX_TESTS
+} test_ids;
+
+/*
+ * Flag per test which is set true when that test runs
+ */
+unsigned int test_executed[MAX_TESTS];
+
+static void reset_executed(void)
+{
+    memset(test_executed, 0, sizeof(test_executed));
+}
+
+START_TEST(red_test1)
+{
+    test_executed[RED] = 1;
+}
+END_TEST
+
+START_TEST(blue_test1)
+{
+    test_executed[BLUE] = 1;
+}
+END_TEST
+
+START_TEST(purple_test1)
+{
+    test_executed[PURPLE] = 1;
+}
+END_TEST
+
+START_TEST(yellow_test1)
+{
+    test_executed[YELLOW] = 1;
+}
+END_TEST
+
+START_TEST(black_test1)
+{
+    test_executed[BLACK] = 1;
+}
+END_TEST
+
+
+static SRunner *make_tagged_testrunner(void)
+{
+
+    SRunner *sr;
+    Suite *s1, *s2;
+
+    TCase *red, *blue, *purple, *yellow, *black;
+
+    s1 = suite_create("RedBlue Suite");
+
+    red = tcase_create("Red");
+    tcase_set_tags(red, "Red");
+    suite_add_tcase (s1, red);
+    tcase_add_test(red, red_test1);
+
+    blue = tcase_create("Blue");
+    tcase_set_tags(blue, "Blue");
+    suite_add_tcase (s1, blue);
+    tcase_add_test(blue, blue_test1);
+
+    s2 = suite_create("PurpleYellowBlack Suite");
+
+    purple = tcase_create("Purple");
+    tcase_set_tags(purple, "Red Blue");
+    suite_add_tcase (s2, purple);
+    tcase_add_test(purple, purple_test1);
+
+    yellow = tcase_create("Yellow");
+    tcase_set_tags(yellow, "Yellow");
+    suite_add_tcase (s2, yellow);
+    tcase_add_test(yellow, yellow_test1);
+
+    black = tcase_create("Black");
+    suite_add_tcase (s2, black);
+    tcase_add_test(black, black_test1);
+
+    sr = srunner_create(s1);
+    srunner_add_suite(sr, s2);
+
+    return sr;
+}
+
+static   SRunner *sr = NULL;
+
+static void tag_test_setup(void)
+{
+  sr = make_tagged_testrunner();
+  srunner_set_fork_status(sr, CK_NOFORK);
+}
+
+static void tag_test_teardown (void)
+{
+    srunner_free (sr);
+}
+
+/*
+ * Show that with no filter we run all the tests
+ */
+START_TEST(null_filter)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, NULL, NULL, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_nothing)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "", NULL, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(exclude_nothing)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, NULL, "", CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_nothing_exclude_nothing)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "", "", CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_yellow)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Yellow", NULL, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+
+START_TEST(include_red)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Red", NULL, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_red_blue)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Red Blue", NULL, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_red_blue_yellow)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Red Blue Yellow", NULL, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(exclude_yellow)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, NULL, "Yellow", CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(exclude_red)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, NULL, "Red", CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(exclude_red_blue)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, NULL, "Red Blue", CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(exclude_red_blue_yellow)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, NULL, "Red Blue Yellow", CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+} END_TEST
+
+#if HAVE_DECL_SETENV
+
+/* env var driven tests */
+
+START_TEST(include_yellow_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Yellow", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+
+} END_TEST
+
+
+START_TEST(include_red_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(include_red_blue_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red  Blue", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(include_red_blue_yellow_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red Blue Yellow", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(exclude_yellow_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Yellow", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(exclude_red_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(exclude_red_blue_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red Blue", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(exclude_red_blue_yellow_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red Blue Yellow", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+
+} END_TEST
+
+START_TEST(include_red_case_red_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_CASE", "Red", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+    unsetenv ("CK_RUN_CASE");
+
+} END_TEST
+
+START_TEST(include_red_case_blue_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_CASE", "Blue", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+    unsetenv ("CK_RUN_CASE");
+
+} END_TEST
+
+START_TEST(exclude_red_case_red_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_CASE", "Red", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+    unsetenv ("CK_RUN_CASE");
+
+} END_TEST
+
+START_TEST(exclude_red_case_blue_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_CASE", "Blue", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+    unsetenv ("CK_RUN_CASE");
+
+} END_TEST
+
+START_TEST(include_red_suite_redblue_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_SUITE", "RedBlue Suite", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+    unsetenv ("CK_RUN_SUITE");
+
+} END_TEST
+
+START_TEST(include_red_suite_purpleyellowblack_env)
+{
+    reset_executed();
+
+    setenv ("CK_INCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_SUITE", "PurpleYellowBlack Suite", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_INCLUDE_TAGS");
+    unsetenv ("CK_RUN_SUITE");
+
+} END_TEST
+
+START_TEST(exclude_red_suite_redblue_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_SUITE", "RedBlue Suite", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+    unsetenv ("CK_RUN_SUITE");
+
+} END_TEST
+
+START_TEST(exclude_red_suite_purpleyellowblack_env)
+{
+    reset_executed();
+
+    setenv ("CK_EXCLUDE_TAGS", "Red Yellow", 1);
+    setenv ("CK_RUN_SUITE", "PurpleYellowBlack Suite", 1);
+    srunner_run_all(sr, CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(test_executed[BLACK]);
+
+    unsetenv ("CK_EXCLUDE_TAGS");
+    unsetenv ("CK_RUN_SUITE");
+
+} END_TEST
+
+
+#endif /* HAVE_DECL_SETENV */
+
+
+START_TEST(include_red_exclude_red)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Red", "Red", CK_VERBOSE);
+
+    ck_assert(!test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_red_exclude_blue)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Red", "Blue", CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(!test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_red_include_red)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "Red Red Red", NULL, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(!test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+START_TEST(include_w_spaces)
+{
+    reset_executed();
+
+    srunner_run_tagged(sr, NULL, NULL, "  Red    Blue ", NULL, CK_VERBOSE);
+
+    ck_assert(test_executed[RED]);
+    ck_assert(test_executed[BLUE]);
+    ck_assert(test_executed[PURPLE]);
+    ck_assert(!test_executed[YELLOW]);
+    ck_assert(!test_executed[BLACK]);
+
+} END_TEST
+
+Suite *make_tag_suite(void)
+{
+    TCase *set_get_tags, *no_filters;
+    TCase *include_filters, *exclude_filters;
+#if HAVE_DECL_SETENV
+    TCase *include_filters_env, *exclude_filters_env;
+#endif /* HAVE_DECL_SETENV */
+    TCase *include_exclude_filters, *strange_filters;
+    TCase *tag_plus_suite_env, *tag_plus_case_env;
+    Suite *s;
+
+    s = suite_create("Check Tag Filtering");
+
+    no_filters = tcase_create("no tag filters");
+    suite_add_tcase (s, no_filters);
+    tcase_add_test(no_filters, null_filter);
+    tcase_add_test(no_filters, include_nothing);
+    tcase_add_test(no_filters, exclude_nothing);
+    tcase_add_unchecked_fixture (no_filters,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    include_filters = tcase_create("include tags");
+    suite_add_tcase (s, include_filters);
+    tcase_add_test(include_filters, include_yellow);
+    tcase_add_test(include_filters, include_red);
+    tcase_add_test(include_filters, include_red_blue);
+    tcase_add_test(include_filters, include_red_blue_yellow);
+    tcase_add_unchecked_fixture (include_filters,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    exclude_filters = tcase_create("exclude tags");
+    suite_add_tcase (s, exclude_filters);
+    tcase_add_test(exclude_filters, exclude_yellow);
+    tcase_add_test(exclude_filters, exclude_red);
+    tcase_add_test(exclude_filters, exclude_red_blue);
+    tcase_add_test(exclude_filters, exclude_red_blue_yellow);
+    tcase_add_unchecked_fixture (exclude_filters,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+#if HAVE_DECL_SETENV
+
+    include_filters_env = tcase_create("include tags via env");
+    suite_add_tcase (s, include_filters_env);
+    tcase_add_test(include_filters_env, include_yellow_env);
+    tcase_add_test(include_filters_env, include_red_env);
+    tcase_add_test(include_filters_env, include_red_blue_env);
+    tcase_add_test(include_filters_env, include_red_blue_yellow_env);
+    tcase_add_unchecked_fixture (include_filters_env,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    exclude_filters_env = tcase_create("exclude tags via env");
+    suite_add_tcase (s, exclude_filters_env);
+    tcase_add_test(exclude_filters_env, exclude_yellow_env);
+    tcase_add_test(exclude_filters_env, exclude_red_env);
+    tcase_add_test(exclude_filters_env, exclude_red_blue_env);
+    tcase_add_test(exclude_filters_env, exclude_red_blue_yellow_env);
+    tcase_add_unchecked_fixture (exclude_filters_env,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    tag_plus_suite_env = tcase_create("combining tag filters with suite selection");
+    suite_add_tcase (s, tag_plus_suite_env);
+    tcase_add_test(tag_plus_suite_env, include_red_suite_redblue_env);
+    tcase_add_test(tag_plus_suite_env, include_red_suite_purpleyellowblack_env);
+    tcase_add_test(tag_plus_suite_env, exclude_red_suite_redblue_env);
+    tcase_add_test(tag_plus_suite_env, exclude_red_suite_purpleyellowblack_env);
+    tcase_add_unchecked_fixture (tag_plus_suite_env,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    tag_plus_case_env = tcase_create("combining tag filters with case selection");
+    suite_add_tcase (s, tag_plus_case_env);
+    tcase_add_test(tag_plus_case_env, include_red_case_red_env);
+    tcase_add_test(tag_plus_case_env, include_red_case_blue_env);
+    tcase_add_test(tag_plus_case_env, exclude_red_case_red_env);
+    tcase_add_test(tag_plus_case_env, exclude_red_case_blue_env);
+    tcase_add_unchecked_fixture (tag_plus_case_env,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+#endif /* HAVE_DECL_SETENV  */
+
+    include_exclude_filters = tcase_create("include and exclude tags");
+    suite_add_tcase (s, include_exclude_filters);
+    tcase_add_test(include_exclude_filters, include_nothing_exclude_nothing);
+    tcase_add_test(include_exclude_filters, include_red_exclude_blue);
+    tcase_add_test(include_exclude_filters, include_red_exclude_red);
+    tcase_add_unchecked_fixture (include_exclude_filters,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    strange_filters = tcase_create("strange tag filters");
+    suite_add_tcase (s, strange_filters);
+    tcase_add_test(strange_filters, include_red_include_red);
+    tcase_add_test(strange_filters, include_w_spaces);
+    tcase_add_unchecked_fixture (strange_filters,
+                                tag_test_setup,
+                                tag_test_teardown);
+
+    return s;
+}
index 1a749ea..60b8b7f 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <string.h>
@@ -11,85 +31,88 @@ START_TEST(test_create)
 {
   List *lp = NULL;
 
-  fail_unless (list_val(lp) == NULL,
+  ck_assert_msg (check_list_val(lp) == NULL,
               "Current list value should be NULL for NULL list");
 
   lp = check_list_create();
 
-  fail_unless (list_val(lp) == NULL,
+  ck_assert_msg (check_list_val(lp) == NULL,
               "Current list value should be NULL for newly created list");
 
-  fail_unless (list_at_end(lp),
+  ck_assert_msg (check_list_at_end(lp),
               "Newly created list should be at end");
-  list_advance(lp);
-  fail_unless (list_at_end(lp),
+  check_list_advance(lp);
+  ck_assert_msg (check_list_at_end(lp),
               "Advancing a list at end should produce a list at end");
-  list_free (lp);
+  check_list_free (lp);
 }
 END_TEST
 
 START_TEST(test_free)
 {
   List *lp = check_list_create();
-  list_add_end (lp, "abc");
-  list_add_end (lp, "123");
-  list_add_end (lp, NULL);
-  list_free (lp);
+  char data_abc[] = "abc";
+  char data_123[] = "123";
+
+  check_list_add_end (lp, data_abc);
+  check_list_add_end (lp, data_123);
+  check_list_add_end (lp, NULL);
+  check_list_free (lp);
 }
 END_TEST
 
 START_TEST(test_add_end)
 {
   List * lp = check_list_create();
-  const char * tval = "abc";
+  char tval[] = "abc";
   
-  list_add_end (lp, tval);
+  check_list_add_end (lp, tval);
   
-  fail_unless (list_val (lp) != NULL,
+  ck_assert_msg (check_list_val (lp) != NULL,
               "List current val should not be null after new insertion");
-  fail_unless (!list_at_end (lp),
+  ck_assert_msg (!check_list_at_end (lp),
               "List should be at end after new insertion");
-  fail_unless (strcmp(tval, (char *) list_val (lp)) == 0,
+  ck_assert_msg (strcmp(tval, (char *) check_list_val (lp)) == 0,
               "List current val should equal newly inserted val");
-  list_free (lp);
+  check_list_free (lp);
 }
 END_TEST
 
 START_TEST(test_add_front)
 {
   List * lp = check_list_create();
-  const char * tval = "abc";
+  char tval[] = "abc";
   
-  list_add_front (lp, tval);
+  check_list_add_front (lp, tval);
   
-  fail_unless (list_val (lp) != NULL,
+  ck_assert_msg (check_list_val (lp) != NULL,
               "List current val should not be null after new insertion");
-  fail_unless (strcmp(tval, (char *) list_val (lp)) == 0,
+  ck_assert_msg (strcmp(tval, (char *) check_list_val (lp)) == 0,
               "List current val should equal newly inserted val");
-  list_free (lp);
+  check_list_free (lp);
 }
 END_TEST
 
 START_TEST(test_add_end_and_next)
 {
   List *lp = check_list_create();
-  const char *tval1 = "abc";
-  const char *tval2 = "123";
+  char tval1[] = "abc";
+  char tval2[] = "123";
   
-  list_add_end (lp, tval1);
-  list_add_end (lp, tval2);
-  list_front(lp);
-  fail_unless (strcmp (tval1, list_val (lp)) == 0,
+  check_list_add_end (lp, tval1);
+  check_list_add_end (lp, tval2);
+  check_list_front(lp);
+  ck_assert_msg (strcmp (tval1, (char *)check_list_val (lp)) == 0,
               "List head val should equal first inserted val");
-  list_advance (lp);
-  fail_unless (!list_at_end (lp),
+  check_list_advance (lp);
+  ck_assert_msg (!check_list_at_end (lp),
               "List should not be at end after two adds and one next");
-  fail_unless (strcmp (tval2, list_val (lp)) == 0,
+  ck_assert_msg (strcmp (tval2, (char *)check_list_val (lp)) == 0,
               "List val should equal second inserted val");
-  list_advance(lp);
-  fail_unless (list_at_end (lp),
+  check_list_advance(lp);
+  ck_assert_msg (check_list_at_end (lp),
               "List should be at and after two adds and two nexts");
-  list_free (lp);
+  check_list_free (lp);
 }
 END_TEST
 
@@ -97,23 +120,23 @@ END_TEST
 START_TEST(test_add_front_and_next)
 {
   List * lp = check_list_create();
-  const char *tval1 = "abc";
-  const char *tval2 = "123";
+  char tval1[] = "abc";
+  char tval2[] = "123";
   
-  list_add_front (lp, tval1);
-  list_add_front (lp, tval2);
-  list_front(lp);
-  fail_unless (strcmp (tval2, list_val (lp)) == 0,
+  check_list_add_front (lp, tval1);
+  check_list_add_front (lp, tval2);
+  check_list_front(lp);
+  ck_assert_msg (strcmp (tval2, (char *)check_list_val (lp)) == 0,
               "List head val should equal last inserted val");
-  list_advance (lp);
-  fail_unless (!list_at_end (lp),
+  check_list_advance (lp);
+  ck_assert_msg (!check_list_at_end (lp),
               "List should not be at end after two adds and one next");
-  fail_unless (strcmp (tval1, list_val (lp)) == 0,
+  ck_assert_msg (strcmp (tval1, (char *)check_list_val (lp)) == 0,
               "List val should equal first inserted val");
-  list_advance(lp);
-  fail_unless (list_at_end (lp),
+  check_list_advance(lp);
+  ck_assert_msg (check_list_at_end (lp),
               "List should be at and after two adds and two nexts");
-  list_free (lp);
+  check_list_free (lp);
 }
 END_TEST
 
@@ -121,17 +144,51 @@ START_TEST(test_add_a_bunch)
 {
   List *lp;
   int i, j;
+  char tval1[] = "abc";
+  char tval2[] = "123";
   for (i = 0; i < 3; i++) {
     lp = check_list_create();
     for (j = 0; j < 1000; j++) {
-      list_add_end (lp, "abc");
-      list_add_front (lp, "123");
+      check_list_add_end (lp, tval1);
+      check_list_add_front (lp, tval2);
     }
-    list_free(lp);
+    check_list_free(lp);
   }
 }
 END_TEST
 
+START_TEST(test_list_abuse)
+{
+    check_list_advance(NULL);
+    /* Should not crash */
+}
+END_TEST
+
+START_TEST(test_contains)
+{
+    List *lp = check_list_create();
+
+    char otherData[] = "other";
+    char goalData[] = "goal";
+    int index;
+
+    ck_assert_msg (check_list_contains(lp, goalData) == 0,
+                       "The goal data should not be in the list yet");
+
+    for(index = 0; index < 10; index++)
+    {
+        check_list_add_end (lp, otherData);
+        ck_assert_msg (check_list_contains(lp, goalData) == 0,
+                   "The goal data should not be in the list yet");
+    }
+
+    check_list_add_end (lp, goalData);
+    ck_assert_msg (check_list_contains(lp, goalData) ,
+                       "The goal data should be in the list");
+
+    check_list_free(lp);
+}
+END_TEST
 
 Suite *make_list_suite (void)
 {
@@ -146,5 +203,8 @@ Suite *make_list_suite (void)
   tcase_add_test (tc, test_add_end_and_next);
   tcase_add_test (tc, test_add_front_and_next);
   tcase_add_test (tc, test_add_a_bunch);
+  tcase_add_test (tc, test_list_abuse);
+  tcase_add_test (tc, test_contains);
+
   return s;
 }
diff --git a/tests/check_mem_leaks.c b/tests/check_mem_leaks.c
new file mode 100644 (file)
index 0000000..4528fb0
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+/**
+ * The purpose of this test is to be used by valgrind to check for
+ * memory leaks. Each public API that check exports is used at
+ * least once. Tests which use non-public API, or leak intentionally,
+ * are not included here.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <check.h>
+#include "config.h"
+#include "check_check.h"
+
+int main ()
+{
+    int n;
+    SRunner *sr;
+
+    /*
+     * First, the sub suite is run. This suite has failures which
+     * are intentional, as the output of the failures is checked
+     * in check_check_master.c. However, here we do not check if
+     * the failures are expected. Instead, we just want to run
+     * them and see if they leak. Because of this, the result
+     * of the suite is not checked.
+     */
+    sr = srunner_create(make_sub_suite());
+    /*
+     * Enable all logging types, just in case one of them
+     * leaks memory.
+     */
+    srunner_set_log (sr, "test_mem_leak.log");
+    srunner_set_xml (sr, "test_mem_leak.xml");
+    srunner_set_tap (sr, "test_mem_leak.tap");
+    srunner_run_all(sr, CK_NORMAL);
+    srunner_free(sr);
+
+    /* Now, the other suite is run. These are all expected to pass. */
+
+    /* The following setup is necessary for the fork suite */
+    fork_setup();
+
+    sr = srunner_create (make_log_suite());
+    srunner_add_suite(sr, make_fork_suite());
+
+#if defined(HAVE_FORK) && HAVE_FORK==1
+    srunner_add_suite(sr, make_exit_suite());
+#endif
+    srunner_add_suite(sr, make_tag_suite());
+    srunner_add_suite(sr, make_selective_suite());
+
+    /*
+     * Enable all logging types, just in case one of them
+     * leaks memory.
+     */
+    srunner_set_log (sr, "test_mem_leak.log");
+    srunner_set_xml (sr, "test_mem_leak.xml");
+    srunner_set_tap (sr, "test_mem_leak.tap");
+
+    srunner_run_all(sr, CK_NORMAL);
+
+    /* Cleanup from the fork suite setup */
+    fork_teardown();
+
+    n = srunner_ntests_failed(sr);
+    srunner_free(sr);
+    return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
+
diff --git a/tests/check_nofork.c b/tests/check_nofork.c
new file mode 100644 (file)
index 0000000..da2ddd2
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "../lib/libcompat.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <check.h>
+
+
+Suite *s;
+TCase *tc;
+SRunner *sr;
+
+START_TEST(test_nofork_exit)
+{
+  char* s = NULL;
+
+  ck_assert(NULL != s);
+
+  /* this test should not crash in nofork mode */
+  ck_assert_str_eq("test", s);
+}
+END_TEST
+
+#if !defined(HAVE_FORK) || HAVE_FORK == 0
+START_TEST(test_check_fork)
+{
+    ck_assert_int_eq(-1, check_fork());
+}
+END_TEST
+#endif
+
+int main(void)
+{
+  s = suite_create("NoFork");
+  tc = tcase_create("Exit");
+  sr = srunner_create(s);
+
+  suite_add_tcase(s, tc);
+  tcase_add_test(tc, test_nofork_exit);
+
+  srunner_set_fork_status(sr, CK_NOFORK);
+  srunner_run_all(sr, CK_MINIMAL);
+  srunner_free(sr);
+
+#if !defined(HAVE_FORK) || HAVE_FORK == 0
+  s = suite_create("NoForkSupport");
+  tc = tcase_create("NoFork");
+  sr = srunner_create(s);
+
+  /* The following should not fail, but should be ignored */
+  srunner_set_fork_status(sr, CK_FORK);
+  if(srunner_fork_status(sr) != CK_NOFORK)
+  {
+      fprintf(stderr, "Call to srunner_set_fork_status() was not ignored\n");
+      exit(1);
+  }
+
+  suite_add_tcase(s, tc);
+  tcase_add_test(tc, test_check_fork);
+  srunner_run_all(sr, CK_MINIMAL);
+  srunner_free(sr);
+#endif
+
+  return 0;
+}
diff --git a/tests/check_nofork_teardown.c b/tests/check_nofork_teardown.c
new file mode 100644 (file)
index 0000000..6484e32
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "../lib/libcompat.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "check.h"
+
+/**
+ * This test checks the result if in CK_NOFORK
+ * mode a unit test fails but a checked teardown
+ * runs after the failed test.
+ *
+ * Previously, the failure would be reported as:
+ *
+ * 0%: Checks: 1, Failures: 1, Errors: 0
+ * (null):-1:S:tc:will_fail:0: Assertion '0' failed
+ *
+ * The reason why this happens is this: the end of the
+ * message sequence coming down the pipe is CK_MSG_LOC
+ * (location of failing test), CK_MSG_FAIL, CK_MSG_CTX
+ * (TEARDOWN). It is this final message that confuses
+ * things, because rcvmsg_update_ctx() updates
+ * rmsg->lastctx (which likely is the right thing for it
+ * to do), which is the ctx value used by the first 'if'
+ * body in construct_test_result() in its call to
+ * tr_set_loc_by_ctx().
+ *
+ * After the fix, the test failure should be reported
+ * as:
+ *
+ * 0%: Checks: 1, Failures: 1, Errors: 0
+ * check_nofork_teardown.c:33:F:tc:will_fail:0: Assertion '0' failed
+ */
+
+START_TEST( will_fail )
+{
+    ck_assert(0);
+}
+END_TEST
+
+static void empty_checked_teardown( void )
+{
+}
+
+int main( void )
+{
+    SRunner *sr = srunner_create( NULL );
+    Suite *s = suite_create( "bug-99" );
+    TCase *tc = tcase_create( "tc" );
+    int result;
+
+    srunner_add_suite( sr, s );
+    srunner_set_fork_status( sr, CK_NOFORK );
+    suite_add_tcase( s, tc );
+    tcase_add_checked_fixture( tc, NULL, empty_checked_teardown );
+    tcase_add_test( tc, will_fail );
+
+    srunner_run_all( sr, CK_ENV );
+    result = srunner_ntests_failed( sr ) ? EXIT_FAILURE : EXIT_SUCCESS;
+    srunner_free( sr );
+
+    return result;
+}
diff --git a/tests/check_set_max_msg_size.c b/tests/check_set_max_msg_size.c
new file mode 100644 (file)
index 0000000..6ebfc8e
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+/**
+ * The purpose of this test is to reduce the maximal assertion message size
+ * in order to trigger the "Message string too long" error.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <check.h>
+#include "config.h"
+#include "check_check.h"
+
+START_TEST(test_set_max_msg_size)
+{
+  ck_abort_msg("40 characters of an assertion message...");
+}
+END_TEST
+
+
+static Suite *make_set_max_msg_size_suite(void)
+{
+  Suite *s = suite_create("Check Set Max Msg Size");
+
+  TCase *tc_set_max_msg_size = tcase_create("Test Set Max Msg Size");
+
+  suite_add_tcase (s, tc_set_max_msg_size);
+
+  tcase_add_test (tc_set_max_msg_size, test_set_max_msg_size);
+
+  return s;
+}
+
+int main (int argc, char *argv[])
+{
+    int n;
+    SRunner *sr;
+
+    if (argc != 2) {
+        fprintf(stderr, "usage: %s max-msg-size\n", argv[0]);
+        return EXIT_FAILURE;
+    }
+
+    /*
+     * Run the test suite. This is intended to trigger the "Message is too long" error.
+     * Actual success/failure is determined by examining the output.
+     */
+    check_set_max_msg_size(32);            // 1st call has no effect since
+    check_set_max_msg_size(atoi(argv[1])); // the 2nd call will override it.
+    sr = srunner_create(make_set_max_msg_size_suite());
+    srunner_run_all(sr, CK_NORMAL);
+    srunner_free(sr);
+    return EXIT_SUCCESS;
+}
+
index 3b44bb1..7f0756e 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 /* note: this test appears pretty useless, so we aren't including it
@@ -14,13 +34,13 @@ SRunner *sr;
 
 START_TEST(test_pass)
 {
-  fail_unless(1,"Shouldn't see this message");
+  ck_assert_msg(1,"Shouldn't see this message");
 }
 END_TEST
 
 START_TEST(test_fail)
 {
-  fail("This test fails");
+  ck_abort_msg("This test fails");
 }
 END_TEST
 
index e5fd95d..717e62d 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
 #include "../lib/libcompat.h"
 
 #include <stdlib.h>
@@ -8,18 +28,18 @@ Suite *s;
 TCase *tc;
 SRunner *sr;
 
-#if defined (HAVE_PTHREAD) || defined (_POSIX_VERSION)
+#if defined (HAVE_PTHREAD) || defined (HAVE_FORK)
 static void *
 sendinfo (void *userdata CK_ATTRIBUTE_UNUSED)
 {
   unsigned int i;
   for (i = 0; i < 999; i++)
     {
-      fail_unless (1, "Shouldn't see this message");
+      ck_assert_msg (1, "Shouldn't see this message");
     }
   return NULL;
 }
-#endif /* HAVE_PTHREAD || _POSIX_VERSION */
+#endif /* HAVE_PTHREAD || HAVE_FORK */
 
 #ifdef HAVE_PTHREAD
 START_TEST (test_stress_threads)
@@ -34,7 +54,7 @@ START_TEST (test_stress_threads)
 END_TEST
 #endif /* HAVE_PTHREAD */
 
-#ifdef _POSIX_VERSION
+#if defined(HAVE_FORK) && HAVE_FORK==1
 START_TEST (test_stress_forks)
 {
   pid_t cpid = fork ();
@@ -51,7 +71,7 @@ START_TEST (test_stress_forks)
     }
 }
 END_TEST
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
 
 int
 main (void)
@@ -66,18 +86,18 @@ main (void)
   tcase_add_loop_test (tc, test_stress_threads, 0, 100);
 #endif /* HAVE_PTHREAD */
 
-#ifdef _POSIX_VERSION
+#if defined(HAVE_FORK) && HAVE_FORK==1
   tcase_add_loop_test (tc, test_stress_forks, 0, 100);
-#endif /* _POSIX_VERSION */
+#endif /* HAVE_FORK */
 
   srunner_run_all (sr, CK_VERBOSE);
   nf = srunner_ntests_failed (sr);
   srunner_free (sr);
 
   /* hack to give us XFAIL on non-posix platforms */
-#ifndef _POSIX_VERSION
+#ifndef HAVE_FORK
   nf++;
-#endif /* !_POSIX_VERSION */
+#endif /* !HAVE_FORK */
 
   return nf ? EXIT_FAILURE : EXIT_SUCCESS;
 }
diff --git a/tests/ex_log_output.c b/tests/ex_log_output.c
deleted file mode 100644 (file)
index 1cf31b8..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "../lib/libcompat.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <check.h>
-
-START_TEST(test_pass)
-{
-  fail_unless (1==1, "Shouldn't see this");
-}
-END_TEST
-
-START_TEST(test_fail)
-{
-  fail("Failure");
-}
-END_TEST
-
-START_TEST(test_exit)
-{
-  exit(1);
-}
-END_TEST
-
-START_TEST(test_pass2)
-{
-  fail_unless (1==1, "Shouldn't see this");
-}
-END_TEST
-
-static Suite *make_s1_suite (void)
-{
-  Suite *s;
-  TCase *tc;
-
-  s = suite_create("S1");
-  tc = tcase_create ("Core");
-  suite_add_tcase(s, tc);
-  tcase_add_test (tc, test_pass);
-  tcase_add_test (tc, test_fail);
-  tcase_add_test (tc, test_exit);
-
-  return s;
-}
-
-static Suite *make_s2_suite (void)
-{
-  Suite *s;
-  TCase *tc;
-
-  s = suite_create("S2");
-  tc = tcase_create ("Core");
-  suite_add_tcase(s, tc);
-  tcase_add_test (tc, test_pass2);
-
-  return s;
-}
-
-static void run_tests (int printmode)
-{
-  SRunner *sr;
-
-  sr = srunner_create(make_s1_suite());
-  srunner_add_suite(sr, make_s2_suite());
-  srunner_set_log(sr, "test.log");
-  srunner_run_all(sr, printmode);
-  srunner_free(sr);
-}
-
-static void usage(void)
-{
-  printf ("Usage: ex_output (CRSILENT | CRMINIMAL | CRNORMAL | CRVERBOSE)\n");
-}
-
-int main (int argc, char **argv)
-{
-  
-  if (argc != 2) {
-    usage();
-    return EXIT_FAILURE;
-  }
-
-  if (strcmp (argv[1], "CK_SILENT") == 0)
-    run_tests(CK_SILENT);
-  else if (strcmp (argv[1], "CK_MINIMAL") == 0)
-    run_tests(CK_MINIMAL);
-  else if (strcmp (argv[1], "CK_NORMAL") == 0)
-    run_tests(CK_NORMAL);
-  else if (strcmp (argv[1], "CK_VERBOSE") == 0)
-    run_tests(CK_VERBOSE);
-  else {
-    usage();
-    return EXIT_FAILURE;
-  }    
-    
-
-  return EXIT_SUCCESS;
-}
-  
index 2fc39ac..89006cf 100644 (file)
@@ -1,4 +1,24 @@
-#include "../lib/libcompat.h"
+/*
+ * Check: a unit test framework for C
+ * Copyright (C) 2001, 2002 Arien Malec
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+
 
 #include <stdlib.h>
 #include <stdio.h>
 
 START_TEST(test_pass)
 {
-  fail_unless (1==1, "Shouldn't see this");
+    ck_assert_msg(1 == 1, "Shouldn't see this");
 }
 END_TEST
 
 START_TEST(test_fail)
 {
-  fail("Failure");
+    ck_abort_msg("Failure");
 }
 END_TEST
 
+/*
+ * This test will fail without fork, as it will result in the
+ * unit test runniner exiting early.
+ */
+#if defined(HAVE_FORK) && HAVE_FORK==1
 START_TEST(test_exit)
 {
-  exit(1);
+    exit(1);
+}
+END_TEST
+#endif /* HAVE_FORK */
+
+/*
+ * This test will intentionally mess up the unit testing program
+ * when fork is unavailable. The purpose of including it is to
+ * ensure that the tap output is correct when a test crashes.
+ */
+START_TEST(test_abort)
+{
+    exit(1);
+}
+END_TEST
+
+START_TEST(test_pass2)
+{
+    ck_assert_msg(1 == 1, "Shouldn't see this");
 }
 END_TEST
 
-static Suite *make_suite (void)
+START_TEST(test_loop)
 {
-  Suite *s;
-  TCase *tc;
+    ck_assert_msg(_i == 1, "Iteration %d failed", _i);
+}
+END_TEST
+
+START_TEST(test_xml_esc_fail_msg)
+{
+    ck_abort_msg("fail \" ' < > & \x9 \xA" "X""\x08"" message"); /* backspace char \x08 deletes the X */
+}
+END_TEST
+
+static Suite *make_log1_suite(void)
+{
+    Suite *s;
+    TCase *tc;
 
-  s = suite_create("Master");
-  tc = tcase_create ("Core");
-  suite_add_tcase(s, tc);
-  tcase_add_test (tc, test_pass);
-  tcase_add_test (tc, test_fail);
-  tcase_add_test (tc, test_exit);
+    s = suite_create("S1");
+    tc = tcase_create("Core");
+    suite_add_tcase(s, tc);
+    tcase_add_test(tc, test_pass);
+    tcase_add_test(tc, test_fail);
+#if defined(HAVE_FORK) && HAVE_FORK==1
+    tcase_add_test(tc, test_exit);
+#endif /* HAVE_FORK */
 
-  return s;
+    return s;
 }
 
-static void run_tests (int printmode)
+static Suite *make_log2_suite(int include_exit_test)
 {
-  SRunner *sr;
-  Suite *s;
+    Suite *s;
+    TCase *tc;
 
-  s = make_suite();
-  sr = srunner_create(s);
-  srunner_run_all(sr, printmode);
-  srunner_free(sr);
+    s = suite_create("S2");
+    tc = tcase_create("Core");
+    suite_add_tcase(s, tc);
+    if(include_exit_test == 1)
+    {
+        tcase_add_test(tc, test_abort);
+    }
+    tcase_add_test(tc, test_pass2);
+    tcase_add_loop_test(tc, test_loop, 0, 3);
+
+    return s;
+}
+
+/* check that XML special characters are properly escaped in XML log file */
+static Suite *make_xml_esc_suite(void)
+{
+    Suite *s;
+    TCase *tc;
+
+    s = suite_create("XML escape \" ' < > & \x9 \xA" "X""\x08"" tests"); /* backspace char \x08 deletes the X */
+    tc = tcase_create("description \" ' < > & \x9 \xA" "X""\x08"" end"); /* backspace char \x08 deletes the X */
+    suite_add_tcase(s, tc);
+
+    tcase_add_test(tc, test_xml_esc_fail_msg);
+
+    return s;
 }
 
 static void print_usage(void)
 {
-    printf ("Usage: ex_output (CK_SILENT | CK_MINIMAL | CK_NORMAL | CK_VERBOSE");
+    printf("Usage: ex_output (CK_SILENT | CK_MINIMAL | CK_NORMAL | CK_VERBOSE | CK_ENV");
 #if ENABLE_SUBUNIT
-    printf (" | CK_SUBUNIT");
+    printf(" | CK_SUBUNIT");
 #endif
-    printf (")\n");
+    printf(")\n");
+    printf("                 (STDOUT | STDOUT_DUMP | LOG | LOG_STDOUT | TAP | TAP_STDOUT | XML | XML_STDOUT)\n");
+    printf("                 (NORMAL | EXIT_TEST)\n");
+    printf("   If CK_ENV is used, the environment variable CK_VERBOSITY can be set to\n");
+    printf("   one of these: silent, minimal, or verbose. If it is not set to these, or\n");
+    printf("   if CK_VERBOSITY is not set, then CK_NORMAL will be used\n");
+    printf("   If testing the CK_[LOG|TAP_LOG|XML_LOG]_FILE_NAME env var and setting it to '-',\n");
+    printf("   then use the following mode: CK_SILENT STDOUT [NORMAL|EXIT_TEST].\n");
 }
 
-int main (int argc, char **argv)
+static void run_tests(enum print_output printmode, char *log_type, int include_exit_test)
 {
-  
-  if (argc != 2) {
-    print_usage();
-    return EXIT_FAILURE;
-  }
-
-  if (strcmp (argv[1], "CK_SILENT") == 0)
-    run_tests(CK_SILENT);
-  else if (strcmp (argv[1], "CK_MINIMAL") == 0)
-    run_tests(CK_MINIMAL);
-  else if (strcmp (argv[1], "CK_NORMAL") == 0)
-    run_tests(CK_NORMAL);
-  else if (strcmp (argv[1], "CK_VERBOSE") == 0)
-    run_tests(CK_VERBOSE);
+    SRunner *sr;
+    int dump_everything_to_stdout = 0;
+
+    sr = srunner_create(make_log1_suite());
+    srunner_add_suite(sr, make_log2_suite(include_exit_test));
+    srunner_add_suite(sr, make_xml_esc_suite());
+
+    if(strcmp(log_type, "STDOUT") == 0)
+    {
+        /* Nothing else to do here */
+    }
+    else if(strcmp(log_type, "STDOUT_DUMP") == 0)
+    {
+        /*
+         * Dump each type to stdout, in addition to printing out
+         * the configured print level.
+         */
+        dump_everything_to_stdout = 1;
+    }
+    else if(strcmp(log_type, "LOG") == 0)
+    {
+        srunner_set_log(sr, "test.log");
+    }
+    else if(strcmp(log_type, "LOG_STDOUT") == 0)
+    {
+        srunner_set_log(sr, "-");
+    }
+    else if(strcmp(log_type, "TAP") == 0)
+    {
+        srunner_set_tap(sr, "test.tap");
+    }
+    else if(strcmp(log_type, "TAP_STDOUT") == 0)
+    {
+        srunner_set_tap(sr, "-");
+    }
+    else if(strcmp(log_type, "XML") == 0)
+    {
+        srunner_set_xml(sr, "test.xml");
+    }
+    else if(strcmp(log_type, "XML_STDOUT") == 0)
+    {
+        srunner_set_xml(sr, "-");
+    }
+    else
+    {
+        print_usage();
+        exit(EXIT_FAILURE);
+    }
+
+    srunner_run_all(sr, printmode);
+
+    if(dump_everything_to_stdout)
+    {
+        srunner_print(sr, CK_SILENT);
+        srunner_print(sr, CK_MINIMAL);
+        srunner_print(sr, CK_NORMAL);
+        srunner_print(sr, CK_VERBOSE);
+        srunner_print(sr, CK_ENV);
 #if ENABLE_SUBUNIT
-  else if (strcmp (argv[1], "CK_SUBUNIT") == 0)
-    run_tests(CK_SUBUNIT);
+        /*
+         * Note that this call does not contribute anything, as
+         * subunit is not fully considered an 'output mode'.
+         */
+        srunner_print(sr, CK_SUBUNIT);
 #endif
-  else {
-    print_usage();
-    return EXIT_FAILURE;
-  }    
-    
+    }
+
+    srunner_free(sr);
+}
+
+#define OUTPUT_TYPE_ARG       1
+#define LOG_TYPE_ARG          2
+#define INCLUDE_EXIT_TEST_ARG 3
+int main(int argc, char **argv)
+{
+    enum print_output printmode;
+    int include_exit_test;
+
+    if(argc != 4)
+    {
+        print_usage();
+        return EXIT_FAILURE;
+    }
+
+    if(strcmp(argv[OUTPUT_TYPE_ARG], "CK_SILENT") == 0)
+    {
+        printmode = CK_SILENT;
+    }
+    else if(strcmp(argv[OUTPUT_TYPE_ARG], "CK_MINIMAL") == 0)
+    {
+        printmode = CK_MINIMAL;
+    }
+    else if(strcmp(argv[OUTPUT_TYPE_ARG], "CK_NORMAL") == 0)
+    {
+        printmode = CK_NORMAL;
+    }
+    else if(strcmp(argv[OUTPUT_TYPE_ARG], "CK_VERBOSE") == 0)
+    {
+        printmode = CK_VERBOSE;
+    }
+    else if(strcmp(argv[OUTPUT_TYPE_ARG], "CK_ENV") == 0)
+    {
+        printmode = CK_ENV;
+    }
+#if ENABLE_SUBUNIT
+    else if(strcmp(argv[OUTPUT_TYPE_ARG], "CK_SUBUNIT") == 0)
+    {
+        printmode = CK_SUBUNIT;
+    }
+#endif
+    else
+    {
+        print_usage();
+        return EXIT_FAILURE;
+    }
+
+    if(strcmp(argv[INCLUDE_EXIT_TEST_ARG], "NORMAL") == 0)
+    {
+        include_exit_test = 0;
+    }
+    else if(strcmp(argv[INCLUDE_EXIT_TEST_ARG], "EXIT_TEST") == 0)
+    {
+        include_exit_test = 1;
+    }
+    else
+    {
+        print_usage();
+        return EXIT_FAILURE;
+    }
+
+    run_tests(printmode, argv[LOG_TYPE_ARG], include_exit_test);
 
-  return EXIT_SUCCESS;
+    return EXIT_SUCCESS;
 }
-  
diff --git a/tests/ex_xml_output.c b/tests/ex_xml_output.c
deleted file mode 100644 (file)
index 07f52d2..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "../lib/libcompat.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <check.h>
-
-START_TEST(test_pass)
-{
-  fail_unless (1==1, "Shouldn't see this");
-}
-END_TEST
-
-START_TEST(test_fail)
-{
-  fail("Failure");
-}
-END_TEST
-
-START_TEST(test_exit)
-{
-  exit(1);
-}
-END_TEST
-
-START_TEST(test_pass2)
-{
-  fail_unless (1==1, "Shouldn't see this");
-}
-END_TEST
-
-START_TEST(test_loop)
-{
-  fail_unless (_i==1, "Iteration %d failed", _i);
-}
-END_TEST
-
-static Suite *make_s1_suite (void)
-{
-  Suite *s;
-  TCase *tc;
-
-  s = suite_create("S1");
-  tc = tcase_create ("Core");
-  suite_add_tcase(s, tc);
-  tcase_add_test (tc, test_pass);
-  tcase_add_test (tc, test_fail);
-  tcase_add_test (tc, test_exit);
-
-  return s;
-}
-
-static Suite *make_s2_suite (void)
-{
-  Suite *s;
-  TCase *tc;
-
-  s = suite_create("S2");
-  tc = tcase_create ("Core");
-  suite_add_tcase(s, tc);
-  tcase_add_test (tc, test_pass2);
-  tcase_add_loop_test(tc, test_loop, 0, 3);
-
-  return s;
-}
-
-static void run_tests (int printmode)
-{
-  SRunner *sr;
-
-  sr = srunner_create(make_s1_suite());
-  srunner_add_suite(sr, make_s2_suite());
-  srunner_set_xml(sr, "test.log.xml");
-  srunner_run_all(sr, printmode);
-  srunner_free(sr);
-}
-
-
-int main (int argc CK_ATTRIBUTE_UNUSED, char **argv CK_ATTRIBUTE_UNUSED)
-{
-  run_tests(CK_SILENT);                /* not considered in XML output */
-
-  return EXIT_SUCCESS;
-}
-  
diff --git a/tests/test_check_nofork.sh b/tests/test_check_nofork.sh
new file mode 100755 (executable)
index 0000000..fda9cd9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env sh
+
+. ./test_vars
+
+if [ $HAVE_FORK -eq 1 ]; then
+expected="Running suite(s): NoFork
+0%: Checks: 1, Failures: 1, Errors: 0"
+else
+expected="Running suite(s): NoFork
+0%: Checks: 1, Failures: 1, Errors: 0
+Running suite(s): NoForkSupport
+100%: Checks: 1, Failures: 0, Errors: 0"
+fi
+
+actual=`./check_nofork${EXEEXT} | tr -d "\r"`
+if [ x"${expected}" = x"${actual}" ]; then
+  exit 0
+else
+  echo "Problem with check_nofork${EXEEXT}"
+  echo "Expected: "
+  echo "${expected}"
+  echo "Got: "
+  echo "${actual}"
+  exit 1
+fi
diff --git a/tests/test_check_nofork_teardown.sh b/tests/test_check_nofork_teardown.sh
new file mode 100755 (executable)
index 0000000..44cf42c
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/env sh
+
+. ./test_vars
+
+expected="Running suite(s): bug-99
+0%: Checks: 1, Failures: 1, Errors: 0
+${SRCDIR}check_nofork_teardown.c:56:F:tc:will_fail:0: Assertion '0' failed"
+
+actual=`./check_nofork_teardown${EXEEXT} | tr -d "\r"`
+if [ x"${expected}" = x"${actual}" ]; then
+  exit 0
+else
+  echo "Problem with check_nofork_teardown${EXEEXT}"
+  echo "Expected: "
+  echo "${expected}"
+  echo "Got: "
+  echo "${actual}"
+  exit 1
+fi
index a75c0f4..962bf32 100755 (executable)
@@ -1,27 +1,17 @@
-#!/bin/sh
+#!/usr/bin/env sh
 
-if [ "${srcdir}" = "." ]; then
-    lsrc=""
-else
-    lsrc="${srcdir}/"
-fi
-
-expected="Running suite S1
-${lsrc}ex_log_output.c:10:P:Core:test_pass:0: Passed
-${lsrc}ex_log_output.c:16:F:Core:test_fail:0: Failure
-${lsrc}ex_log_output.c:20:E:Core:test_exit:0: (after this point) Early exit with return value 1
-Running suite S2
-${lsrc}ex_log_output.c:28:P:Core:test_pass2:0: Passed
-Results for all suites run:
-50%: Checks: 4, Failures: 1, Errors: 1"
+OUTPUT_FILE=test.log
 
+. ./test_vars
+. $(dirname $0)/test_output_strings
 
 test_log_output ( ) {
-    
-    ./ex_log_output "${1}" > /dev/null
-    actual=`cat test.log`
+    rm -f ${OUTPUT_FILE}
+    ./ex_output${EXEEXT} "${1}" "LOG" "NORMAL" > /dev/null
+    actual=`cat ${OUTPUT_FILE} | tr -d "\r"`
+    expected=${2}
     if [ x"${expected}" != x"${actual}" ]; then
-       echo "Problem with ex_log_output ${3}";
+       echo "Problem with ex_log_output${EXEEXT} ${1} LOG NORMAL";
        echo "Expected:";
        echo "${expected}";
        echo "Got:";
@@ -31,8 +21,8 @@ test_log_output ( ) {
     
 }
 
-test_log_output "CK_SILENT";
-test_log_output "CK_MINIMAL";
-test_log_output "CK_NORMAL";
-test_log_output "CK_VERBOSE";
+test_log_output "CK_SILENT"  "${expected_log_log}"
+test_log_output "CK_MINIMAL" "${expected_log_log}"
+test_log_output "CK_NORMAL"  "${expected_log_log}"
+test_log_output "CK_VERBOSE" "${expected_log_log}"
 exit 0
diff --git a/tests/test_mem_leaks.sh b/tests/test_mem_leaks.sh
new file mode 100755 (executable)
index 0000000..44d6d30
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env sh
+
+UNIT_TEST=./check_mem_leaks
+VALGRIND_LOG_FILE=${UNIT_TEST}.valgrind
+LEAK_MESSAGE="are definitely lost"
+
+# This test runs valgrind against the check_mem_leaks unit test
+# program, looking for memory leaks. If any are found, "exit 1"
+# is invoked, and one must look through the resulting valgrind log
+# file for details on the leak.
+
+rm -f ${VALGRIND_LOG_FILE}
+libtool --mode=execute valgrind --leak-check=full ${UNIT_TEST} 2>&1 | tee ${VALGRIND_LOG_FILE}
+
+NUM_LEAKS=$(grep "${LEAK_MESSAGE}" ${VALGRIND_LOG_FILE} | wc -l)
+
+if test ${NUM_LEAKS} -gt 0; then
+    echo "ERROR: ${NUM_LEAKS} memory leaks were detected by valgrind."
+    echo "       Look through ${VALGRIND_LOG_FILE} for details,"
+    echo "       searching for \"${LEAK_MESSAGE}\"."
+    exit 1
+else
+    echo "No memory leaks found"
+    exit 0
+fi
index ba460e5..c1b31bd 100755 (executable)
-#!/bin/sh
+#!/usr/bin/env sh
 
 . ./test_vars
+. $(dirname $0)/test_output_strings
 
-if [ "${srcdir}" = "." ]; then
-    lsrc=""
-else
-    lsrc="${srcdir}/"
-fi
+# When the ex_output program is run with the STDOUT_DUMP mode, it will
+# run with the normal output mode, then dump each output mode using
+# srunner_print() in this order:
+# CK_SILENT CK_MINIMAL CK_NORMAL CK_VERBOSE CK_ENV CK_SUBUNIT
+# note though that CK_SUBUNIT does not output anything, as it is
+# not fully considered an 'output mode'.
+exp_silent_dump="$exp_minimal_result
+$exp_normal_result
+$exp_verbose_result"
+exp_minimal_dump="$exp_minimal
+$exp_minimal_result
+$exp_normal_result
+$exp_verbose_result
+$exp_minimal_result"
+exp_normal_dump="$exp_normal
+$exp_minimal_result
+$exp_normal_result
+$exp_verbose_result
+$exp_normal_result"
+exp_verbose_dump="$exp_verbose
+$exp_minimal_result
+$exp_normal_result
+$exp_verbose_result
+$exp_verbose_result"
+exp_subunit_dump="$exp_subunit
+
+$exp_minimal_result
+$exp_normal_result
+$exp_verbose_result
+$exp_normal_result"
 
-t0="x"
-t1="xRunning suite(s): Master
-33%: Checks: 3, Failures: 1, Errors: 1"
-t2="xRunning suite(s): Master
-33%: Checks: 3, Failures: 1, Errors: 1
-${lsrc}ex_output.c:17:F:Core:test_fail:0: Failure
-${lsrc}ex_output.c:21:E:Core:test_exit:0: (after this point) Early exit with return value 1"
-t3="xRunning suite(s): Master
-33%: Checks: 3, Failures: 1, Errors: 1
-${lsrc}ex_output.c:11:P:Core:test_pass:0: Passed
-${lsrc}ex_output.c:17:F:Core:test_fail:0: Failure
-${lsrc}ex_output.c:21:E:Core:test_exit:0: (after this point) Early exit with return value 1"
-t4="xtest: Core:test_pass
-success: Core:test_pass
-test: Core:test_fail
-failure: Core:test_fail [
-${lsrc}ex_output.c:17: Failure
-]
-test: Core:test_exit
-error: Core:test_exit [
-${lsrc}ex_output.c:21: (after this point) Early exit with return value 1
-]"
-
-op0=`./ex_output CK_SILENT`
-op1=`./ex_output CK_MINIMAL`
-op2=`./ex_output CK_NORMAL`
-op3=`./ex_output CK_VERBOSE`
+act_silent=`./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL  | tr -d "\r"`
+act_silent_env=`CK_VERBOSITY=silent ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL  | tr -d "\r"`
+act_silent_dump_env=`CK_VERBOSITY=silent ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL  | tr -d "\r"`
+act_minimal=`./ex_output${EXEEXT} CK_MINIMAL STDOUT NORMAL | tr -d "\r"`
+act_minimal_env=`CK_VERBOSITY=minimal ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
+act_minimal_dump_env=`CK_VERBOSITY=minimal ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL | tr -d "\r"`
+act_normal=`./ex_output${EXEEXT} CK_NORMAL  STDOUT NORMAL | tr -d "\r"`
+act_normal_env=`CK_VERBOSITY=normal CK_VERBOSITY='' ./ex_output${EXEEXT} CK_ENV  STDOUT NORMAL | tr -d "\r"`
+act_normal_dump_env=`CK_VERBOSITY=normal CK_VERBOSITY='' ./ex_output${EXEEXT} CK_ENV  STDOUT_DUMP NORMAL | tr -d "\r"`
+act_normal_env_blank=`./ex_output${EXEEXT} CK_ENV  STDOUT NORMAL | tr -d "\r"`
+act_normal_env_invalid=`CK_VERBOSITY='BLARGS' ./ex_output${EXEEXT} CK_ENV  STDOUT NORMAL | tr -d "\r"`
+act_verbose=`./ex_output${EXEEXT} CK_VERBOSE STDOUT NORMAL | tr -d "\r"`
+act_verbose_env=`CK_VERBOSITY=verbose ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
+act_verbose_dump_env=`CK_VERBOSITY=verbose ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL | tr -d "\r"`
 if test 1 -eq $ENABLE_SUBUNIT; then
-op4=`./ex_output CK_SUBUNIT`
+act_subunit=`./ex_output${EXEEXT} CK_SUBUNIT STDOUT NORMAL | tr -d "\r"`
+act_subunit_dump_env=`CK_VERBOSITY=subunit ./ex_output${EXEEXT} CK_SUBUNIT STDOUT_DUMP NORMAL | tr -d "\r"`
 fi
 
+log_stdout=`                             ./ex_output${EXEEXT} CK_SILENT LOG_STDOUT NORMAL`
+log_env_stdout=`CK_LOG_FILE_NAME="-"     ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL`
+tap_stdout=`                             ./ex_output${EXEEXT} CK_SILENT TAP_STDOUT NORMAL`
+tap_env_stdout=`CK_TAP_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL`
+xml_stdout=`                             ./ex_output${EXEEXT} CK_SILENT XML_STDOUT NORMAL  | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
+xml_env_stdout=`CK_XML_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL      | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
 
 test_output ( ) {
-    if [ "${1}" != "${2}" ]; then
-       echo "Problem with ex_output ${3}";
+    if [ "x${1}" != "x${2}" ]; then
+       echo "Problem with ex_output${EXEEXT} ${3}";
        echo "Expected:";
        echo "${1}";
        echo "Got:";
        echo "${2}";
        exit 1;
     fi
-    
+
 }
 
-test_output "$t0" x"$op0" "CK_SILENT";
-test_output "$t1" x"$op1" "CK_MINIMAL";
-test_output "$t2" x"$op2" "CK_NORMAL";
-test_output "$t3" x"$op3" "CK_VERBOSE";
+test_output "$exp_silent"  "$act_silent"             "CK_SILENT STDOUT NORMAL";
+test_output "$exp_silent"  "$act_silent_env"         "CK_ENV STDOUT NORMAL";
+test_output "$exp_minimal" "$act_minimal"            "CK_MINIMAL STDOUT NORMAL";
+test_output "$exp_minimal" "$act_minimal_env"        "CK_ENV STDOUT NORMAL";
+test_output "$exp_normal"  "$act_normal"             "CK_NORMAL STDOUT NORMAL";
+test_output "$exp_normal"  "$act_normal_env"         "CK_ENV STDOUT NORMAL";
+test_output "$exp_normal"  "$act_normal_env_blank"   "CK_ENV STDOUT NORMAL";
+test_output "$exp_normal"  "$act_normal_env_invalid" "CK_ENV STDOUT NORMAL";
+test_output "$exp_verbose" "$act_verbose"            "CK_VERBOSE STDOUT NORMAL";
+test_output "$exp_verbose" "$act_verbose_env"        "CK_ENV STDOUT NORMAL";
+
+test_output "$exp_silent_dump"  "$act_silent_dump_env"  "CK_ENV STDOUT_DUMP NORMAL (for silent)"
+test_output "$exp_minimal_dump" "$act_minimal_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for minimal)"
+test_output "$exp_normal_dump"  "$act_normal_dump_env"  "CK_ENV STDOUT_DUMP NORMAL (for normal)"
+test_output "$exp_verbose_dump" "$act_verbose_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for verbose)"
+
+test_output "${expected_log_log}"    "${log_stdout}"     "CK_SILENT LOG_STDOUT NORMAL"
+test_output "${expected_log_log}"    "${log_env_stdout}" "CK_SILENT STDOUT     NORMAL (with log env = '-')"
+test_output "${expected_xml}"        "${xml_stdout}"     "CK_SILENT XML_STDOUT NORMAL"
+test_output "${expected_xml}"        "${xml_env_stdout}" "CK_SILENT STDOUT     NORMAL (with xml env = '-')"
+test_output "${expected_normal_tap}" "${tap_stdout}"     "CK_SILENT TAP_STDOUT NORMAL"
+test_output "${expected_normal_tap}" "${tap_env_stdout}" "CK_SILENT STDOUT     NORMAL (with tap env = '-')"
+
 if test 1 -eq $ENABLE_SUBUNIT; then
-test_output "$t4" x"$op4" "CK_SUBUNIT";
+    test_output "$exp_subunit"      "$act_subunit"          "CK_SUBUNIT STDOUT NORMAL";
+    test_output "$exp_subunit_dump" "$act_subunit_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for subunit)"
 fi
+
 exit 0
diff --git a/tests/test_output_strings b/tests/test_output_strings
new file mode 100644 (file)
index 0000000..21751b6
--- /dev/null
@@ -0,0 +1,336 @@
+#!/usr/bin/env sh
+
+. ./test_vars
+
+# Set the 'internal field separator' character to
+# something besides whitespace so that the string
+# comparisons will work
+IFS="~"
+
+# octal quotes are specified by POSIX, should be thus portable
+# (e.g. to Lubuntu builtin printf, Solaris 10 /usr/bin/printf)
+tab_nl_X_bs="\11 \12X\10"
+
+##################
+# stdout output
+##################
+suite_output=`printf "Running suite(s): S1
+ S2
+ XML escape \" ' < > & $tab_nl_X_bs tests"`
+
+exp_silent=""
+
+if [ $HAVE_FORK -eq 1 ]; then
+exp_minimal_result="37%: Checks: 8, Failures: 4, Errors: 1"
+else
+exp_minimal_result="42%: Checks: 7, Failures: 4, Errors: 0"
+fi
+exp_minimal="$suite_output
+$exp_minimal_result"
+
+if [ $HAVE_FORK -eq 1 ]; then
+exp_normal_result=`printf "37%%: Checks: 8, Failures: 4, Errors: 1
+${SRCDIR}ex_output.c:37:F:Core:test_fail:0: Failure
+${SRCDIR}ex_output.c:46:E:Core:test_exit:0: (after this point) Early exit with return value 1
+${SRCDIR}ex_output.c:72:F:Core:test_loop:0: Iteration 0 failed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:2: Iteration 2 failed
+${SRCDIR}ex_output.c:78:F:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg:0: fail \" ' < > & $tab_nl_X_bs message"`
+else
+exp_normal_result=`printf "42%%: Checks: 7, Failures: 4, Errors: 0
+${SRCDIR}ex_output.c:37:F:Core:test_fail:0: Failure
+${SRCDIR}ex_output.c:72:F:Core:test_loop:0: Iteration 0 failed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:2: Iteration 2 failed
+${SRCDIR}ex_output.c:78:F:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg:0: fail \" ' < > & $tab_nl_X_bs message"`
+fi
+exp_normal="$suite_output
+$exp_normal_result"
+
+
+if [ $HAVE_FORK -eq 1 ]; then
+exp_verbose_result=`printf "37%%: Checks: 8, Failures: 4, Errors: 1
+${SRCDIR}ex_output.c:31:P:Core:test_pass:0: Passed
+${SRCDIR}ex_output.c:37:F:Core:test_fail:0: Failure
+${SRCDIR}ex_output.c:46:E:Core:test_exit:0: (after this point) Early exit with return value 1
+${SRCDIR}ex_output.c:66:P:Core:test_pass2:0: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:0: Iteration 0 failed
+${SRCDIR}ex_output.c:72:P:Core:test_loop:1: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:2: Iteration 2 failed
+${SRCDIR}ex_output.c:78:F:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg:0: fail \" ' < > & $tab_nl_X_bs message"`
+else
+exp_verbose_result=`printf "42%%: Checks: 7, Failures: 4, Errors: 0
+${SRCDIR}ex_output.c:31:P:Core:test_pass:0: Passed
+${SRCDIR}ex_output.c:37:F:Core:test_fail:0: Failure
+${SRCDIR}ex_output.c:66:P:Core:test_pass2:0: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:0: Iteration 0 failed
+${SRCDIR}ex_output.c:72:P:Core:test_loop:1: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:2: Iteration 2 failed
+${SRCDIR}ex_output.c:78:F:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg:0: fail \" ' < > & $tab_nl_X_bs message"`
+fi
+exp_verbose="$suite_output
+$exp_verbose_result"
+
+if [ $HAVE_FORK -eq 1 ]; then
+exp_subunit=`printf "test: Core:test_pass
+success: Core:test_pass
+test: Core:test_fail
+failure: Core:test_fail [
+${SRCDIR}ex_output.c:37: Failure
+]
+test: Core:test_exit
+error: Core:test_exit [
+${SRCDIR}ex_output.c:46: (after this point) Early exit with return value 1
+]
+test: Core:test_pass2
+success: Core:test_pass2
+test: Core:test_loop
+failure: Core:test_loop [
+${SRCDIR}ex_output.c:72: Iteration 0 failed
+]
+test: Core:test_loop
+success: Core:test_loop
+test: Core:test_loop
+failure: Core:test_loop [
+${SRCDIR}ex_output.c:72: Iteration 2 failed
+]
+test: description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg
+failure: description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg [
+${SRCDIR}ex_output.c:78: fail \" ' < > & $tab_nl_X_bs message
+]"`
+else
+exp_subunit=`printf "test: Core:test_pass
+success: Core:test_pass
+test: Core:test_fail
+failure: Core:test_fail [
+${SRCDIR}ex_output.c:37: Failure
+]
+test: Core:test_pass2
+success: Core:test_pass2
+test: Core:test_loop
+failure: Core:test_loop [
+${SRCDIR}ex_output.c:72: Iteration 0 failed
+]
+test: Core:test_loop
+success: Core:test_loop
+test: Core:test_loop
+failure: Core:test_loop [
+${SRCDIR}ex_output.c:72: Iteration 2 failed
+]
+test: description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg
+failure: description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg [
+${SRCDIR}ex_output.c:78: fail \" ' < > & $tab_nl_X_bs message
+]"`
+fi
+
+##################
+# log output
+##################
+if [ $HAVE_FORK -eq 1 ]; then
+expected_log_log=`printf "Running suite S1
+${SRCDIR}ex_output.c:31:P:Core:test_pass:0: Passed
+${SRCDIR}ex_output.c:37:F:Core:test_fail:0: Failure
+${SRCDIR}ex_output.c:46:E:Core:test_exit:0: (after this point) Early exit with return value 1
+Running suite S2
+${SRCDIR}ex_output.c:66:P:Core:test_pass2:0: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:0: Iteration 0 failed
+${SRCDIR}ex_output.c:72:P:Core:test_loop:1: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:2: Iteration 2 failed
+Running suite XML escape \" ' < > & $tab_nl_X_bs tests
+${SRCDIR}ex_output.c:78:F:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg:0: fail \" ' < > & $tab_nl_X_bs message
+Results for all suites run:
+37%%: Checks: 8, Failures: 4, Errors: 1"`
+else
+expected_log_log=`printf "Running suite S1
+${SRCDIR}ex_output.c:31:P:Core:test_pass:0: Passed
+${SRCDIR}ex_output.c:37:F:Core:test_fail:0: Failure
+Running suite S2
+${SRCDIR}ex_output.c:66:P:Core:test_pass2:0: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:0: Iteration 0 failed
+${SRCDIR}ex_output.c:72:P:Core:test_loop:1: Passed
+${SRCDIR}ex_output.c:72:F:Core:test_loop:2: Iteration 2 failed
+Running suite XML escape \" ' < > & $tab_nl_X_bs tests
+${SRCDIR}ex_output.c:78:F:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg:0: fail \" ' < > & $tab_nl_X_bs message
+Results for all suites run:
+42%%: Checks: 7, Failures: 4, Errors: 0"`
+fi
+
+##################
+# xml output
+##################
+if [ $HAVE_FORK -eq 1 ]; then
+expected_xml="<?xml version=\"1.0\"?>
+<?xml-stylesheet type=\"text/xsl\" href=\"http://check.sourceforge.net/xml/check_unittest.xslt\"?>
+<testsuites xmlns=\"http://check.sourceforge.net/ns\">
+  <suite>
+    <title>S1</title>
+    <test result=\"success\">
+      <fn>ex_output.c:31</fn>
+      <id>test_pass</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result=\"failure\">
+      <fn>ex_output.c:37</fn>
+      <id>test_fail</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Failure</message>
+    </test>
+    <test result=\"error\">
+      <fn>ex_output.c:46</fn>
+      <id>test_exit</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Early exit with return value 1</message>
+    </test>
+  </suite>
+  <suite>
+    <title>S2</title>
+    <test result=\"success\">
+      <fn>ex_output.c:66</fn>
+      <id>test_pass2</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result=\"failure\">
+      <fn>ex_output.c:72</fn>
+      <id>test_loop</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Iteration 0 failed</message>
+    </test>
+    <test result=\"success\">
+      <fn>ex_output.c:72</fn>
+      <id>test_loop</id>
+      <iteration>1</iteration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result=\"failure\">
+      <fn>ex_output.c:72</fn>
+      <id>test_loop</id>
+      <iteration>2</iteration>
+      <description>Core</description>
+      <message>Iteration 2 failed</message>
+    </test>
+  </suite>
+  <suite>
+    <title>XML escape &quot; &apos; &lt; &gt; &amp; &#x9; &#xA;X tests</title>
+    <test result=\"failure\">
+      <fn>ex_output.c:78</fn>
+      <id>test_xml_esc_fail_msg</id>
+      <iteration>0</iteration>
+      <description>description &quot; &apos; &lt; &gt; &amp; &#x9; &#xA;X end</description>
+      <message>fail &quot; &apos; &lt; &gt; &amp; &#x9; &#xA;X message</message>
+    </test>
+  </suite>
+</testsuites>"
+expected_duration_count=9
+else
+expected_xml="<?xml version=\"1.0\"?>
+<?xml-stylesheet type=\"text/xsl\" href=\"http://check.sourceforge.net/xml/check_unittest.xslt\"?>
+<testsuites xmlns=\"http://check.sourceforge.net/ns\">
+  <suite>
+    <title>S1</title>
+    <test result=\"success\">
+      <fn>ex_output.c:31</fn>
+      <id>test_pass</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result=\"failure\">
+      <fn>ex_output.c:37</fn>
+      <id>test_fail</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Failure</message>
+    </test>
+  </suite>
+  <suite>
+    <title>S2</title>
+    <test result=\"success\">
+      <fn>ex_output.c:66</fn>
+      <id>test_pass2</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result=\"failure\">
+      <fn>ex_output.c:72</fn>
+      <id>test_loop</id>
+      <iteration>0</iteration>
+      <description>Core</description>
+      <message>Iteration 0 failed</message>
+    </test>
+    <test result=\"success\">
+      <fn>ex_output.c:72</fn>
+      <id>test_loop</id>
+      <iteration>1</iteration>
+      <description>Core</description>
+      <message>Passed</message>
+    </test>
+    <test result=\"failure\">
+      <fn>ex_output.c:72</fn>
+      <id>test_loop</id>
+      <iteration>2</iteration>
+      <description>Core</description>
+      <message>Iteration 2 failed</message>
+    </test>
+  </suite>
+  <suite>
+    <title>XML escape &quot; &apos; &lt; &gt; &amp; &#x9; &#xA;X tests</title>
+    <test result=\"failure\">
+      <fn>ex_output.c:78</fn>
+      <id>test_xml_esc_fail_msg</id>
+      <iteration>0</iteration>
+      <description>description &quot; &apos; &lt; &gt; &amp; &#x9; &#xA;X end</description>
+      <message>fail &quot; &apos; &lt; &gt; &amp; &#x9; &#xA;X message</message>
+    </test>
+  </suite>
+</testsuites>"
+expected_duration_count=8
+fi
+
+##################
+# tap output
+##################
+if [ $HAVE_FORK -eq 1 ]; then
+expected_normal_tap=`printf "ok 1 - ${SRCDIR}ex_output.c:Core:test_pass: Passed
+not ok 2 - ${SRCDIR}ex_output.c:Core:test_fail: Failure
+not ok 3 - ${SRCDIR}ex_output.c:Core:test_exit: Early exit with return value 1
+ok 4 - ${SRCDIR}ex_output.c:Core:test_pass2: Passed
+not ok 5 - ${SRCDIR}ex_output.c:Core:test_loop: Iteration 0 failed
+ok 6 - ${SRCDIR}ex_output.c:Core:test_loop: Passed
+not ok 7 - ${SRCDIR}ex_output.c:Core:test_loop: Iteration 2 failed
+not ok 8 - ${SRCDIR}ex_output.c:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg: fail \" ' < > & $tab_nl_X_bs message
+1..8"`
+expected_aborted_tap=`printf "ok 1 - ${SRCDIR}ex_output.c:Core:test_pass: Passed
+not ok 2 - ${SRCDIR}ex_output.c:Core:test_fail: Failure
+not ok 3 - ${SRCDIR}ex_output.c:Core:test_exit: Early exit with return value 1
+not ok 4 - ${SRCDIR}ex_output.c:Core:test_abort: Early exit with return value 1
+ok 5 - ${SRCDIR}ex_output.c:Core:test_pass2: Passed
+not ok 6 - ${SRCDIR}ex_output.c:Core:test_loop: Iteration 0 failed
+ok 7 - ${SRCDIR}ex_output.c:Core:test_loop: Passed
+not ok 8 - ${SRCDIR}ex_output.c:Core:test_loop: Iteration 2 failed
+not ok 9 - ${SRCDIR}ex_output.c:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg: fail \" ' < > & $tab_nl_X_bs message
+1..9"`
+else
+expected_normal_tap=`printf "ok 1 - ${SRCDIR}ex_output.c:Core:test_pass: Passed
+not ok 2 - ${SRCDIR}ex_output.c:Core:test_fail: Failure
+ok 3 - ${SRCDIR}ex_output.c:Core:test_pass2: Passed
+not ok 4 - ${SRCDIR}ex_output.c:Core:test_loop: Iteration 0 failed
+ok 5 - ${SRCDIR}ex_output.c:Core:test_loop: Passed
+not ok 6 - ${SRCDIR}ex_output.c:Core:test_loop: Iteration 2 failed
+not ok 7 - ${SRCDIR}ex_output.c:description \" ' < > & $tab_nl_X_bs end:test_xml_esc_fail_msg: fail \" ' < > & $tab_nl_X_bs message
+1..7"`
+# When fork() is unavailable, one of the tests
+# will invoke exit() which will terminate the
+# unit testing program. In that case, the tap
+# results will be incomplete, but the required
+# test plan will be missing, signaling that
+# something bad happened.
+expected_aborted_tap="ok 1 - ${SRCDIR}ex_output.c:Core:test_pass: Passed
+not ok 2 - ${SRCDIR}ex_output.c:Core:test_fail: Failure"
+fi
diff --git a/tests/test_set_max_msg_size.sh b/tests/test_set_max_msg_size.sh
new file mode 100755 (executable)
index 0000000..84a1ef6
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/env sh
+
+UNIT_TEST=./check_set_max_msg_size
+MAX_MESSAGE_LOG_FILE=${UNIT_TEST}.output
+TOO_LONG_MESSAGE="Message string too long"
+
+# This test reduces the maximal message size using the provided function,
+# so that the assertion message becomes too long.
+# We set the maximal size to 32, which is shorter than the message.
+
+rm -f ${MAX_MESSAGE_LOG_FILE}
+${UNIT_TEST} 32 2>&1 | tee ${MAX_MESSAGE_LOG_FILE}
+
+NUM_TOO_LONG_MESSAGES=$(grep "${TOO_LONG_MESSAGE}" ${MAX_MESSAGE_LOG_FILE} | wc -l)
+
+if test ${NUM_TOO_LONG_MESSAGES} -gt 0; then
+    echo "Maximal message size was reduced by function call."
+    rm -f ${MAX_MESSAGE_LOG_FILE}
+else
+    echo "ERROR: Maximal message size was not reduced by function call."
+    echo "Test output was preserved in ${MAX_MESSAGE_LOG_FILE}"
+    exit 1
+fi
+
+rm -f ${MAX_MESSAGE_LOG_FILE}
+export CK_MAX_MSG_SIZE=32
+${UNIT_TEST} 4096 2>&1 | tee ${MAX_MESSAGE_LOG_FILE}
+
+NUM_TOO_LONG_MESSAGES=$(grep "${TOO_LONG_MESSAGE}" ${MAX_MESSAGE_LOG_FILE} | wc -l)
+
+if test ${NUM_TOO_LONG_MESSAGES} -gt 0; then
+    echo "Maximal message size was reduced by environment variable."
+else
+    echo "ERROR: Maximal message size was not reduced by environment variable."
+    echo "Test output was preserved in ${MAX_MESSAGE_LOG_FILE}"
+    exit 1
+fi
+
+rm -f ${MAX_MESSAGE_LOG_FILE}
+exit 0
diff --git a/tests/test_tap_output.sh b/tests/test_tap_output.sh
new file mode 100755 (executable)
index 0000000..b74b806
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/env sh
+
+OUTPUT_FILE=test.tap
+
+. ./test_vars
+. $(dirname $0)/test_output_strings
+
+test_tap_output ( ) {
+    rm -f ${OUTPUT_FILE}
+    ./ex_output${EXEEXT} "CK_SILENT" "TAP" "${1}" > /dev/null
+    actual_tap=`cat ${OUTPUT_FILE} | tr -d "\r"`
+    expected_tap="${2}"
+    if [ x"${expected_tap}" != x"${actual_tap}" ]; then
+        echo "Problem with ex_tap_output${EXEEXT}";
+        echo "Expected:";
+        echo "${expected_tap}";
+        echo
+        echo "Got:";
+        echo "${actual_tap}";
+        exit 1;
+    fi
+}
+
+test_tap_output "NORMAL"     "${expected_normal_tap}"
+test_tap_output "EXIT_TEST" "${expected_aborted_tap}"
+
+exit 0
index c98d95a..a0b750b 100644 (file)
@@ -1,4 +1,20 @@
 # defined to 1 if subunit is enabled
-export ENABLE_SUBUNIT=@ENABLE_SUBUNIT@
-# defined to 1 if subunit is enabled
-export ENABLE_SUBUNIT=@ENABLE_SUBUNIT@
+ENABLE_SUBUNIT=@ENABLE_SUBUNIT@
+export ENABLE_SUBUNIT
+EXEEXT=@EXEEXT@
+export EXEEXT
+HAVE_FORK=@HAVE_FORK@
+export HAVE_FORK
+
+# path of the tests directory
+if [ x"@srcdir@" != x"." ]; then
+    if [ -z "@IS_MSVC@" -o "@IS_MSVC@" != "1" ]; then
+       SRCDIR="@srcdir@/"
+    else
+       SRCDIR="@srcdir@\\"
+    fi
+else
+    SRCDIR=""
+fi
+
+export SRCDIR
index 1662027..eef550c 100755 (executable)
@@ -1,79 +1,51 @@
-#!/bin/sh
+#!/usr/bin/env sh
 
-if [ "${srcdir}" = "." ]; then
-    lsrc=""
-else
-    lsrc="${srcdir}/"
-fi
+OUTPUT_FILE=test.xml
+CK_DEFAULT_TIMEOUT=4
 
-expected="<?xml version=\"1.0\"?>
-<testsuites xmlns=\"http://check.sourceforge.net/ns\">
-  <suite>
-    <title>S1</title>
-    <test result=\"success\">
-      <fn>ex_xml_output.c:10</fn>
-      <id>test_pass</id>
-      <iteration>0</iteration>
-      <description>Core</description>
-      <message>Passed</message>
-    </test>
-    <test result=\"failure\">
-      <fn>ex_xml_output.c:16</fn>
-      <id>test_fail</id>
-      <iteration>0</iteration>
-      <description>Core</description>
-      <message>Failure</message>
-    </test>
-    <test result=\"error\">
-      <fn>ex_xml_output.c:20</fn>
-      <id>test_exit</id>
-      <iteration>0</iteration>
-      <description>Core</description>
-      <message>Early exit with return value 1</message>
-    </test>
-  </suite>
-  <suite>
-    <title>S2</title>
-    <test result=\"success\">
-      <fn>ex_xml_output.c:28</fn>
-      <id>test_pass2</id>
-      <iteration>0</iteration>
-      <description>Core</description>
-      <message>Passed</message>
-    </test>
-    <test result=\"failure\">
-      <fn>ex_xml_output.c:34</fn>
-      <id>test_loop</id>
-      <iteration>0</iteration>
-      <description>Core</description>
-      <message>Iteration 0 failed</message>
-    </test>
-    <test result=\"success\">
-      <fn>ex_xml_output.c:34</fn>
-      <id>test_loop</id>
-      <iteration>1</iteration>
-      <description>Core</description>
-      <message>Passed</message>
-    </test>
-    <test result=\"failure\">
-      <fn>ex_xml_output.c:34</fn>
-      <id>test_loop</id>
-      <iteration>2</iteration>
-      <description>Core</description>
-      <message>Iteration 2 failed</message>
-    </test>
-  </suite>
-</testsuites>"
+. ./test_vars
+. $(dirname $0)/test_output_strings
 
-./ex_xml_output > /dev/null
-actual=`cat test.log.xml | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
-if [ x"${expected}" != x"${actual}" ]; then
-    echo "Problem with ex_xml_output ${3}";
+rm -f ${OUTPUT_FILE}
+export CK_DEFAULT_TIMEOUT
+./ex_output${EXEEXT} CK_MINIMAL XML NORMAL > /dev/null
+actual_xml=`cat ${OUTPUT_FILE} | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
+if [ x"${expected_xml}" != x"${actual_xml}" ]; then
+    echo "Problem with ex_xml_output${EXEEXT}";
     echo "Expected:";
-    echo "${expected}";
+    echo "${expected_xml}";
     echo "Got:";
-    echo "${actual}";
+    echo "${actual_xml}";
     exit 1;
 fi
-    
+
+actual_duration_count=`grep -c \<duration\> ${OUTPUT_FILE}`
+if [ x"${expected_duration_count}" != x"${actual_duration_count}" ]; then
+    echo "Wrong number of <duration> elements in ${OUTPUT_FILE}, ${expected_duration_count} vs ${actual_duration_count}";
+    exit 1;
+fi
+
+num_durations=`grep "\<duration\>" ${OUTPUT_FILE} | wc -l`
+
+i=1
+while [ ${i} -le ${num_durations} ]; do
+   duration=`grep "\<duration\>" ${OUTPUT_FILE} | head -n ${i} | tail -n 1 | cut -d ">" -f 2 | cut -d "<" -f 1`
+   int_duration=`echo $duration | cut -d "." -f 1`
+   if [ "${int_duration}" -ne "-1" ] && [ "${int_duration}" -gt "${CK_DEFAULT_TIMEOUT}" ]; then
+       echo "Problem with duration ${duration}; is not valid. Should be -1 or in [0, ${CK_DEFAULT_TIMEOUT}]"
+       exit 1
+   fi
+
+   i=$((i+1))
+done
+
+if [ ! -z `which xmllint` ]; then
+    xmllint_output=`xmllint ${OUTPUT_FILE}`
+    if [ $? -ne 0 ]; then
+        echo "xmllint found an issue"
+        echo ${xmllint_output}
+        exit 1
+    fi
+fi
+
 exit 0
diff --git a/xml/check_unittest.xslt b/xml/check_unittest.xslt
new file mode 100644 (file)
index 0000000..b8005fe
--- /dev/null
@@ -0,0 +1,93 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:c="http://check.sourceforge.net/ns">
+
+<!--
+
+bart@vankuik.nl, 13-MAR-2006
+
+You can use this xslt on the commandline as follows:
+$ xsltproc check_unittest.xslt check_output.xml > check_output.html
+
+-->
+
+<xsl:output method="html"/>
+
+<xsl:template match="c:testsuites">
+  <html><title>Test results</title><body>
+  <p>
+  <table width="100%" border="1" cellpadding="0">
+  <tr><td colspan="7" style='background:#e5E5f5'><h1>Unittests</h1></td></tr>
+    <xsl:apply-templates/>
+  </table></p>
+  </body></html>
+</xsl:template>
+
+<xsl:template match="c:suite">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="c:title">
+  <tr>
+  <th colspan="7">Test suite <xsl:apply-templates/></th>
+  </tr>
+  <tr>
+  <td>Path</td>
+  <td>Filename</td>
+  <td>Test ID</td>
+  <td>Iteration</td>
+  <td>Duration</td>
+  <td>Description</td>
+  <td>Message</td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="c:datetime">
+  <tr><th colspan="7">Test ran at: <xsl:apply-templates/></th></tr>
+</xsl:template>
+
+<xsl:template match="c:test[@result='success']">
+  <tr bgcolor="green"><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="c:test[@result='error']">
+  <tr bgcolor="red"><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="c:test[@result='failure']">
+  <tr bgcolor="red"><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="c:path">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:fn">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:id">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:iteration">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:description">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:message">
+  <td><pre><tt><xsl:apply-templates/></tt></pre></td>
+</xsl:template>
+
+<xsl:template match="c:test/c:duration">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:duration">
+  <tr><th colspan="7">Test duration: <xsl:apply-templates/> seconds</th></tr>
+</xsl:template>
+
+</xsl:stylesheet>
+